mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09: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:
@ -13,8 +13,29 @@ namespace osu.Game.Online.API.Requests
|
|||||||
{
|
{
|
||||||
public class Cursor
|
public class Cursor
|
||||||
{
|
{
|
||||||
|
[JsonProperty("title.raw")]
|
||||||
|
public string Title;
|
||||||
|
|
||||||
|
[JsonProperty("artist.raw")]
|
||||||
|
public string Artist;
|
||||||
|
|
||||||
|
[JsonProperty("beatmaps.difficultyrating")]
|
||||||
|
public string Difficulty;
|
||||||
|
|
||||||
[JsonProperty("approved_date")]
|
[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")]
|
[JsonProperty("_id")]
|
||||||
public string Id;
|
public string Id;
|
||||||
@ -70,8 +91,24 @@ namespace osu.Game.Online.API.Requests
|
|||||||
|
|
||||||
if (cursor != null)
|
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[_id]", cursor.Id);
|
||||||
req.AddParameter("cursor[approved_date]", cursor.ApprovedDate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return req;
|
return req;
|
||||||
|
Reference in New Issue
Block a user