SysEditLeaderboard
Edit a player or group entry leaderboard configuration.
Service | Operation |
---|---|
leaderboard | SYS_EDIT_LEADERBOARD |
Method Parameters
Parameter | Description |
---|---|
leaderboardId | Unique ID of the leaderboard configuration to create. |
leaderboardType | Type of leaderboard. Valid values: 'LAST_VALUE', 'HIGH_VALUE', 'LOW_VALUE', 'CUMULATIVE', 'ARCADE_HIGH', 'ARCADE_LOW'. |
rotationType | Type of rotation. Valid values: 'NEVER', 'DAILY', 'DAYS', 'WEEKLY', 'MONTHLY', 'YEARLY'. |
numDaysToRotate | Optional parameter. Required only if 'DAYS' rotation type; otherwise, null. |
rotationResetTimestampUtcMillis | UTC timestamp, in milliseconds, at which to rotate the leaderboard. |
retainedCount | The number of rotations (versions) of the leaderboard to retain. |
data | Optional parameter. Developer-defined data relevant to the created leaderboard. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
//cloud code only
//cloud code only
//cloud code only
//cloud code only
//cloud code only
// Cloud Code only. To view example, switch to the Cloud Code tab
var leaderboardId = "default";
var leaderboardType = "HIGH_VALUE";
var rotationType = "DAYS";
var numDaysToRotate = 5;
var rotationResetTimestampUtcMillis = Date.now();
var retainedCount = 2;
var data = { "street": "1309 Carling" };
var leaderboardProxy = bridge.getLeaderboardServiceProxy();
var retVal = leaderboardProxy.sysEditLeaderboard(
leaderboardId,
leaderboardType,
rotationType,
numDaysToRotate,
rotationResetTimestampUtcMillis,
retainedCount,
data
);
{
"service": "leaderboard",
"operation": "SYS_EDIT_LEADERBOARD",
"data": {
"leaderboardId": "default",
"leaderboardType": "HIGH_VALUE",
"rotationType": "DAYS",
"numDaysToRotate": 5,
"rotationResetTimestampUtcMillis": "[[#ts+60000]]",
"retainedCount": 2,
"data": {
"street": "1309 Carling"
}
}
}
JSON Response
{
"status": 200,
"data": null
}