mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
API implementation
This commit is contained in:
30
osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs
Normal file
30
osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs
Normal file
@ -0,0 +1,30 @@
|
||||
// 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.
|
||||
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetSpotlightRankingsRequest : GetRankingsRequest<GetSpotlightRankingsResponse>
|
||||
{
|
||||
private readonly int spotlight;
|
||||
|
||||
public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight)
|
||||
: base(ruleset, 1)
|
||||
{
|
||||
this.spotlight = spotlight;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
{
|
||||
var req = base.CreateWebRequest();
|
||||
|
||||
req.AddParameter("spotlight", spotlight.ToString());
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
protected override string TargetPostfix() => "charts";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user