forum

APIv1 how to get multiple users from single get_user call?

posted
Total Posts
6
Topic Starter
JungspylieSushi
According to https://github.com/ppy/osu-api/wiki#apiget_user get_user returns a list of users.
How do I give multiple user_ids, so that with a single call, the API returns a list of multiple players?
api/get_user?k=(API_key)&type=id&u=(user_id) gives me a list of only 1 player,
api/get_user?k=(API_key)&type=id&u=(user_id)&u=(user_id)&u=(user_id) still only returns 1 player.
The problem is, I could make a loop that makes a call for every single user, but there could be to many users for the call limit of 60 per minute.

Situation: Get all user_ids from multiplayer lobby, then get every userprofile for the username.
Multiplayer data + user name/id will be placed in a excel file.
abraker
You can't. It's designed to be one call per user
Topic Starter
JungspylieSushi
Does the APIv2 support multiple users per call or is it the same as with APIv1?
Under the undocumented tab in the APIv2 Documentation, you can get a Multiplayer object, does it contain the users also, or just the User_id like the APIv1?
abraker

JungspylieSushi wrote:

Does the APIv2 support multiple users per call or is it the same as with APIv1?
Under the undocumented tab in the APIv2 Documentation, you can get a Multiplayer object, does it contain the users also, or just the User_id like the APIv1?
What you want is docs/index.html#get-users
You can supply it up to 50 user ids and gives a UserCompact object
Topic Starter
JungspylieSushi

abraker wrote:

JungspylieSushi wrote:

Does the APIv2 support multiple users per call or is it the same as with APIv1?
Under the undocumented tab in the APIv2 Documentation, you can get a Multiplayer object, does it contain the users also, or just the User_id like the APIv1?
What you want is docs/index.html#get-users
You can supply it up to 50 user ids and gives a UserCompact object
Thank you very much for the help :)
Only 1 more thing: Does the get_users still count as only 1 API call if it is supplied with 50 users? Or does it count as 50?
abraker

JungspylieSushi wrote:

abraker wrote:

JungspylieSushi wrote:

Does the APIv2 support multiple users per call or is it the same as with APIv1?
Under the undocumented tab in the APIv2 Documentation, you can get a Multiplayer object, does it contain the users also, or just the User_id like the APIv1?
What you want is docs/index.html#get-users
You can supply it up to 50 user ids and gives a UserCompact object
Thank you very much for the help :)
Only 1 more thing: Does the get_users still count as only 1 API call if it is supplied with 50 users? Or does it count as 50?
It counts as 1 API call
Please sign in to reply.

New reply