2018-01-05 11:21:19 +00:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-02-07 04:59:30 +00:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-08-31 03:33:01 +00:00
|
|
|
|
|
2017-06-15 13:13:40 +00:00
|
|
|
|
using System;
|
2017-03-27 15:04:07 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2017-05-25 00:09:18 +00:00
|
|
|
|
using osu.Framework.Configuration;
|
2017-03-27 15:04:07 +00:00
|
|
|
|
|
2016-08-31 03:33:01 +00:00
|
|
|
|
namespace osu.Game.Users
|
|
|
|
|
{
|
|
|
|
|
public class User
|
|
|
|
|
{
|
2017-03-27 15:04:07 +00:00
|
|
|
|
[JsonProperty(@"id")]
|
|
|
|
|
public long Id = 1;
|
|
|
|
|
|
2017-06-16 12:32:11 +00:00
|
|
|
|
[JsonProperty(@"join_date")]
|
|
|
|
|
public DateTimeOffset JoinDate;
|
2017-06-15 13:13:40 +00:00
|
|
|
|
|
2017-03-27 15:04:07 +00:00
|
|
|
|
[JsonProperty(@"username")]
|
2016-08-31 03:33:01 +00:00
|
|
|
|
public string Username;
|
2017-03-27 15:04:07 +00:00
|
|
|
|
|
2017-04-20 10:48:53 +00:00
|
|
|
|
[JsonProperty(@"country")]
|
2017-03-19 03:09:58 +00:00
|
|
|
|
public Country Country;
|
2017-03-27 15:04:07 +00:00
|
|
|
|
|
2017-05-25 00:09:18 +00:00
|
|
|
|
public Bindable<UserStatus> Status = new Bindable<UserStatus>();
|
|
|
|
|
|
2017-06-15 13:13:40 +00:00
|
|
|
|
[JsonProperty(@"age")]
|
2017-06-15 15:25:13 +00:00
|
|
|
|
public int? Age;
|
2017-06-15 13:13:40 +00:00
|
|
|
|
|
2017-05-30 08:12:11 +00:00
|
|
|
|
public int GlobalRank;
|
|
|
|
|
|
|
|
|
|
public int CountryRank;
|
|
|
|
|
|
2017-04-19 07:02:18 +00:00
|
|
|
|
//public Team Team;
|
2017-03-27 15:04:07 +00:00
|
|
|
|
|
2017-04-20 10:48:53 +00:00
|
|
|
|
[JsonProperty(@"profile_colour")]
|
2017-03-27 15:04:07 +00:00
|
|
|
|
public string Colour;
|
2017-04-11 05:00:21 +00:00
|
|
|
|
|
2017-04-20 10:48:53 +00:00
|
|
|
|
[JsonProperty(@"avatar_url")]
|
2017-04-19 07:02:18 +00:00
|
|
|
|
public string AvatarUrl;
|
|
|
|
|
|
2017-04-20 10:48:53 +00:00
|
|
|
|
[JsonProperty(@"cover_url")]
|
2018-01-04 07:15:11 +00:00
|
|
|
|
public string CoverUrl
|
|
|
|
|
{
|
|
|
|
|
get { return Cover?.Url; }
|
|
|
|
|
set { Cover = new UserCover { Url = value }; }
|
|
|
|
|
}
|
2017-04-20 10:48:53 +00:00
|
|
|
|
|
2018-01-04 07:15:11 +00:00
|
|
|
|
[JsonProperty(@"cover")]
|
|
|
|
|
public UserCover Cover;
|
2017-04-19 07:02:18 +00:00
|
|
|
|
|
|
|
|
|
public class UserCover
|
|
|
|
|
{
|
2017-04-20 10:48:53 +00:00
|
|
|
|
[JsonProperty(@"custom_url")]
|
2017-04-19 07:02:18 +00:00
|
|
|
|
public string CustomUrl;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"url")]
|
|
|
|
|
public string Url;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"id")]
|
|
|
|
|
public int? Id;
|
|
|
|
|
}
|
2017-06-15 13:13:40 +00:00
|
|
|
|
|
|
|
|
|
[JsonProperty(@"isAdmin")]
|
|
|
|
|
public bool IsAdmin;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"isSupporter")]
|
|
|
|
|
public bool IsSupporter;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"isGMT")]
|
|
|
|
|
public bool IsGMT;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"isQAT")]
|
|
|
|
|
public bool IsQAT;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"isBNG")]
|
|
|
|
|
public bool IsBNG;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"is_active")]
|
|
|
|
|
public bool Active;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"interests")]
|
2017-12-08 11:54:36 +00:00
|
|
|
|
public string Interests;
|
2017-06-15 13:13:40 +00:00
|
|
|
|
|
|
|
|
|
[JsonProperty(@"occupation")]
|
|
|
|
|
public string Occupation;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"title")]
|
|
|
|
|
public string Title;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"location")]
|
|
|
|
|
public string Location;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"lastvisit")]
|
|
|
|
|
public DateTimeOffset LastVisit;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"twitter")]
|
|
|
|
|
public string Twitter;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"lastfm")]
|
|
|
|
|
public string Lastfm;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"skype")]
|
|
|
|
|
public string Skype;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"website")]
|
|
|
|
|
public string Website;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"playstyle")]
|
|
|
|
|
public string[] PlayStyle;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"playmode")]
|
|
|
|
|
public string PlayMode;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"profileOrder")]
|
|
|
|
|
public string[] ProfileOrder;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"kudosu")]
|
|
|
|
|
public KudosuCount Kudosu;
|
|
|
|
|
|
|
|
|
|
public class KudosuCount
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty(@"total")]
|
|
|
|
|
public int Total;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"available")]
|
|
|
|
|
public int Available;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-14 09:08:12 +00:00
|
|
|
|
[JsonProperty(@"statistics")]
|
2017-06-15 13:13:40 +00:00
|
|
|
|
public UserStatistics Statistics;
|
2017-06-25 16:38:00 +00:00
|
|
|
|
|
2017-09-14 09:08:12 +00:00
|
|
|
|
public class RankHistoryData
|
2017-06-25 16:38:00 +00:00
|
|
|
|
{
|
|
|
|
|
[JsonProperty(@"mode")]
|
|
|
|
|
public string Mode;
|
|
|
|
|
|
|
|
|
|
[JsonProperty(@"data")]
|
|
|
|
|
public int[] Data;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-14 09:08:12 +00:00
|
|
|
|
[JsonProperty(@"rankHistory")]
|
|
|
|
|
public RankHistoryData RankHistory;
|
2017-12-16 07:14:01 +00:00
|
|
|
|
|
|
|
|
|
public override string ToString() => Username;
|
2016-08-31 03:33:01 +00:00
|
|
|
|
}
|
|
|
|
|
}
|