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 identifier code | string |
name | Table name | string |
rotation | Refresh cycle never : Overall leaderboard rotation : Periodic leaderboard | string |
recordType | Record type highscore : Highest score lowscore : Lowest score sum : Cumulative score refresh : Latest score | string |
recordSortType | Sort method desc : Descending order asc : Ascending order | string |
recordPriority | Leaderboard record priority setting y : Set record priority n : Not set record priority | string |
rotationTimeOffset | Leaderboard offset time (Time difference input 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, it is required to provide values for rotationTimeOffset, rotationDate, rotationTime, and rotationPeriod.
danger
Pay attention to case sensitivity.
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"TableId": "string"
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
TableId | Table Code | string |