mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add PaginatedWebRequest to handle request pagination
This commit is contained in:
@ -6,20 +6,17 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetUserRecentActivitiesRequest : APIRequest<List<APIRecentActivity>>
|
||||
public class GetUserRecentActivitiesRequest : PaginatedAPIRequest<List<APIRecentActivity>>
|
||||
{
|
||||
private readonly long userId;
|
||||
private readonly int offset;
|
||||
private readonly int limit;
|
||||
|
||||
public GetUserRecentActivitiesRequest(long userId, int offset = 0, int limit = 5)
|
||||
: base(offset, limit)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.offset = offset;
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
protected override string Target => $"users/{userId}/recent_activity?offset={offset}&limit={limit}";
|
||||
protected override string Target => $"users/{userId}/recent_activity";
|
||||
}
|
||||
|
||||
public enum RecentActivityType
|
||||
|
Reference in New Issue
Block a user