Use limit in requests

This commit is contained in:
Andrei Zavatski
2019-07-15 13:31:57 +03:00
parent 60adac23b4
commit 111541fe7a
4 changed files with 16 additions and 8 deletions

View File

@ -10,13 +10,15 @@ namespace osu.Game.Online.API.Requests
{
private readonly long userId;
private readonly int offset;
private readonly int limit;
public GetUserMostPlayedBeatmapsRequest(long userId, int offset = 0)
public GetUserMostPlayedBeatmapsRequest(long userId, int offset = 0, int limit = 5)
{
this.userId = userId;
this.offset = offset;
this.limit = limit;
}
protected override string Target => $@"users/{userId}/beatmapsets/most_played?offset={offset}";
protected override string Target => $@"users/{userId}/beatmapsets/most_played?offset={offset}&limit={limit}";
}
}