mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Add additional responses
This commit is contained in:
parent
d9633fee64
commit
ec33a6ea87
39
osu.Game/Online/Multiplayer/MultiplayerScores.cs
Normal file
39
osu.Game/Online/Multiplayer/MultiplayerScores.cs
Normal file
@ -0,0 +1,39 @@
|
||||
// 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 System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Online.API.Requests;
|
||||
|
||||
namespace osu.Game.Online.Multiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// An object which contains scores and related data for fetching next pages.
|
||||
/// </summary>
|
||||
public class MultiplayerScores
|
||||
{
|
||||
/// <summary>
|
||||
/// To be used for fetching the next page.
|
||||
/// </summary>
|
||||
[JsonProperty("cursor")]
|
||||
public Cursor Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The scores.
|
||||
/// </summary>
|
||||
[JsonProperty("scores")]
|
||||
public List<MultiplayerScore> Scores { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total scores in the playlist item. Only provided via <see cref="IndexPlaylistScoresRequest"/>.
|
||||
/// </summary>
|
||||
[JsonProperty("total")]
|
||||
public int? TotalScores { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user's score, if any. Only provided via <see cref="IndexPlaylistScoresRequest"/>.
|
||||
/// </summary>
|
||||
[JsonProperty("user_score")]
|
||||
public MultiplayerScore UserScore { get; set; }
|
||||
}
|
||||
}
|
25
osu.Game/Online/Multiplayer/MultiplayerScoresAround.cs
Normal file
25
osu.Game/Online/Multiplayer/MultiplayerScoresAround.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.Online.Multiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// An object which stores scores higher and lower than the user's score.
|
||||
/// </summary>
|
||||
public class MultiplayerScoresAround
|
||||
{
|
||||
/// <summary>
|
||||
/// Scores sorted "higher" than the user's score, depending on the sorting order.
|
||||
/// </summary>
|
||||
[JsonProperty("higher")]
|
||||
public MultiplayerScores Higher { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Scores sorted "lower" than the user's score, depending on the sorting order.
|
||||
/// </summary>
|
||||
[JsonProperty("lower")]
|
||||
public MultiplayerScores Lower { get; set; }
|
||||
}
|
||||
}
|
14
osu.Game/Online/Multiplayer/MultiplayerScoresSort.cs
Normal file
14
osu.Game/Online/Multiplayer/MultiplayerScoresSort.cs
Normal file
@ -0,0 +1,14 @@
|
||||
// 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.
|
||||
|
||||
namespace osu.Game.Online.Multiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// Sorting option for indexing multiplayer scores.
|
||||
/// </summary>
|
||||
public enum MultiplayerScoresSort
|
||||
{
|
||||
Ascending,
|
||||
Descending
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user