Exemple #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()); }
 }
        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);
            }
        }
Exemple #4
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());
     }
 }