Osu-web: User recent scores API endpoint doesn't support nicknames

Created on 23 Jul 2020  路  7Comments  路  Source: ppy/osu-web

https://osu.ppy.sh/api/v2/users/7217455/scores/recent works but
https://osu.ppy.sh/api/v2/users/stanr/scores/recent doesn't

proposal api

Most helpful comment

the whole idea behind incrementing a major version is to allow breaking changes. there is nothing saying we will guarantee 1:1 parity. in fact i can outright say we won't.

All 7 comments

i think this is expected? not sure we should be allowing using usernames at every endpoint (you should search for a user, get their id then use it?)

It worked like that in api v1 so i expected it to be working the same way in v2 too

the whole idea behind incrementing a major version is to allow breaking changes. there is nothing saying we will guarantee 1:1 parity. in fact i can outright say we won't.

Sure, but it is pretty convenient to have nickname support anyway so i expected it because of that not because "its should work the same way!!!". I know how major versions work, thank you very much

I think it's fair, user ID is a lot more useful, so it makes sense to encourage people to use it and not usernames.

If your users wanted to keep a local copy of their top scores for some random reason, you'd have to ask every time for their username with every name change, whereas you can just store the ID, and it's guaranteed to never change.

In usual chatbot scenario scores are often needed not for recurring users but for any random user people want to get scores from, so storing IDs is pretty much useless. Calling api 2 times is not much of a problem, but i dont see why should we retrieve full user data every time we want to get their scores, especially considering that scores already have user data in them.

for a chat bot, you SHOULD have local storage to avoid doing lookups every time. having a username to userid mapping should take around 5 lines of code and help you out in other ways, so i'd recommend doing that.

Was this page helpful?
0 / 5 - 0 ratings