2019-01-24 16:43:03 +08: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 17:19:50 +08:00
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2017-11-04 01:25:21 +08:00
|
|
|
|
using System.Collections.Generic;
|
2022-06-20 21:02:15 +08:00
|
|
|
|
using osu.Game.Extensions;
|
2018-06-08 10:41:54 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-04 01:25:21 +08:00
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
|
{
|
2019-07-19 14:33:09 +08:00
|
|
|
|
public class GetUserBeatmapsRequest : PaginatedAPIRequest<List<APIBeatmapSet>>
|
2017-11-04 01:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
private readonly long userId;
|
2019-07-19 14:33:09 +08:00
|
|
|
|
|
2017-11-07 17:38:10 +08:00
|
|
|
|
private readonly BeatmapSetType type;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-04-19 07:48:34 +08:00
|
|
|
|
public GetUserBeatmapsRequest(long userId, BeatmapSetType type, PaginationParameters pagination)
|
2022-04-19 07:04:23 +08:00
|
|
|
|
: base(pagination)
|
2017-11-04 01:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
this.userId = userId;
|
2017-11-07 17:38:10 +08:00
|
|
|
|
this.type = type;
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-06-20 21:02:15 +08:00
|
|
|
|
protected override string Target => $@"users/{userId}/beatmapsets/{type.ToString().ToSnakeCase()}";
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-04 01:25:21 +08:00
|
|
|
|
public enum BeatmapSetType
|
|
|
|
|
{
|
|
|
|
|
Favourite,
|
2021-07-21 03:48:38 +08:00
|
|
|
|
Ranked,
|
2019-08-01 16:06:29 +08:00
|
|
|
|
Loved,
|
2021-07-21 03:48:38 +08:00
|
|
|
|
Pending,
|
2022-04-22 12:55:39 +08:00
|
|
|
|
Guest,
|
2017-11-14 13:26:44 +08:00
|
|
|
|
Graveyard
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|