Closed tybug closed 5 years ago
Similarly, get_user_best
is missing the replay_available
field. This one is actually more important because it would require calling get_scores
for each of a user's top scores to get its id.
adding the replay_available field is fine, but username is completely wrong. if you're making this call you should already know the user's username.
Added
Is there a reason you think this way for get_user_best
but not get_user
? There are places where I only store user id, expecting to be able to retrieve all other information from it (easily, without an extra call to get_user
unless necessary). And on the user's side, it is counter intuitive to force the user to input both a user id and a username.
you shouldn't be making an extra call. you should be storing the user's metadata locally so you don't need to make the call in the first place.
In a project where all of a player's metadata was needed I would use some mapping of {user_id: [username, join_date, ...], ...}
, but I find myself only needing a username. I don't know how widespread this use case is, but I think there are other people who are between "I only need user id" and "I need all the metadata" who would benefit from username being included. I agree that it would be silly to provide all the metadata in calls like get_user_best
, but I think username
is a special and much used case, especially so because it can be changed by a user.
disagree
Fair enough! Thanks for adding replay_available
in any case
get_user
andget_scores
both return ausername
field. It would be useful for homogeneity ifget_user_best
did as well (avoids an extra api call on my end).