2018-12-04 19:33:29 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-12-05 16:13:22 +08:00
|
|
|
|
using Newtonsoft.Json;
|
2018-12-04 19:33:29 +08:00
|
|
|
|
using osu.Framework.IO.Network;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API
|
|
|
|
|
{
|
2018-12-05 16:13:22 +08:00
|
|
|
|
public class RegistrationRequest : WebRequest
|
2018-12-04 19:33:29 +08:00
|
|
|
|
{
|
|
|
|
|
internal string Username;
|
|
|
|
|
internal string Email;
|
|
|
|
|
internal string Password;
|
|
|
|
|
|
|
|
|
|
protected override void PrePerform()
|
|
|
|
|
{
|
2018-12-05 16:13:22 +08:00
|
|
|
|
AddParameter("user[username]", Username);
|
|
|
|
|
AddParameter("user[user_email]", Email);
|
|
|
|
|
AddParameter("user[password]", Password);
|
2018-12-04 19:33:29 +08:00
|
|
|
|
|
|
|
|
|
base.PrePerform();
|
|
|
|
|
}
|
2018-12-05 16:13:22 +08: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 19:33:29 +08:00
|
|
|
|
}
|
|
|
|
|
}
|