Create Table
Creates a leaderboard table.
Source Code
playNANOOHandlers.leaderboardTableCreate = function (args) {
var result = plugin['v20240301'].leaderboard.tableCreate({
parameters: {
uid: args.uid,
name: args.name,
rotation: args.rotation,
rotationTimeOffset: args.rotation === 'rotation' ? args.rotationTimeOffset : '',
rotationDate: args.rotation === 'rotation' ? args.rotationDate : '',
rotationTime: args.rotation === 'rotation' ? args.rotationTime : '',
rotationPeriod: args.rotation === 'rotation' ? args.rotationPeriod : '',
recordType: args.recordType,
recordSortType: args.recordSortType,
recordPriority: args.recordPriority,
}
});
if (result.statusCode === 200) {
const parse = JSON.parse(result.body.toString());
log.debug(parse.TableId);
return {
status: "success"
}
} else {
return {
status: "false"
}
}
}
Request Parameter
| Parameter | Description | Type |
|---|---|---|
| uid | Table identification code | string |
| name | Table name | string |
| rotation | Refresh cycle never : Overall leaderboard rotation : Periodic leaderboard | string |
| recordType | Record method highscore : Highest score lowscore : Lowest score sum : Cumulative score refresh : New score | string |
| recordSortType | Sort method desc : Descending order asc : Ascending order | string |
| recordPriority | Leaderboard record priority setting y : Set record priority n : Do not set record priority | string |
| rotationTimeOffset | Leaderboard time TimeOffset (Enter time difference based on UTC) | integer |
| rotationDate | Leaderboard start date (Enter in UTC time) | string |
| rotationTime | Leaderboard start time (Enter in UTC time) | string |
| rotationPeriod | Leaderboard refresh cycle | integer |
info
When creating a periodic leaderboard, you must provide values for rotationTimeOffset, rotationDate, rotationTime, and rotationPeriod.
danger
Pay attention to case sensitivity.
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"TableId": "string"
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| TableId | Table code | string |