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