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
|
|
|
|
|
{
|
|
|
|
|
public class GetUserBeatmapsRequest : APIRequest<List<GetBeatmapSetsResponse>>
|
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
public GetUserBeatmapsRequest(long userId, BeatmapSetType type, int offset = 0)
|
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
{
|
2017-11-07 02:46:28 +08:00
|
|
|
|
MostPlayed,
|
2017-11-04 01:25:21 +08:00
|
|
|
|
Favourite,
|
2017-11-07 02:46:28 +08:00
|
|
|
|
RankedAndApproved
|
2017-11-04 01:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|