From c7411c47d6310aeac529e23877ed0aab80415e11 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Apr 2017 19:48:53 +0900 Subject: [PATCH] Update User API stuff. --- osu.Game/Screens/Ranking/ResultsPageScore.cs | 4 ++-- osu.Game/Users/User.cs | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/osu.Game/Screens/Ranking/ResultsPageScore.cs b/osu.Game/Screens/Ranking/ResultsPageScore.cs index 88c9da802e..1c2a126211 100644 --- a/osu.Game/Screens/Ranking/ResultsPageScore.cs +++ b/osu.Game/Screens/Ranking/ResultsPageScore.cs @@ -371,8 +371,8 @@ namespace osu.Game.Screens.Ranking [BackgroundDependencyLoader] private void load(TextureStore textures) { - if (user.Cover?.Url != null) - cover.Texture = textures.Get(user.Cover?.Url); + if (!string.IsNullOrEmpty(user.CoverUrl)) + cover.Texture = textures.Get(user.CoverUrl); } } diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 4ce8781964..1361eefcff 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -13,24 +13,29 @@ namespace osu.Game.Users [JsonProperty(@"username")] public string Username; - //[JsonProperty(@"country")] - [JsonIgnore] + [JsonProperty(@"country_code")] + public string CountryCode; + + [JsonProperty(@"country")] public Country Country; //public Team Team; - [JsonProperty(@"colour")] + [JsonProperty(@"profile_colour")] public string Colour; - [JsonProperty(@"avatarUrl")] + [JsonProperty(@"avatar_url")] public string AvatarUrl; - [JsonProperty(@"cover")] - public UserCover Cover; + [JsonProperty(@"cover_url")] + public string CoverUrl; + + //[JsonProperty(@"cover")] + //public UserCover Cover; public class UserCover { - [JsonProperty(@"customUrl")] + [JsonProperty(@"custom_url")] public string CustomUrl; [JsonProperty(@"url")]