diff --git a/osu.Game/Online/API/Requests/GetCountriesResponse.cs b/osu.Game/Online/API/Requests/GetCountriesResponse.cs index 7b65c6fadd..6624344b44 100644 --- a/osu.Game/Online/API/Requests/GetCountriesResponse.cs +++ b/osu.Game/Online/API/Requests/GetCountriesResponse.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using Newtonsoft.Json; -using osu.Game.Online.API.Requests.Responses; +using osu.Game.Users; namespace osu.Game.Online.API.Requests { public class GetCountriesResponse : ResponseWithCursor { [JsonProperty("ranking")] - public List Countries; + public List Countries; } } diff --git a/osu.Game/Online/API/Requests/GetUsersResponse.cs b/osu.Game/Online/API/Requests/GetUsersResponse.cs index c60bc71096..b301f551e3 100644 --- a/osu.Game/Online/API/Requests/GetUsersResponse.cs +++ b/osu.Game/Online/API/Requests/GetUsersResponse.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using Newtonsoft.Json; -using osu.Game.Online.API.Requests.Responses; +using osu.Game.Users; namespace osu.Game.Online.API.Requests { public class GetUsersResponse : ResponseWithCursor { [JsonProperty("ranking")] - public List Users; + public List Users; } } diff --git a/osu.Game/Online/API/Requests/Responses/APICountryRankings.cs b/osu.Game/Online/API/Requests/Responses/APICountryRankings.cs deleted file mode 100644 index 91086876a9..0000000000 --- a/osu.Game/Online/API/Requests/Responses/APICountryRankings.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using Newtonsoft.Json; -using osu.Game.Users; - -namespace osu.Game.Online.API.Requests.Responses -{ - public class APICountryRankings : CountryStatistics - { - [JsonProperty] - public Country Country; - } -} diff --git a/osu.Game/Online/API/Requests/Responses/APIUserRankings.cs b/osu.Game/Online/API/Requests/Responses/APIUserRankings.cs deleted file mode 100644 index 1cdb6ecb8c..0000000000 --- a/osu.Game/Online/API/Requests/Responses/APIUserRankings.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using Newtonsoft.Json; -using osu.Game.Users; - -namespace osu.Game.Online.API.Requests.Responses -{ - public class APIUserRankings : UserStatistics - { - [JsonProperty] - public User User; - } -} diff --git a/osu.Game/Overlays/Rankings/Tables/CountriesTable.cs b/osu.Game/Overlays/Rankings/Tables/CountriesTable.cs index f5e95f316e..878f85b346 100644 --- a/osu.Game/Overlays/Rankings/Tables/CountriesTable.cs +++ b/osu.Game/Overlays/Rankings/Tables/CountriesTable.cs @@ -7,12 +7,12 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Users.Drawables; using osuTK; -using osu.Game.Online.API.Requests.Responses; using System; +using osu.Game.Users; namespace osu.Game.Overlays.Rankings.Tables { - public class CountriesTable : RankingsTable + public class CountriesTable : RankingsTable { public CountriesTable(int page = 1) : base(page) @@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Rankings.Tables new TableColumn("Avg. Perf.", Anchor.Centre, new Dimension(GridSizeMode.AutoSize)), }; - protected override Drawable[] CreateContent(int index, APICountryRankings item) => new Drawable[] + protected override Drawable[] CreateContent(int index, CountryStatistics item) => new Drawable[] { new OsuSpriteText { diff --git a/osu.Game/Overlays/Rankings/Tables/PerformanceTable.cs b/osu.Game/Overlays/Rankings/Tables/PerformanceTable.cs index 7d4bd71526..010da07858 100644 --- a/osu.Game/Overlays/Rankings/Tables/PerformanceTable.cs +++ b/osu.Game/Overlays/Rankings/Tables/PerformanceTable.cs @@ -9,11 +9,11 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; using osu.Game.Users.Drawables; using osuTK; -using osu.Game.Online.API.Requests.Responses; +using osu.Game.Users; namespace osu.Game.Overlays.Rankings.Tables { - public class PerformanceTable : RankingsTable + public class PerformanceTable : RankingsTable { public PerformanceTable(int page = 1) : base(page) @@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Rankings.Tables new TableColumn("A", Anchor.Centre, new Dimension(GridSizeMode.AutoSize)), }; - protected override Drawable[] CreateContent(int index, APIUserRankings item) + protected override Drawable[] CreateContent(int index, UserStatistics item) { var content = new List { diff --git a/osu.Game/Overlays/Rankings/Tables/ScoresTable.cs b/osu.Game/Overlays/Rankings/Tables/ScoresTable.cs index 9ddd89914a..d40da63f7f 100644 --- a/osu.Game/Overlays/Rankings/Tables/ScoresTable.cs +++ b/osu.Game/Overlays/Rankings/Tables/ScoresTable.cs @@ -7,13 +7,13 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Users.Drawables; using osuTK; -using osu.Game.Online.API.Requests.Responses; using System.Collections.Generic; using osu.Game.Graphics.Containers; +using osu.Game.Users; namespace osu.Game.Overlays.Rankings.Tables { - public class ScoresTable : RankingsTable + public class ScoresTable : RankingsTable { public ScoresTable(int page = 1) : base(page) @@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Rankings.Tables new TableColumn("A", Anchor.Centre, new Dimension(GridSizeMode.AutoSize)), }; - protected override Drawable[] CreateContent(int index, APIUserRankings item) + protected override Drawable[] CreateContent(int index, UserStatistics item) { var content = new List { diff --git a/osu.Game/Users/CountryStatistics.cs b/osu.Game/Users/CountryStatistics.cs index 53fa70f0d4..000553c32b 100644 --- a/osu.Game/Users/CountryStatistics.cs +++ b/osu.Game/Users/CountryStatistics.cs @@ -7,6 +7,9 @@ namespace osu.Game.Users { public class CountryStatistics { + [JsonProperty] + public Country Country; + [JsonProperty(@"code")] public string FlagName; diff --git a/osu.Game/Users/UserStatistics.cs b/osu.Game/Users/UserStatistics.cs index 032ec2e05f..24f1f0b30e 100644 --- a/osu.Game/Users/UserStatistics.cs +++ b/osu.Game/Users/UserStatistics.cs @@ -10,6 +10,9 @@ namespace osu.Game.Users { public class UserStatistics { + [JsonProperty] + public User User; + [JsonProperty(@"level")] public LevelInfo Level;