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

Add request for a user's scores in the top 1-500.

Open willyosu opened this issue 6 years ago • 1 comments

Proposal I've been looking for a way to get data for a user's scores that are in the top 1-500 of all beatmaps. Pretty much the same as osustats.ppy.sh but as a get request. For some users this would be quite lengthy but I'm sure there's some way around that. Practical applications for this would include commands bots to return the amount of top n (1 to n) scores a user has, or alternative ranking systems that weight map rank and length held (and more applications I probably haven't thought of).

Example Parameters

  • k - api key (required).
  • u - specify a user_id or a username to return metadata from (required).
  • m - mode (0 = osu!, 1 = Taiko, 2 = CtB, 3 = osu!mania). Optional, default value is 0.
  • rank - the maximum rank of a score to be returned (between 1 - 500)
  • limit - amount of results to return from the most recent. Optional, default will return all plays in the rank interval.
  • type - specify if u is a user_id or a username. Use string for usernames or id for user_ids. Optional, default behavior is automatic recognition (may be problematic for usernames made up of digits only).

Example Response

[{
	"beatmap_id"         : "7654321",
	"score"            : "1234567",
	"rank"            : "1",
	"count300"         : "300",
	"count100"         : "50",
	"count50"          : "10",
	"countmiss"        : "1",
	"maxcombo"         : "321",
	"countkatu"        : "10",
	"countgeki"        : "50",
	"perfect"          : "0",
	"enabled_mods"     : "76",
	"date"             : "2013-06-22 9:11:16",
	"rank"             : "SH",
	"pp"               : "1.3019",
}, { ... }, ...]

willyosu avatar May 27 '18 21:05 willyosu

This is currently unfeasible due to the overhead involved, but will come with v2 of the api

peppy avatar Jun 03 '18 05:06 peppy