mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 07:07:18 +08:00
Fix sort-by handling
> Add other cursor fields for paging different sortings > Sorted as they show in GUI code-wise for more readability for now
This commit is contained in:
parent
82190a07b8
commit
e321494f15
@ -13,8 +13,29 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class Cursor
|
||||
{
|
||||
[JsonProperty("title.raw")]
|
||||
public string Title;
|
||||
|
||||
[JsonProperty("artist.raw")]
|
||||
public string Artist;
|
||||
|
||||
[JsonProperty("beatmaps.difficultyrating")]
|
||||
public string Difficulty;
|
||||
|
||||
[JsonProperty("approved_date")]
|
||||
public string ApprovedDate;
|
||||
public string Ranked;
|
||||
|
||||
[JsonProperty("rating")]
|
||||
public string Rating;
|
||||
|
||||
[JsonProperty("play_count")]
|
||||
public string Plays;
|
||||
|
||||
[JsonProperty("favourite_count")]
|
||||
public string Favourites;
|
||||
|
||||
[JsonProperty("_score")]
|
||||
public string Relevance;
|
||||
|
||||
[JsonProperty("_id")]
|
||||
public string Id;
|
||||
@ -70,8 +91,24 @@ namespace osu.Game.Online.API.Requests
|
||||
|
||||
if (cursor != null)
|
||||
{
|
||||
if (cursor.Title != null)
|
||||
req.AddParameter("cursor[title.raw]", cursor.Title);
|
||||
if (cursor.Artist != null)
|
||||
req.AddParameter("cursor[artist.raw]", cursor.Artist);
|
||||
if (cursor.Difficulty != null)
|
||||
req.AddParameter("cursor[beatmaps.difficultyrating]", cursor.Difficulty);
|
||||
if (cursor.Ranked != null)
|
||||
req.AddParameter("cursor[approved_date]", cursor.Ranked);
|
||||
if (cursor.Rating != null)
|
||||
req.AddParameter("cursor[rating]", cursor.Rating);
|
||||
if (cursor.Plays != null)
|
||||
req.AddParameter("cursor[play_count]", cursor.Plays);
|
||||
if (cursor.Favourites != null)
|
||||
req.AddParameter("cursor[favourite_count]", cursor.Favourites);
|
||||
if (cursor.Relevance != null)
|
||||
req.AddParameter("cursor[_score]", cursor.Relevance);
|
||||
|
||||
req.AddParameter("cursor[_id]", cursor.Id);
|
||||
req.AddParameter("cursor[approved_date]", cursor.ApprovedDate);
|
||||
}
|
||||
|
||||
return req;
|
||||
|
Loading…
x
Reference in New Issue
Block a user