2019-01-24 17:43:03 +09:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-11-03 20:25:21 +03:00
|
|
|
|
using System.Collections.Generic;
|
2022-06-20 15:02:15 +02:00
|
|
|
|
using osu.Game.Extensions;
|
2018-06-08 11:41:54 +09:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-11-03 20:25:21 +03:00
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
|
{
|
2019-07-19 15:33:09 +09:00
|
|
|
|
public class GetUserBeatmapsRequest : PaginatedAPIRequest<List<APIBeatmapSet>>
|
2017-11-03 20:25:21 +03:00
|
|
|
|
{
|
|
|
|
|
private readonly long userId;
|
2019-07-19 15:33:09 +09:00
|
|
|
|
|
2017-11-07 12:38:10 +03:00
|
|
|
|
private readonly BeatmapSetType type;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2022-04-19 02:48:34 +03:00
|
|
|
|
public GetUserBeatmapsRequest(long userId, BeatmapSetType type, PaginationParameters pagination)
|
2022-04-19 02:04:23 +03:00
|
|
|
|
: base(pagination)
|
2017-11-03 20:25:21 +03:00
|
|
|
|
{
|
|
|
|
|
this.userId = userId;
|
2017-11-07 12:38:10 +03:00
|
|
|
|
this.type = type;
|
2017-11-03 20:25:21 +03:00
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2022-06-20 15:02:15 +02:00
|
|
|
|
protected override string Target => $@"users/{userId}/beatmapsets/{type.ToString().ToSnakeCase()}";
|
2017-11-03 20:25:21 +03:00
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-11-03 20:25:21 +03:00
|
|
|
|
public enum BeatmapSetType
|
|
|
|
|
{
|
|
|
|
|
Favourite,
|
2021-07-20 21:48:38 +02:00
|
|
|
|
Ranked,
|
2019-08-01 11:06:29 +03:00
|
|
|
|
Loved,
|
2021-07-20 21:48:38 +02:00
|
|
|
|
Pending,
|
2022-04-22 07:55:39 +03:00
|
|
|
|
Guest,
|
2022-12-06 23:36:11 -08:00
|
|
|
|
Graveyard,
|
|
|
|
|
Nominated,
|
2017-11-03 20:25:21 +03:00
|
|
|
|
}
|
|
|
|
|
}
|