mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Extend APILegacyScores request
This commit is contained in:
@ -42,6 +42,14 @@ namespace osu.Game.Online.API.Requests
|
|||||||
score.Beatmap = beatmap;
|
score.Beatmap = beatmap;
|
||||||
score.Ruleset = ruleset;
|
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()}";
|
protected override string Target => $@"beatmaps/{beatmap.OnlineBeatmapID}/scores{createQueryParameters()}";
|
||||||
|
@ -10,5 +10,17 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
{
|
{
|
||||||
[JsonProperty(@"scores")]
|
[JsonProperty(@"scores")]
|
||||||
public List<APILegacyScoreInfo> Scores;
|
public List<APILegacyScoreInfo> Scores;
|
||||||
|
|
||||||
|
[JsonProperty(@"userScore")]
|
||||||
|
public APILegacyUserTopScoreInfo UserScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class APILegacyUserTopScoreInfo
|
||||||
|
{
|
||||||
|
[JsonProperty(@"position")]
|
||||||
|
public int Position;
|
||||||
|
|
||||||
|
[JsonProperty(@"score")]
|
||||||
|
public APILegacyScoreInfo Score;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user