I'm working with the API for several weeks (see my app here) and I'm trying to get the username of a particular user from its Stack Exchange ID.
It's possible by querying /users/{ids} but it returns data from one website at a time, so it will require more requests to get data from multiple users if theirs accounts belong to different websites.
Example:
- Get the websites associated to my Account ID and store a website and its
user_id
- Get the badges associated to my
user_id
(you may need to associatesite_URL
withapi_site_parameter
)
See how the network_user
node is present in every badge.
If a global method (returning data from the Stack Exchange network) was available, it should require less requests since it would only take user ids and return only one note per user.
Am I missing something?
If this data is not available, is it possible to add a simple /users/{ids}
which returns global data and not on a per-site basis?
Examples:
- Account #1 on Stack Overflow (ok): http://api.stackexchange.com/2.1/users/1?site=stackoverflow
- Account #1 on Stack Exchange (the method does not exist): http://api.stackexchange.com/2.1/users/1