internal static void RegisterUser(string username, string email, string password) { // TODO: Validate! var userModel = new UserModel() { Username = username, Email = email, AuthCode = password }; HttpRequester.Post( string.Format("{0}users/register", baseUrl), userModel); }
internal static string LoginUser(string username, string sha1Password) { var userModel = new UserModel() { Username = username, AuthCode = sha1Password }; var loginResponse = HttpRequester.Post<LoginResponseModel>( string.Format("{0}auth/token", baseUrl), userModel); AccessToken = loginResponse.AccessToken; return loginResponse.Username; }