mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Fill more json fields.
This commit is contained in:
parent
53bd22cf9c
commit
273e2b4a3c
@ -7,9 +7,9 @@ namespace osu.Game.Online.API.Requests
|
|||||||
{
|
{
|
||||||
public class GetUserRequest : APIRequest<User>
|
public class GetUserRequest : APIRequest<User>
|
||||||
{
|
{
|
||||||
private int? userId;
|
private long? userId;
|
||||||
|
|
||||||
public GetUserRequest(int? userId = null)
|
public GetUserRequest(long? userId = null)
|
||||||
{
|
{
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
|
|
||||||
@ -11,17 +12,20 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"id")]
|
[JsonProperty(@"id")]
|
||||||
public long Id = 1;
|
public long Id = 1;
|
||||||
|
|
||||||
|
[JsonProperty(@"joinDate")]
|
||||||
|
public string JoinDate;
|
||||||
|
|
||||||
[JsonProperty(@"username")]
|
[JsonProperty(@"username")]
|
||||||
public string Username;
|
public string Username;
|
||||||
|
|
||||||
[JsonProperty(@"country_code")]
|
|
||||||
public string CountryCode;
|
|
||||||
|
|
||||||
[JsonProperty(@"country")]
|
[JsonProperty(@"country")]
|
||||||
public Country Country;
|
public Country Country;
|
||||||
|
|
||||||
public Bindable<UserStatus> Status = new Bindable<UserStatus>();
|
public Bindable<UserStatus> Status = new Bindable<UserStatus>();
|
||||||
|
|
||||||
|
[JsonProperty(@"age")]
|
||||||
|
public int Age;
|
||||||
|
|
||||||
//public Team Team;
|
//public Team Team;
|
||||||
|
|
||||||
[JsonProperty(@"profile_colour")]
|
[JsonProperty(@"profile_colour")]
|
||||||
@ -47,5 +51,74 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"id")]
|
[JsonProperty(@"id")]
|
||||||
public int? Id;
|
public int? Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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")]
|
||||||
|
public string Intrerests;
|
||||||
|
|
||||||
|
[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;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty(@"defaultStatistics")]
|
||||||
|
public UserStatistics Statistics;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
64
osu.Game/Users/UserStatistics.cs
Normal file
64
osu.Game/Users/UserStatistics.cs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Game.Users
|
||||||
|
{
|
||||||
|
public class UserStatistics
|
||||||
|
{
|
||||||
|
[JsonProperty(@"level")]
|
||||||
|
public LevelInfo Level;
|
||||||
|
|
||||||
|
public class LevelInfo
|
||||||
|
{
|
||||||
|
[JsonProperty(@"current")]
|
||||||
|
public int Current;
|
||||||
|
|
||||||
|
[JsonProperty(@"progress")]
|
||||||
|
public int Progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty(@"pp")]
|
||||||
|
public decimal PP;
|
||||||
|
|
||||||
|
[JsonProperty(@"pp_rank")]
|
||||||
|
public int Rank;
|
||||||
|
|
||||||
|
[JsonProperty(@"ranked_score")]
|
||||||
|
public long RankedScore;
|
||||||
|
|
||||||
|
[JsonProperty(@"hit_accuracy")]
|
||||||
|
public decimal Accuracy;
|
||||||
|
|
||||||
|
[JsonProperty(@"play_count")]
|
||||||
|
public int PlayCount;
|
||||||
|
|
||||||
|
[JsonProperty(@"total_score")]
|
||||||
|
public long TotalScore;
|
||||||
|
|
||||||
|
[JsonProperty(@"total_hits")]
|
||||||
|
public int TotalHits;
|
||||||
|
|
||||||
|
[JsonProperty(@"maximum_combo")]
|
||||||
|
public int MaxCombo;
|
||||||
|
|
||||||
|
[JsonProperty(@"replays_watched_by_others")]
|
||||||
|
public int ReplayWatched;
|
||||||
|
|
||||||
|
[JsonProperty(@"grade_counts")]
|
||||||
|
public Grades GradesCount;
|
||||||
|
|
||||||
|
public class Grades
|
||||||
|
{
|
||||||
|
[JsonProperty(@"ss")]
|
||||||
|
public int SS;
|
||||||
|
|
||||||
|
[JsonProperty(@"s")]
|
||||||
|
public int S;
|
||||||
|
|
||||||
|
[JsonProperty(@"a")]
|
||||||
|
public int A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -471,6 +471,7 @@
|
|||||||
<Compile Include="Online\Multiplayer\Room.cs" />
|
<Compile Include="Online\Multiplayer\Room.cs" />
|
||||||
<Compile Include="Online\Multiplayer\RoomStatus.cs" />
|
<Compile Include="Online\Multiplayer\RoomStatus.cs" />
|
||||||
<Compile Include="Users\UserPanel.cs" />
|
<Compile Include="Users\UserPanel.cs" />
|
||||||
|
<Compile Include="Users\UserStatistics.cs" />
|
||||||
<Compile Include="Users\UserStatus.cs" />
|
<Compile Include="Users\UserStatus.cs" />
|
||||||
<Compile Include="Overlays\DirectOverlay.cs" />
|
<Compile Include="Overlays\DirectOverlay.cs" />
|
||||||
<Compile Include="Overlays\Direct\FilterControl.cs" />
|
<Compile Include="Overlays\Direct\FilterControl.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user