ListAllLeaderboards
{
"packetId": 1,
"messages": [
{
"service": "leaderboard",
"operation": "LIST_ALL_LEADERBOARDS",
"data": { }
}
]
}
Method returns list of all the leaderboards from the server based on gameId of the user.
Service | Operation |
---|---|
leaderboard | LIST_ALL_LEADERBOARDS |
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 leaderboardProxy = bridge.getLeaderboardServiceProxy();
var postResult = leaderboardProxy.listAllLeaderboards();
if (postResult.status == 200) {
// Success!
}
var leaderboardProxy = bridge.getLeaderboardServiceProxy();
var postResult = leaderboardProxy.listAllLeaderboards();
if (postResult.status == 200) {
// Success!
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"leaderboardListCount": 3,
"leaderboardList": [
{
"leaderboardId": "default",
"leaderboardType": "HIGH_VALUE",
"resetAt": 1473793200000,
"rotationType": "WEEKLY",
"currentVersionId": 1,
"maxRetainedCount": 5,
"retainedVersionsCount": 1,
"data": {}
},
{
"leaderboardId": "default1",
"leaderboardType": "HIGH_VALUE",
"resetAt": 1517428800000,
"rotationType": "WEEKLY",
"currentVersionId": 1,
"maxRetainedCount": 2,
"retainedVersionsCount": 1,
"data": {
"retainedCount": 7
}
}
]
}
}
]
}