mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Update API with latest web changes
This commit is contained in:
parent
1e73cf1025
commit
2f703090ef
@ -77,7 +77,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
var table = new CountriesTable(page)
|
||||
{
|
||||
Rankings = rankings,
|
||||
Rankings = rankings.Countries,
|
||||
};
|
||||
|
||||
LoadComponentAsync(table, t =>
|
||||
@ -104,7 +104,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
var table = new PerformanceTable(page)
|
||||
{
|
||||
Rankings = rankings,
|
||||
Rankings = rankings.Users,
|
||||
};
|
||||
|
||||
LoadComponentAsync(table, t =>
|
||||
@ -131,7 +131,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
var table = new ScoresTable(page)
|
||||
{
|
||||
Rankings = rankings,
|
||||
Rankings = rankings.Users,
|
||||
};
|
||||
|
||||
LoadComponentAsync(table, t =>
|
||||
|
15
osu.Game/Online/API/Requests/GetCountriesResponse.cs
Normal file
15
osu.Game/Online/API/Requests/GetCountriesResponse.cs
Normal file
@ -0,0 +1,15 @@
|
||||
// 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.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetCountriesResponse : ResponseWithCursor
|
||||
{
|
||||
[JsonProperty("ranking")]
|
||||
public List<APICountryRankings> Countries;
|
||||
}
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
// 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 osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetCountryRankingsRequest : GetRankingsRequest<APICountryRankings>
|
||||
public class GetCountryRankingsRequest : GetRankingsRequest<GetCountriesResponse>
|
||||
{
|
||||
public GetCountryRankingsRequest(RulesetInfo ruleset, int page = 1)
|
||||
: base(ruleset, page)
|
||||
|
@ -3,11 +3,10 @@
|
||||
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Rulesets;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public abstract class GetRankingsRequest<TModel> : APIRequest<List<TModel>>
|
||||
public abstract class GetRankingsRequest<TModel> : APIRequest<TModel>
|
||||
{
|
||||
private readonly RulesetInfo ruleset;
|
||||
private readonly int page;
|
||||
|
@ -2,12 +2,11 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetUserRankingsRequest : GetRankingsRequest<APIUserRankings>
|
||||
public class GetUserRankingsRequest : GetRankingsRequest<GetUsersResponse>
|
||||
{
|
||||
private readonly string country;
|
||||
private readonly UserRankingsType type;
|
||||
|
@ -10,6 +10,6 @@ namespace osu.Game.Online.API.Requests
|
||||
public class GetUsersResponse : ResponseWithCursor
|
||||
{
|
||||
[JsonProperty("ranking")]
|
||||
public List<APIUser> Users;
|
||||
public List<APIUserRankings> Users;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user