1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 11:12:57 +08:00
osu-lazer/osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.1 KiB
C#
Raw Normal View History

2020-02-04 21:04:06 +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.
2022-06-17 15:37:17 +08:00
#nullable disable
2020-02-04 21:04:06 +08:00
using osu.Framework.IO.Network;
using osu.Game.Overlays.Rankings;
2020-02-04 21:04:06 +08:00
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests
{
public class GetSpotlightRankingsRequest : GetRankingsRequest<GetSpotlightRankingsResponse>
{
private readonly int spotlight;
private readonly RankingsSortCriteria sort;
2020-02-04 21:04:06 +08:00
public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight, RankingsSortCriteria sort)
2021-07-05 23:52:39 +08:00
: base(ruleset)
2020-02-04 21:04:06 +08:00
{
this.spotlight = spotlight;
this.sort = sort;
2020-02-04 21:04:06 +08:00
}
protected override WebRequest CreateWebRequest()
{
var req = base.CreateWebRequest();
req.AddParameter("spotlight", spotlight.ToString());
req.AddParameter("filter", sort.ToString().ToLowerInvariant());
2020-02-04 21:04:06 +08:00
return req;
}
protected override string TargetPostfix() => "charts";
}
}