2017-11-04 01:25:21 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-11-07 17:38:10 +08:00
|
|
|
|
using Humanizer;
|
2017-11-04 01:25:21 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
|
{
|
2017-11-27 05:06:03 +08:00
|
|
|
|
public class GetUserBeatmapsRequest : APIRequest<List<GetBeatmapSetsResponse>>
|
2017-11-04 01:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
private readonly long userId;
|
|
|
|
|
private readonly int offset;
|
2017-11-07 17:38:10 +08:00
|
|
|
|
private readonly BeatmapSetType type;
|
2017-11-04 01:25:21 +08:00
|
|
|
|
|
2017-11-27 05:06:03 +08:00
|
|
|
|
public GetUserBeatmapsRequest(long userId, BeatmapSetType type, int offset = 0)
|
2017-11-04 01:25:21 +08:00
|
|
|
|
{
|
|
|
|
|
this.userId = userId;
|
|
|
|
|
this.offset = offset;
|
2017-11-07 17:38:10 +08:00
|
|
|
|
this.type = type;
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-07 17:38:10 +08:00
|
|
|
|
protected override string Target => $@"users/{userId}/beatmapsets/{type.ToString().Underscore()}?offset={offset}";
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum BeatmapSetType
|
|
|
|
|
{
|
|
|
|
|
Favourite,
|
2017-11-14 13:26:44 +08:00
|
|
|
|
RankedAndApproved,
|
|
|
|
|
Unranked,
|
|
|
|
|
Graveyard
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|