Retrieve Leaderboard Data
When wanting to retrieve and show leaderboard data we have a few scenarios:
Get the leaderboard from the top
Get a single entry on the leaderboards
Get a single entry score + surrounding entries score
Get specific scores for a list of members
Leaderboards can be interacted with either by id or by key. We recommend you always use the key. This is primarily because you can set the keys to be descriptive for you if you have multiple leaderboards; that way, you can tell them apart in your game. But another reason is that the keys are the same across environments, meaning you do not have to change them when the game goes live. That is not true for the ids.
Get the leaderboard from the top
Get the first items
Get the continuation of the leaderboard
Get a single entry on the leaderboards
Get a single entry score + surrounding entries score
Here we do 2 calls; first, we get the single entry for the member we're looking for, then we do another call to get the rest.
Get specific scores for a list of members
This can be used for doing things like friend leaderboards.
Last updated