mirror of https://github.com/ppy/osu
Split out index-only response
This commit is contained in:
parent
ccc377ae6a
commit
88e179d8aa
|
@ -111,7 +111,7 @@ private void bindHandler(double delay = 0)
|
||||||
|
|
||||||
void success()
|
void success()
|
||||||
{
|
{
|
||||||
r.TriggerSuccess(new MultiplayerScores { Scores = roomScores });
|
r.TriggerSuccess(new IndexedMultiplayerScores { Scores = roomScores });
|
||||||
roomsReceived = true;
|
roomsReceived = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace osu.Game.Online.Multiplayer
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of scores for the specified playlist item.
|
/// Returns a list of scores for the specified playlist item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class IndexPlaylistScoresRequest : APIRequest<MultiplayerScores>
|
public class IndexPlaylistScoresRequest : APIRequest<IndexedMultiplayerScores>
|
||||||
{
|
{
|
||||||
private readonly int roomId;
|
private readonly int roomId;
|
||||||
private readonly int playlistItemId;
|
private readonly int playlistItemId;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
// 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 JetBrains.Annotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.Multiplayer
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A <see cref="MultiplayerScores"/> object returned via a <see cref="IndexPlaylistScoresRequest"/>.
|
||||||
|
/// </summary>
|
||||||
|
public class IndexedMultiplayerScores : MultiplayerScores
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The total scores in the playlist item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("total")]
|
||||||
|
public int? TotalScores { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user's score, if any.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("user_score")]
|
||||||
|
[CanBeNull]
|
||||||
|
public MultiplayerScore UserScore { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,18 +18,6 @@ public class MultiplayerScores : ResponseWithCursor
|
||||||
[JsonProperty("scores")]
|
[JsonProperty("scores")]
|
||||||
public List<MultiplayerScore> Scores { get; set; }
|
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; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The parameters to be used to fetch the next page.
|
/// The parameters to be used to fetch the next page.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue