2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-06-08 11:06:58 +08:00
|
|
|
|
|
|
|
|
|
using Newtonsoft.Json;
|
2018-06-08 10:41:54 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests.Responses
|
|
|
|
|
{
|
|
|
|
|
public class APIUserMostPlayedBeatmap
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("beatmap_id")]
|
2019-04-25 16:36:17 +08:00
|
|
|
|
public int BeatmapID { get; set; }
|
2018-06-08 10:41:54 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("count")]
|
2019-04-25 16:36:17 +08:00
|
|
|
|
public int PlayCount { get; set; }
|
2018-06-08 10:41:54 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
2019-04-25 16:36:17 +08:00
|
|
|
|
private BeatmapInfo beatmap { get; set; }
|
2018-06-08 10:41:54 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
2019-04-25 16:36:17 +08:00
|
|
|
|
private APIBeatmapSet beatmapSet { get; set; }
|
2018-06-08 10:41:54 +08:00
|
|
|
|
|
|
|
|
|
public BeatmapInfo GetBeatmapInfo(RulesetStore rulesets)
|
|
|
|
|
{
|
|
|
|
|
BeatmapSetInfo setInfo = beatmapSet.ToBeatmapSet(rulesets);
|
|
|
|
|
beatmap.BeatmapSet = setInfo;
|
|
|
|
|
beatmap.Metadata = setInfo.Metadata;
|
|
|
|
|
return beatmap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|