1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +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]
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);
}
}

View File

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