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