mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add new beatmap search filter row "General"
This commit is contained in:
@ -15,6 +15,9 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class SearchBeatmapSetsRequest : APIRequest<SearchBeatmapSetsResponse>
|
||||
{
|
||||
[CanBeNull]
|
||||
public IReadOnlyCollection<SearchGeneral> General { get; }
|
||||
|
||||
public SearchCategory SearchCategory { get; }
|
||||
|
||||
public SortCriteria SortCriteria { get; }
|
||||
@ -45,6 +48,7 @@ namespace osu.Game.Online.API.Requests
|
||||
string query,
|
||||
RulesetInfo ruleset,
|
||||
Cursor cursor = null,
|
||||
IReadOnlyCollection<SearchGeneral> general = null,
|
||||
SearchCategory searchCategory = SearchCategory.Any,
|
||||
SortCriteria sortCriteria = SortCriteria.Ranked,
|
||||
SortDirection sortDirection = SortDirection.Descending,
|
||||
@ -59,6 +63,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.ruleset = ruleset;
|
||||
this.cursor = cursor;
|
||||
|
||||
General = general;
|
||||
SearchCategory = searchCategory;
|
||||
SortCriteria = sortCriteria;
|
||||
SortDirection = sortDirection;
|
||||
@ -75,6 +80,9 @@ namespace osu.Game.Online.API.Requests
|
||||
var req = base.CreateWebRequest();
|
||||
req.AddParameter("q", query);
|
||||
|
||||
if (General != null && General.Any())
|
||||
req.AddParameter("c", string.Join('.', General.Select(e => e.ToString().ToLowerInvariant())));
|
||||
|
||||
if (ruleset.ID.HasValue)
|
||||
req.AddParameter("m", ruleset.ID.Value.ToString());
|
||||
|
||||
|
Reference in New Issue
Block a user