2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-12-04 11:33:29 +00:00
|
|
|
|
|
2018-12-05 08:13:22 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2018-12-04 11:33:29 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API
|
|
|
|
|
{
|
2020-01-16 03:51:43 +00:00
|
|
|
|
public class RegistrationRequest : OsuWebRequest
|
2018-12-04 11:33:29 +00:00
|
|
|
|
{
|
|
|
|
|
internal string Username;
|
|
|
|
|
internal string Email;
|
|
|
|
|
internal string Password;
|
|
|
|
|
|
|
|
|
|
protected override void PrePerform()
|
|
|
|
|
{
|
2018-12-05 08:13:22 +00:00
|
|
|
|
AddParameter("user[username]", Username);
|
|
|
|
|
AddParameter("user[user_email]", Email);
|
|
|
|
|
AddParameter("user[password]", Password);
|
2018-12-04 11:33:29 +00:00
|
|
|
|
|
|
|
|
|
base.PrePerform();
|
|
|
|
|
}
|
2018-12-05 08:13:22 +00:00
|
|
|
|
|
|
|
|
|
public class RegistrationRequestErrors
|
|
|
|
|
{
|
|
|
|
|
public UserErrors User;
|
|
|
|
|
|
|
|
|
|
public class UserErrors
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("username")]
|
|
|
|
|
public string[] Username;
|
|
|
|
|
|
|
|
|
|
[JsonProperty("user_email")]
|
|
|
|
|
public string[] Email;
|
|
|
|
|
|
|
|
|
|
[JsonProperty("password")]
|
|
|
|
|
public string[] Password;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-12-04 11:33:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|