1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Update API response model to accept array of tournament banners

This commit is contained in:
Salman Ahmed 2023-10-29 01:43:49 +03:00
parent bb2da97096
commit ec9ae12bbd
2 changed files with 24 additions and 8 deletions

View File

@ -121,12 +121,29 @@ namespace osu.Game.Tests.Visual.Online
Data = Enumerable.Range(2345, 45).Concat(Enumerable.Range(2109, 40)).ToArray() Data = Enumerable.Range(2345, 45).Concat(Enumerable.Range(2109, 40)).ToArray()
}, },
}, },
TournamentBanner = new TournamentBanner TournamentBanners = new[]
{ {
Id = 13926, new TournamentBanner
TournamentId = 35, {
ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2022/profile/winner_US.jpg", Id = 15588,
Image = "https://assets.ppy.sh/tournament-banners/official/owc2022/profile/winner_US@2x.jpg", TournamentId = 41,
ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_CN.jpg",
Image = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_CN@2x.jpg"
},
new TournamentBanner
{
Id = 15589,
TournamentId = 41,
ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_PH.jpg",
Image = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_PH@2x.jpg"
},
new TournamentBanner
{
Id = 15590,
TournamentId = 41,
ImageLowRes = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_CL.jpg",
Image = "https://assets.ppy.sh/tournament-banners/official/owc2023/profile/supporter_CL@2x.jpg"
}
}, },
Badges = new[] Badges = new[]
{ {

View File

@ -234,9 +234,8 @@ namespace osu.Game.Online.API.Requests.Responses
set => Statistics.RankHistory = value; set => Statistics.RankHistory = value;
} }
[JsonProperty(@"active_tournament_banner")] [JsonProperty(@"active_tournament_banners")]
[CanBeNull] public TournamentBanner[] TournamentBanners;
public TournamentBanner TournamentBanner;
[JsonProperty("badges")] [JsonProperty("badges")]
public Badge[] Badges; public Badge[] Badges;