mirror of
https://github.com/ppy/osu
synced 2025-01-29 17:23:03 +00:00
Add new statistic types to online info
This commit is contained in:
parent
04c2a9cd59
commit
c0b5b0e909
25
osu.Game/Beatmaps/BeatmapSetHypeStatus.cs
Normal file
25
osu.Game/Beatmaps/BeatmapSetHypeStatus.cs
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information about the current hype status of a beatmap set.
|
||||
/// </summary>
|
||||
public class BeatmapSetHypeStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// The current number of hypes that the set has received.
|
||||
/// </summary>
|
||||
[JsonProperty(@"current")]
|
||||
public int Current { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of hypes required so that the set is eligible for nomination.
|
||||
/// </summary>
|
||||
[JsonProperty(@"required")]
|
||||
public int Required { get; set; }
|
||||
}
|
||||
}
|
25
osu.Game/Beatmaps/BeatmapSetNominationStatus.cs
Normal file
25
osu.Game/Beatmaps/BeatmapSetNominationStatus.cs
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information about the current nomination status of a beatmap set.
|
||||
/// </summary>
|
||||
public class BeatmapSetNominationStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// The current number of nominations that the set has received.
|
||||
/// </summary>
|
||||
[JsonProperty(@"current")]
|
||||
public int Current { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of nominations required so that the map is eligible for qualification.
|
||||
/// </summary>
|
||||
[JsonProperty(@"required")]
|
||||
public int Required { get; set; }
|
||||
}
|
||||
}
|
@ -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?).
|
||||
/// </summary>
|
||||
int[]? Ratings { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the current hype status of the beatmap set.
|
||||
/// Non-null only for <see cref="BeatmapSetOnlineStatus.WIP"/>, <see cref="BeatmapSetOnlineStatus.Pending"/>, and <see cref="BeatmapSetOnlineStatus.Qualified"/> sets.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See: https://github.com/ppy/osu-web/blob/93930cd02cfbd49724929912597c727c9fbadcd1/app/Models/Beatmapset.php#L155
|
||||
/// </remarks>
|
||||
BeatmapSetHypeStatus? HypeStatus { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the current nomination status of the beatmap set.
|
||||
/// </summary>
|
||||
BeatmapSetNominationStatus? NominationStatus { get; }
|
||||
}
|
||||
}
|
||||
|
@ -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")]
|
||||
|
Loading…
Reference in New Issue
Block a user