2019-01-24 16:43:03 +08: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 19:33:29 +08:00
|
|
|
|
|
2023-01-13 14:20:18 +08:00
|
|
|
|
using System;
|
2018-12-05 16:13:22 +08:00
|
|
|
|
using Newtonsoft.Json;
|
2018-12-04 19:33:29 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API
|
|
|
|
|
{
|
2020-01-16 11:51:43 +08:00
|
|
|
|
public class RegistrationRequest : OsuWebRequest
|
2018-12-04 19:33:29 +08:00
|
|
|
|
{
|
2023-01-13 14:20:18 +08:00
|
|
|
|
internal string Username = string.Empty;
|
|
|
|
|
internal string Email = string.Empty;
|
|
|
|
|
internal string Password = string.Empty;
|
2018-12-04 19:33:29 +08:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
{
|
2023-01-13 14:20:18 +08:00
|
|
|
|
public UserErrors? User;
|
2018-12-05 16:13:22 +08:00
|
|
|
|
|
|
|
|
|
public class UserErrors
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("username")]
|
2023-01-13 14:20:18 +08:00
|
|
|
|
public string[] Username = Array.Empty<string>();
|
2018-12-05 16:13:22 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("user_email")]
|
2023-01-13 14:20:18 +08:00
|
|
|
|
public string[] Email = Array.Empty<string>();
|
2018-12-05 16:13:22 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("password")]
|
2023-01-13 14:20:18 +08:00
|
|
|
|
public string[] Password = Array.Empty<string>();
|
2018-12-05 16:13:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-12-04 19:33:29 +08:00
|
|
|
|
}
|
|
|
|
|
}
|