ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
970 stars 381 forks source link

(minor issue) ranking API not giving values in order #6454

Closed reigenatk closed 4 years ago

reigenatk commented 4 years ago

Hello, first off this isn't a huge issue by any means but I don't think this is intentional. I've been sending get requests to the following endpoint to look at the leaderboards:

"https://osu.ppy.sh/api/v2/rankings/osu/performance?cursor[page]=1" for instance, to get rank 1-50. It returns an array of size 50 with the user information and all is good

But as I get to the end (since there are 10000 total), "https://osu.ppy.sh/api/v2/rankings/osu/performance?cursor[page]=200" the rankings become jumbled out of order in the array, with some not in the right place. It also doesn't end on rank 10,000 like you'd expect. It starts sending duplicate information (rank 9981's info was sent twice for example), as shown in the screenshot below.

image

What is the cause of this? And is there any way it can be fixed? The reason I care is because I'm trying to create an app to track pp requirements for rank milestones (2 digit, 3 digit, 4 digit) and can't do so if the values aren't accurate. I know the API is still a WIP though too.

reigenatk commented 4 years ago

Wait, I think this is a really pointless issue actually... I didn't notice that the pp is still ordered in the correct way. I guess its because the server didn't update the rank in time for it to be displayed correctly? But the values should be accurate. Anyways I don't think this is worth discussion anymore because I can still use those values. Thanks!