1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 21:13:01 +08:00

Update User API stuff.

This commit is contained in:
Dean Herbert 2017-04-20 19:48:53 +09:00
parent a174b7201e
commit c7411c47d6
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 14 additions and 9 deletions

View File

@ -371,8 +371,8 @@ namespace osu.Game.Screens.Ranking
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(TextureStore textures)
{ {
if (user.Cover?.Url != null) if (!string.IsNullOrEmpty(user.CoverUrl))
cover.Texture = textures.Get(user.Cover?.Url); cover.Texture = textures.Get(user.CoverUrl);
} }
} }

View File

@ -13,24 +13,29 @@ namespace osu.Game.Users
[JsonProperty(@"username")] [JsonProperty(@"username")]
public string Username; public string Username;
//[JsonProperty(@"country")] [JsonProperty(@"country_code")]
[JsonIgnore] public string CountryCode;
[JsonProperty(@"country")]
public Country Country; public Country Country;
//public Team Team; //public Team Team;
[JsonProperty(@"colour")] [JsonProperty(@"profile_colour")]
public string Colour; public string Colour;
[JsonProperty(@"avatarUrl")] [JsonProperty(@"avatar_url")]
public string AvatarUrl; public string AvatarUrl;
[JsonProperty(@"cover")] [JsonProperty(@"cover_url")]
public UserCover Cover; public string CoverUrl;
//[JsonProperty(@"cover")]
//public UserCover Cover;
public class UserCover public class UserCover
{ {
[JsonProperty(@"customUrl")] [JsonProperty(@"custom_url")]
public string CustomUrl; public string CustomUrl;
[JsonProperty(@"url")] [JsonProperty(@"url")]