mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:52:54 +08:00
Extend APILegacyScores request
This commit is contained in:
parent
ffc3c9f8f6
commit
a0efd50f62
@ -42,6 +42,14 @@ namespace osu.Game.Online.API.Requests
|
||||
score.Beatmap = beatmap;
|
||||
score.Ruleset = ruleset;
|
||||
}
|
||||
|
||||
var userScore = r.UserScore;
|
||||
|
||||
if (userScore != null)
|
||||
{
|
||||
userScore.Score.Beatmap = beatmap;
|
||||
userScore.Score.Ruleset = ruleset;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string Target => $@"beatmaps/{beatmap.OnlineBeatmapID}/scores{createQueryParameters()}";
|
||||
|
@ -10,5 +10,17 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
[JsonProperty(@"scores")]
|
||||
public List<APILegacyScoreInfo> Scores;
|
||||
|
||||
[JsonProperty(@"userScore")]
|
||||
public APILegacyUserTopScoreInfo UserScore;
|
||||
}
|
||||
|
||||
public class APILegacyUserTopScoreInfo
|
||||
{
|
||||
[JsonProperty(@"position")]
|
||||
public int Position;
|
||||
|
||||
[JsonProperty(@"score")]
|
||||
public APILegacyScoreInfo Score;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user