1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 14:27:31 +08:00
osu-lazer/osu.Game/Users/UserStatistics.cs

84 lines
2.0 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-06-15 21:13:40 +08:00
// 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 struct LevelInfo
2017-06-15 21:13:40 +08:00
{
[JsonProperty(@"current")]
public int Current;
[JsonProperty(@"progress")]
public int Progress;
}
[JsonProperty(@"pp")]
2017-06-15 23:25:13 +08:00
public decimal? PP;
2017-06-15 21:13:40 +08:00
2018-02-07 17:18:26 +08:00
[JsonProperty(@"pp_rank")] // the API sometimes only returns this value in condensed user responses
2018-02-07 17:04:32 +08:00
private int rank { set => Ranks.Global = value; }
2018-02-07 04:40:52 +08:00
[JsonProperty(@"rank")]
2018-02-07 17:04:32 +08:00
public UserRanks Ranks;
2017-06-15 21:13:40 +08:00
[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 ReplaysWatched;
2017-06-15 21:13:40 +08:00
[JsonProperty(@"grade_counts")]
public Grades GradesCount;
public struct Grades
2017-06-15 21:13:40 +08:00
{
[JsonProperty(@"ssh")]
public int SSPlus;
2017-06-15 21:13:40 +08:00
[JsonProperty(@"ss")]
public int SS;
[JsonProperty(@"sh")]
public int SPlus;
2017-06-15 21:13:40 +08:00
[JsonProperty(@"s")]
public int S;
[JsonProperty(@"a")]
public int A;
}
2018-02-07 17:04:32 +08:00
public struct UserRanks
{
[JsonProperty(@"global")]
public int Global;
[JsonProperty(@"country")]
public int Country;
}
2017-06-15 21:13:40 +08:00
}
}