osu-api icon indicating copy to clipboard operation
osu-api copied to clipboard

Retrieving the leaderboards

Open ekgame opened this issue 9 years ago • 1 comments

This is a proposal for an API endpoint for retrieving the leaderboards.


Leaderboard

URL

/api/get_leaderboard

Description

Retrieve user information from a certain leaderboard.

Potential use cases

  • Recording how leaderboards evolve.
  • Tracking players in a certain leaderboard.
  • Analyzing statistics of the top players.

Parameters

  • k - api key (required).
  • c- country. Optional, defaults to global leaderboard.
  • m- mode (0 = osu, 1 = taiko, 2 = catch, 3 = mania). Optional, defaults to 0.
  • type - the leaderboard type (performance, chart, score, kudosu).
  • offset - starting point in the leaderboard. Optional, defaults to 1.
  • limit - number of entries to retrieve. Optional, defaults to 50 (maximum?).

Response

[{
    "rank"    : "1",       // Starting with the "offset" parameter
    "user_id" : "1234567",
    "username": "Username",

    "ranked_score": "666666",
    "total_score" : "99999999",
    "chart_score" : "7777777",
    "level"       : "50.5050",

    "pp_raw"         : "3113",
    "pp_rank"        : "2442",
    "pp_country_rank": "1337",
	
    "playcount": "42",
    "accuracy" : "98.1234",
    "kudosu"   : "20"
},
...]

ekgame avatar Jan 30 '17 14:01 ekgame

#102 #108

thehowl avatar Jan 30 '17 14:01 thehowl