GetGlobalLeaderboardPage
Retrieve a page of the global leaderboard specified by the start and end indexes (0-based).
Service | Operation |
---|---|
leaderboard | GET_GLOBAL_LEADERBOARD_PAGE |
Method Parameters
Parameter | Description |
---|---|
leaderboardId | The id of the leaderboard. |
sort | Sort order of page. ("HIGH_TO_LOW" or "LOW_TO_HIGH") |
startIndex | The rank at which to start the page. |
endIndex | The rank at which to end the page. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var leaderboardId = "default";
var sort = "HIGH_TO_LOW";
var startIndex = 0;
var endIndex = 9;
var leaderboardProxy = bridge.getLeaderboardServiceProxy();
var postResult = leaderboardProxy.getGlobalLeaderboardPage(leaderboardId, sort, startIndex, endIndex);
if (postResult.status == 200) {
// Success!
}
{
"service": "leaderboard",
"operation": "GET_GLOBAL_LEADERBOARD_PAGE",
"data": {
"leaderboardId": "default",
"sort": "HIGH_TO_LOW",
"startIndex": 0,
"endIndex": 9
}
}