diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2023-10-14 23:19:46 +0200 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2023-10-14 23:19:46 +0200 |
commit | 73461bd79f923caa44740f170213a4abb4743660 (patch) | |
tree | 89cbb7403b4bf3f86a505d70a8f255b6463a2c3f /OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs | |
parent | Maybe fix libmatrix bug with room creation (diff) | |
download | OsuFederatedBeatmapApi-73461bd79f923caa44740f170213a4abb4743660.tar.xz |
Diffstat (limited to 'OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs')
-rw-r--r-- | OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs b/OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs index 8cfcf0d..7d6b455 100644 --- a/OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs +++ b/OsuFederatedBeatmapApi/Events/State/BeatmapSetInfo.cs @@ -1,12 +1,46 @@ +using System.Text.Json.Serialization; using LibMatrix; using LibMatrix.EventTypes; using LibMatrix.Interfaces; namespace OsuFederatedBeatmapApi.Events.State; -[MatrixEvent(EventName = "gay.rory.beatmap_api.beatmap_set_info")] +[MatrixEvent(EventName = EventName)] public class BeatmapSetInfo : EventContent { + public const string EventName = "gay.rory.beatmap_api.beatmap_set_info"; + [JsonPropertyName("title")] + public string? Title { get; set; } + [JsonPropertyName("artist")] + public string? Artist { get; set; } + [JsonPropertyName("creator")] + public string? Creator { get; set; } + + [JsonPropertyName("beatmaps")] + public Dictionary<int, BeatmapInfo> Beatmaps { get; set; } = new(); + + public class BeatmapInfo { + [JsonPropertyName("difficulty")] + public string? Difficulty { get; set; } + + [JsonPropertyName("mode")] + public int? Mode { get; set; } + + [JsonPropertyName("difficulty_rating")] + public double? DifficultyRating { get; set; } + + [JsonPropertyName("total_length")] + public int? TotalLength { get; set; } + + [JsonPropertyName("bpm")] + public double? BPM { get; set; } + + [JsonPropertyName("max_combo")] + public int? MaxCombo { get; set; } + + // [JsonPropertyName("drain")] + // public double? Drain { get; set; } + } } |