1
0
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:
Andrei Zavatski 2019-11-01 21:49:50 +03:00
parent 1e73cf1025
commit 2f703090ef
6 changed files with 22 additions and 10 deletions

View File

@ -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 =>

View 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;
}
}

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -10,6 +10,6 @@ namespace osu.Game.Online.API.Requests
public class GetUsersResponse : ResponseWithCursor
{
[JsonProperty("ranking")]
public List<APIUser> Users;
public List<APIUserRankings> Users;
}
}