ppy / osu-api

Public API for accessing osu! related data.
320 stars 16 forks source link

querying options for users and multiple user results #290

Open FlomoN opened 4 years ago

FlomoN commented 4 years ago

Hi folks, right now the only way to get user data is with the endpoint /get_user. Its use is however limited since you have to know the username or id in the first place and there is no way to query users by other parameters or retrieve data of multiple users (like with /get_beatmaps). It would be nice to be able to filter by something like: rank, pp, country, playtime, supporter, active, online...

My use case is a discord bot I'm developing that is tracking users play stats and supplies them with motivating challenges within osu to improve themselves. One of those challenges is to match against an equally ranked player (like a ghost player) and trying to achieve a better score than this players best play.

There is an issue quite similar to this request, #245 which would also solve my problem pretty well, but it got mentioned around ending up in issue #102 which is only about top 10.000 player rankings, but im also interested in players outside of the top 10.000.

With the current given tools I can only try and query a random id after the other (which takes ages with ~15 million registered players and the rate limit on top), but turns out only about 1 out of 20 players is actually active.

Kind regards, Flomon / Flokemon

peppy commented 4 years ago

This may be something we introduce in v2, but is out of scope for v1. The current available database indices do not cover such lookups, either.

FlomoN commented 4 years ago

Is something smaller in scope for now? Like #245 to retrieve single users by their rank, or do the database indices don't allow for that either? I would also be down to help with implementation if that helps :) Anyway thanks for the quick reply

peppy commented 4 years ago

Same issue.