public int Register(string email, string password, string edition) { RegisterRequestData data = new RegisterRequestData(email, password, edition); string registerStatus = "FAILED"; try { registerStatus = RequestHandler.RequestRegister(data); if (registerStatus != "OK") { return(-1); } } catch { return(-2); } int loginStatus = Login(email, password); if (loginStatus != 1) { switch (loginStatus) { case -1: return(-3); case -2: return(-2); } } return(1); }
public int Wipe(string edition) { RegisterRequestData data = new RegisterRequestData(SelectedAccount.email, SelectedAccount.password, edition); string json = "FAILED"; try { json = RequestHandler.RequestWipe(data); if (json != "OK") { return(-1); } } catch { return(-2); } SelectedAccount.edition = edition; return(1); }
public static string RequestWipe(RegisterRequestData data) { return(request.PostJson("/launcher/profile/change/wipe", Json.Serialize(data))); }
public static string RequestRegister(RegisterRequestData data) { return(request.PostJson("/launcher/profile/register", Json.Serialize(data))); }