mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 22:27:25 +08:00
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
// 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.
|
|
|
|
using System;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace osu.Game.Online.API
|
|
{
|
|
public class RegistrationRequest : OsuWebRequest
|
|
{
|
|
internal string Username = string.Empty;
|
|
internal string Email = string.Empty;
|
|
internal string Password = string.Empty;
|
|
|
|
protected override void PrePerform()
|
|
{
|
|
AddParameter("user[username]", Username);
|
|
AddParameter("user[user_email]", Email);
|
|
AddParameter("user[password]", Password);
|
|
|
|
base.PrePerform();
|
|
}
|
|
|
|
public class RegistrationRequestErrors
|
|
{
|
|
public UserErrors? User;
|
|
|
|
public class UserErrors
|
|
{
|
|
[JsonProperty("username")]
|
|
public string[] Username = Array.Empty<string>();
|
|
|
|
[JsonProperty("user_email")]
|
|
public string[] Email = Array.Empty<string>();
|
|
|
|
[JsonProperty("password")]
|
|
public string[] Password = Array.Empty<string>();
|
|
}
|
|
}
|
|
}
|
|
}
|