diff --git a/osu.Game/Beatmaps/BeatmapSetHypeStatus.cs b/osu.Game/Beatmaps/BeatmapSetHypeStatus.cs new file mode 100644 index 0000000000..8a576e396a --- /dev/null +++ b/osu.Game/Beatmaps/BeatmapSetHypeStatus.cs @@ -0,0 +1,25 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using Newtonsoft.Json; + +namespace osu.Game.Beatmaps +{ + /// + /// Contains information about the current hype status of a beatmap set. + /// + public class BeatmapSetHypeStatus + { + /// + /// The current number of hypes that the set has received. + /// + [JsonProperty(@"current")] + public int Current { get; set; } + + /// + /// The number of hypes required so that the set is eligible for nomination. + /// + [JsonProperty(@"required")] + public int Required { get; set; } + } +} diff --git a/osu.Game/Beatmaps/BeatmapSetNominationStatus.cs b/osu.Game/Beatmaps/BeatmapSetNominationStatus.cs new file mode 100644 index 0000000000..6a19616a97 --- /dev/null +++ b/osu.Game/Beatmaps/BeatmapSetNominationStatus.cs @@ -0,0 +1,25 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using Newtonsoft.Json; + +namespace osu.Game.Beatmaps +{ + /// + /// Contains information about the current nomination status of a beatmap set. + /// + public class BeatmapSetNominationStatus + { + /// + /// The current number of nominations that the set has received. + /// + [JsonProperty(@"current")] + public int Current { get; set; } + + /// + /// The number of nominations required so that the map is eligible for qualification. + /// + [JsonProperty(@"required")] + public int Required { get; set; } + } +} diff --git a/osu.Game/Beatmaps/IBeatmapSetOnlineInfo.cs b/osu.Game/Beatmaps/IBeatmapSetOnlineInfo.cs index 6def6ec21d..2982cf9c3a 100644 --- a/osu.Game/Beatmaps/IBeatmapSetOnlineInfo.cs +++ b/osu.Game/Beatmaps/IBeatmapSetOnlineInfo.cs @@ -102,5 +102,19 @@ namespace osu.Game.Beatmaps /// Total vote counts of user ratings on a scale of 0..10 where 0 is unused (probably will be fixed at API?). /// int[]? Ratings { get; } + + /// + /// Contains the current hype status of the beatmap set. + /// Non-null only for , , and sets. + /// + /// + /// See: https://github.com/ppy/osu-web/blob/93930cd02cfbd49724929912597c727c9fbadcd1/app/Models/Beatmapset.php#L155 + /// + BeatmapSetHypeStatus? HypeStatus { get; } + + /// + /// Contains the current nomination status of the beatmap set. + /// + BeatmapSetNominationStatus? NominationStatus { get; } } } diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs index 47536879b2..db4c45d03f 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs @@ -62,6 +62,12 @@ namespace osu.Game.Online.API.Requests.Responses [JsonProperty(@"track_id")] public int? TrackId { get; set; } + [JsonProperty(@"hype")] + public BeatmapSetHypeStatus? HypeStatus { get; set; } + + [JsonProperty(@"nominations_summary")] + public BeatmapSetNominationStatus? NominationStatus { get; set; } + public string Title { get; set; } = string.Empty; [JsonProperty("title_unicode")]