1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-25 18:57:18 +08:00

Add API models for teams

This commit is contained in:
Dean Herbert 2025-02-14 16:00:19 +09:00
parent 37db539226
commit 88188e8fcb
No known key found for this signature in database
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// 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 Newtonsoft.Json;
namespace osu.Game.Online.API.Requests.Responses
{
[JsonObject(MemberSerialization.OptIn)]
public class APITeam
{
[JsonProperty(@"id")]
public int Id { get; set; } = 1;
[JsonProperty(@"name")]
public string Name { get; set; } = string.Empty;
[JsonProperty(@"short_name")]
public string ShortName { get; set; } = string.Empty;
[JsonProperty(@"flag_url")]
public string FlagUrl = string.Empty;
}
}

View File

@ -55,6 +55,10 @@ namespace osu.Game.Online.API.Requests.Responses
set => countryCodeString = value.ToString();
}
[JsonProperty(@"team")]
[CanBeNull]
public APITeam Team { get; set; }
[JsonProperty(@"profile_colour")]
public string Colour;