Esempio n. 1
0
    public static WebRequest <uint> Register(string name, string password, OnRequestComplete <uint> onComplete = null)
    {
        var accountInfo = new AccountInfo {
            name = name, password = password.GetMD5()
        };

        return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_REGISTER), accountInfo, onComplete));
    }
Esempio n. 2
0
 public static WebRequest <AccountData> Login(string username, string password, bool guest, OnRequestComplete <AccountData> onComplete = null)
 {
     if (guest)
     {
         return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_AUTH_GUEST), new { name = username }, onComplete));
     }
     return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_AUTH), new { name = username, password = password.GetMD5() }, onComplete));
 }
Esempio n. 3
0
    public static WebRequest BindAcount(int accId, string name, string password, string devId = "", OnRequestComplete onComplete = null)
    {
        var accountInfo = new
        {
            account  = accId,
            new_name = name,
            password = password.GetMD5()
        };

        return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_ACCOUNT_BIAND), accountInfo, onComplete));
    }
Esempio n. 4
0
 public static WebRequest <List <BannerInfo> > GetBanner(OnRequestComplete <List <BannerInfo> > onComplete = null)
 {
     return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_BANNER_INFO), onComplete));
 }
Esempio n. 5
0
    public static WebRequest <bool> CheckAccount(string m_name, OnRequestComplete <bool> onComplete = null)
    {
        var accountInfo = new { name = m_name };

        return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_ACCOUNT_CHECK), accountInfo, onComplete));
    }
Esempio n. 6
0
 public static WebRequest <uint> Register(AccountInfo info, OnRequestComplete <uint> onComplete = null)
 {
     return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_REGISTER), info, onComplete));
 }
Esempio n. 7
0
 public static WebRequest <ServerStatus> GetServerStatus(OnRequestComplete <ServerStatus> onComplete = null)
 {
     return(WebRequestManager.Request(WebAPI.FullApiUrl(WebAPI.API_SERVER_STATUS), new { clientVersion = Launch.Updater.currentVersion }, onComplete));
 }