본문으로 건너뛰기

테이블 생성

리더보드 테이블을 생성 합니다.

소스 코드

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"
}
}
}

요청 파라미터

파라미터설명타입
uid테이블 식별 코드string
name테이블 이름string
rotation갱신 주기
never : 종합 리더보드
rotation : 기간 리더보드
string
recordType기록 방식
highscore : 최고 점수
lowscore : 최저 점수
sum : 누적 점수
refresh : 신규 점수
string
recordSortType정렬 방식
desc : 내림 차순
asc : 오름 차순
string
recordPriority리더보드 기록 우선 순위 설정
y : 기록 우선 순위 설정
n : 기록 우선 순위 미설정
string
rotationTimeOffset리더보드 시간 TimeOffset (UTC 기준으로 시간차이 입력)integer
rotationDate리더보드 시작 일자 (UTC 시간으로 입력)string
rotationTime리더보드 시작 시간 (UTC 시간으로 입력)string
rotationPeriod리더보드 갱신 주기integer
정보

기간제 리더보드를 생성하는 경우 rotationTimeOffset, rotationDate, rotationTime, rotationPeriod 값을 필수로 전달하세요.

위험

대소문자에 주의하세요.

통신 결과

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"TableId": "string"
}

통신 결과 상세 정보

데이터키설명타입
TableId테이블 코드string