make pagination work and remove duplication in RanksSection

This commit is contained in:
Jorolf
2017-09-21 22:07:23 +02:00
parent 5b90f45691
commit 72141935e8
7 changed files with 121 additions and 305 deletions

View File

@ -9,14 +9,16 @@ namespace osu.Game.Online.API.Requests
{
private readonly long userId;
private readonly ScoreType type;
private readonly int offset;
public GetUserScoresRequest(long userId, ScoreType type)
public GetUserScoresRequest(long userId, ScoreType type, int offset = 0)
{
this.userId = userId;
this.type = type;
this.offset = offset;
}
protected override string Target => $@"users/{userId}/scores/{type.ToString().ToLower()}";
protected override string Target => $@"users/{userId}/scores/{type.ToString().ToLower()}?offset={offset}";
}
public enum ScoreType