Example #1
0
        public string[] GetAssets(int ID)
        {
            WebApiCalls w1       = new WebApiCalls();
            string      dStrings = w1.DownloadString("http://www.roblox.com/Asset/AvatarAccoutrements.ashx?userId=" + ID.ToString());

            string[] splitStrings = dStrings.Split(';');
            return(splitStrings);
        }
 public string IDUser(string ID)
 {
     try
     {
         WebApiCalls w1  = new WebApiCalls();
         string      api = w1.DownloadString("http://api.roblox.com/Users/" + ID);
         return(SubString.subString(api, "\"Username\":", ","));
     }
     catch (Exception ex) { throw new InvalidRobloxAPIException(ex.ToString()); }
 }
Example #3
0
        public async Task Test02()
        {
            // arrange
            Isolate.WhenCalled(() => WebApiCalls.GetGoogleHomepageAsync())
            .WillReturn(Task.FromResult("fake data"));

            // act
            bool result = await WebScraper.GetAndSaveGoogleImageOfTheDay();

            // assert
            Assert.AreEqual(false, result);
        }
        public bool UsernameExists(string username)
        {
            WebApiCalls w1  = new WebApiCalls();
            string      api = w1.DownloadString("http://www.roblox.com/UserCheck/DoesUsernameExist?username="******"true"))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Example #5
0
 public long UserToId(string user)
 {
     try
     {
         WebApiCalls w1 = new WebApiCalls();
         long        x;
         string      stringDownload = w1.DownloadString("http://api.roblox.com/users/get-by-username?username="******"\"Id\":", ",\"U");
         if (Int64.TryParse(returnString, out x))
         {
             return(x);
         }
         else
         {
             throw new InvalidRobloxWebApiException("An error occured downloading from the web api, make sure the username is being used");
         }
     }
     catch (Exception ex)
     {
         throw new InvalidRobloxWebApiException(ex.ToString());
     }
 }
        static void Main(string[] args)
        {
            var client = new WebApiCalls();

            client.RetainBuildIndefinately(args[0]);
        }