1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:52:55 +08:00

Extend APILegacyScores request

This commit is contained in:
Andrei Zavatski 2019-07-08 11:25:25 +03:00
parent ffc3c9f8f6
commit a0efd50f62
2 changed files with 20 additions and 0 deletions

View File

@ -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()}";

View File

@ -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;
}
}