Documentation index for AI agents

GS2-Matchmaking SDK API 레퍼런스

각종 프로그래밍 언어용 GS2-Matchmaking SDK의 모델 사양과 API 레퍼런스

모델

Namespace

네임스페이스

네임스페이스는 하나의 프로젝트 내에서 동일한 서비스를 서로 다른 용도로 여러 개 이용하기 위한 엔티티입니다.
GS2의 각 서비스는 네임스페이스 단위로 관리됩니다. 네임스페이스가 다르면 동일한 서비스라도 완전히 독립된 데이터 공간으로 취급됩니다.

따라서 각 서비스의 이용을 시작하려면 먼저 네임스페이스를 생성해야 합니다.

상세
타입활성화 조건필수기본값값 제한설명
namespaceIdstring
~ 1024자네임스페이스 GRN
※ 서버가 자동으로 설정
namestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
매치메이킹 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
enableRatingboolfalse레이팅 계산 기능 활성화
Glicko-2 기반의 레이팅 계산 기능을 활성화할지 여부입니다.
활성화하면, 플레이어는 Vote 시스템을 통해 대전 결과를 제출하고 레이팅이 자동으로 갱신됩니다.
RatingModel 마스터 데이터의 설정이 필요합니다. 기본값은 false입니다.
enableDisconnectDetection문자열 열거형
enum {
  “disable”,
  “enable”
}
“disable”연결 끊김 감지
매치메이킹 중인 플레이어가 대기 중임을 정기적으로 보고해야 하는지 여부를 제어합니다.
활성화하면, 플레이어가 설정된 타임아웃 시간 내에 킵얼라이브를 전송하지 않을 경우 자동으로 개더링에서 퇴장 처리됩니다.
이를 통해 “고스트” 플레이어가 매치메이킹 완료를 방해하는 것을 방지합니다. 기본값은 “disable” 입니다.
정의설명
disable비활성화
enable활성화
disconnectDetectionTimeoutSecondsint{enableDisconnectDetection} == “enable”
✓※
15 ~ 600연결 끊김 감지 타임아웃(초)
킵얼라이브 보고 없이 플레이어를 연결 끊김으로 간주하여 개더링에서 퇴장시키기까지의 대기 시간(초).
연결 끊김 감지가 활성화된 경우에만 적용됩니다. 15에서 600초 범위로 지정합니다.
※ enableDisconnectDetection이(가) “enable” 이면 필수
createGatheringTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”개더링 생성 시 트리거 타입
새로운 개더링이 생성되었을 때 실행할 액션의 종류.
GS2-Realtime의 룸 생성을 트리거하여 실시간 통신을 시작하거나, GS2-Script를 실행하여 커스텀 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
createGatheringTriggerRealtimeNamespaceIdstring{createGatheringTriggerType} == “gs2_realtime”
✓※
~ 1024자개더링 생성 시 룸을 생성할 GS2-Realtime의 네임스페이스
※ createGatheringTriggerType이(가) “gs2_realtime” 이면 필수
createGatheringTriggerScriptIdstring{createGatheringTriggerType} == “gs2_script”
✓※
~ 1024자개더링 생성 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - createGathering
※ createGatheringTriggerType이(가) “gs2_script” 이면 필수
completeMatchmakingTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”매치메이킹 완료 시 트리거 타입
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때) 실행할 액션의 종류.
매칭된 플레이어를 대상으로 GS2-Realtime의 룸 생성을 트리거하거나, GS2-Script를 실행하여 커스텀 사후 처리 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
completeMatchmakingTriggerRealtimeNamespaceIdstring{completeMatchmakingTriggerType} == “gs2_realtime”
✓※
~ 1024자매치메이킹 완료 시 룸을 생성할 GS2-Realtime의 네임스페이스 GRN
※ completeMatchmakingTriggerType이(가) “gs2_realtime” 이면 필수
completeMatchmakingTriggerScriptIdstring{completeMatchmakingTriggerType} == “gs2_script”
✓※
~ 1024자매치메이킹 완료 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - completeMatchmaking
※ completeMatchmakingTriggerType이(가) “gs2_script” 이면 필수
enableCollaborateSeasonRating문자열 열거형
enum {
  “enable”,
  “disable”
}
“disable”시즌 레이팅 연계 활성화
시즌 기반 레이팅 계산을 위해 GS2-SeasonRating과의 연계를 활성화할지 여부.
활성화하면, 매치메이킹 완료 시 지정한 GS2-SeasonRating의 네임스페이스에 레이팅 계산 세션이 자동으로 생성됩니다.
기본값은 “disable” 입니다.
정의설명
enable활성화
disable비활성화
collaborateSeasonRatingNamespaceIdstring{enableCollaborateSeasonRating} == “enable”
✓※
~ 1024자시즌 레이팅 네임스페이스 GRN
매치메이킹 완료 시 레이팅 계산 세션이 생성되는 GS2-SeasonRating의 네임스페이스 GRN.
시즌 레이팅 연계가 활성화된 경우에만 적용됩니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 필수
collaborateSeasonRatingTtlint{enableCollaborateSeasonRating} == “enable”6060 ~ 7200시즌 레이팅 결과 TTL(초)
매치메이킹 완료 후, GS2-SeasonRating을 통한 대전 결과 전송을 받아들이는 최대 대기 시간(초).
이 기간 내에 결과가 전송되지 않으면, 레이팅 세션은 만료됩니다. 60에서 7200초 범위로 지정합니다. 기본값은 60입니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 활성화
changeRatingScriptScriptSetting레이팅 값이 변경되었을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - changeRating
joinNotificationNotificationSetting참가 알림
새로운 플레이어가 개더링에 참가했을 때의 푸시 알림 설정.
기존 참가자에게 새로운 플레이어가 참가했음을 알려, 게임 클라이언트가 매치메이킹 UI를 업데이트할 수 있도록 합니다.
leaveNotificationNotificationSetting이탈 알림
플레이어가 개더링에서 이탈했을 때의 푸시 알림 설정.
남은 참가자에게 플레이어가 이탈했음을 알려, 게임 클라이언트가 변경 사항을 반영할 수 있도록 합니다.
completeNotificationNotificationSetting완료 알림
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때)의 푸시 알림 설정.
모든 참가자에게 개더링이 가득 차 대전을 시작할 수 있음을 알립니다.
changeRatingNotificationNotificationSetting레이팅 변동 알림
투표 처리 후 플레이어의 레이팅 값이 변동되었을 때의 푸시 알림 설정.
영향을 받은 플레이어에게 새로운 레이팅을 알려, 게임 클라이언트가 업데이트된 값을 표시할 수 있도록 합니다.
logSettingLogSetting로그 출력 설정
API 요청/응답 로그를 GS2-Log에 출력하기 위한 설정.
설정하면, 매치메이킹 조작(개더링 생성·참가·이탈, 투표, 레이팅 변동 등)이 모니터링 및 분석을 위해 로그로 출력됩니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

TransactionSetting

트랜잭션 설정

트랜잭션 설정은 트랜잭션의 실행 방식, 정합성, 비동기 처리, 충돌 회피 메커니즘을 제어하는 설정입니다.
자동 실행(AutoRun), 원자적 실행(AtomicCommit), GS2-Distributor를 이용한 비동기 실행, 스크립트 결과의 일괄 적용, GS2-JobQueue를 통한 입수 액션의 비동기화 등을 조합하여 게임 로직에 맞는 견고한 트랜잭션 관리를 가능하게 합니다.

상세
타입활성화 조건필수기본값값 제한설명
enableAutoRunboolfalse발행한 트랜잭션을 서버 사이드에서 자동으로 실행할지 여부
enableAtomicCommitbool{enableAutoRun} == truefalse트랜잭션의 실행을 원자적으로 커밋할지 여부
※ enableAutoRun이(가) true 이면 활성화
transactionUseDistributorbool{enableAtomicCommit} == truefalse트랜잭션을 비동기 처리로 실행할지 여부
※ enableAtomicCommit이(가) true 이면 활성화
commitScriptResultInUseDistributorbool{transactionUseDistributor} == truefalse스크립트의 결과 커밋 처리를 비동기 처리로 실행할지 여부
※ transactionUseDistributor이(가) true 이면 활성화
acquireActionUseJobQueuebool{enableAtomicCommit} == truefalse입수 액션을 실행할 때 GS2-JobQueue를 사용할지 여부
※ enableAtomicCommit이(가) true 이면 활성화
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024자트랜잭션 실행에 사용하는 GS2-Distributor 네임스페이스 GRN
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024자트랜잭션 실행에 사용하는 GS2-JobQueue의 네임스페이스 GRN

ScriptSetting

스크립트 설정

GS2에서는 마이크로서비스의 이벤트에 연결하여 커스텀 스크립트를 실행할 수 있습니다.
이 모델은 스크립트 실행을 트리거하기 위한 설정을 보유합니다.

스크립트 실행 방식은 크게 두 가지로, 바로 “동기 실행"과 “비동기 실행"입니다.
동기 실행은 스크립트 실행이 완료될 때까지 처리가 블록됩니다.
대신 스크립트 실행 결과를 이용하여 API 실행을 중단시키거나 API 응답 내용을 제어할 수 있습니다.

한편, 비동기 실행에서는 스크립트 완료를 기다리기 위해 처리가 블록되는 일이 없습니다.
다만 스크립트 실행 결과를 이용하여 API 실행을 중단하거나 API 응답 내용을 변경할 수는 없습니다.
비동기 실행은 API의 응답 흐름에 영향을 주지 않으므로 원칙적으로 비동기 실행을 권장합니다.

비동기 실행에는 실행 방식이 두 가지 있으며, GS2-Script와 Amazon EventBridge가 있습니다.
Amazon EventBridge를 사용함으로써 Lua 이외의 언어로 처리를 작성할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
triggerScriptIdstring~ 1024자API 실행 시 동기적으로 실행되는 GS2-Script의 스크립트 GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다.
doneTriggerTargetType문자열 열거형
enum {
  “none”,
  “gs2_script”,
  “aws”
}
“none”비동기 스크립트의 실행 방법
비동기 실행에서 사용할 스크립트의 종류를 지정합니다.
“비동기 실행의 스크립트를 사용하지 않음(none)”, “GS2-Script를 사용함(gs2_script)”, “Amazon EventBridge를 사용함(aws)” 중에서 선택할 수 있습니다.
정의설명
none없음
gs2_scriptGS2-Script
awsAmazon EventBridge
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024자비동기 실행할 GS2-Script 스크립트 GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다.
※ doneTriggerTargetType이(가) “gs2_script” 이면 활성화
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024자비동기 실행 스크립트를 실행하는 GS2-JobQueue 네임스페이스 GRN
비동기 실행 스크립트를 직접 실행하지 않고 GS2-JobQueue를 경유하는 경우 GS2-JobQueue의 네임스페이스GRN을 지정합니다.
GS2-JobQueue를 이용해야 할 이유는 많지 않으므로, 특별한 이유가 없다면 지정할 필요는 없습니다.
※ doneTriggerTargetType이(가) “gs2_script” 이면 활성화

NotificationSetting

푸시 통지에 관한 설정

GS2의 마이크로서비스 내에서 어떠한 이벤트가 발생했을 때, 푸시 통지를 전송하기 위한 설정입니다.
여기서 말하는 푸시 통지란 GS2-Gateway가 제공하는 WebSocket 인터페이스를 경유하는 처리이며, 스마트폰의 푸시 통지와는 성질이 다릅니다.
예를 들어 매치메이킹이 완료되었을 때나 친구 요청이 도착했을 때 등, 게임 클라이언트의 조작과는 관계없이 상태가 변화했을 때 GS2-Gateway를 경유하여 푸시 통지를 함으로써, 게임 클라이언트는 상태 변화를 감지할 수 있습니다.

GS2-Gateway의 푸시 통지는 통지 대상 디바이스가 오프라인이었을 때 추가 처리로 모바일 푸시 통지를 전송할 수 있습니다.
모바일 푸시 통지를 잘 활용하면, 매치메이킹 중에 게임을 종료하더라도 모바일 푸시 통지를 사용하여 플레이어에게 알리고, 게임으로 복귀하도록 하는 흐름을 구현할 수 있을 가능성이 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
gatewayNamespaceIdstring“grn:gs2:{region}:{ownerId}:gateway:default”~ 1024자푸시 통지에 사용할 GS2-Gateway의 네임스페이스
“grn:gs2:“로 시작하는 GRN 형식으로 GS2-Gateway의 네임스페이스 ID를 지정합니다.
enableTransferMobileNotificationbool?false모바일 푸시 통지로 전달할지 여부
이 통지를 전송하려 할 때, 통지 대상 디바이스가 오프라인일 경우 모바일 푸시 통지로 전달할지 여부를 지정합니다.
soundstring{enableTransferMobileNotification} == true~ 1024자모바일 푸시 통지에서 사용할 사운드 파일명
여기서 지정한 사운드 파일명은 모바일 푸시 통지를 전송할 때 사용되며, 특별한 사운드로 통지를 출력할 수 있습니다.
※ enableTransferMobileNotification이(가) true 이면 활성화
enable문자열 열거형
enum {
  “Enabled”,
  “Disabled”
}
“Enabled”푸시 통지를 활성화할지 여부
정의설명
Enabled활성화
Disabled비활성화

LogSetting

로그 출력 설정

로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 출력하기 위해 사용되는 GS2-Log 네임스페이스의 식별자(Namespace ID)를 보관합니다.
로그 네임스페이스ID(loggingNamespaceId)에는 로그 데이터를 수집하여 저장하는 GS2-Log의 네임스페이스를 GRN 형식으로 지정합니다.
이 설정을 하면 설정된 네임스페이스 내에서 발생한 API 요청·응답 로그 데이터가 대상 GS2-Log 네임스페이스 쪽으로 출력됩니다.
GS2-Log에서는 실시간으로 로그가 제공되어 시스템 모니터링, 분석, 디버깅 등에 활용할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
loggingNamespaceIdstring
~ 1024자로그를 출력할 GS2-Log의 네임스페이스 GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다.

GitHubCheckoutSetting

GitHub에서 마스터 데이터를 체크아웃하는 설정

상세
타입활성화 조건필수기본값값 제한설명
apiKeyIdstring
~ 1024자GitHub API 키의 GRN
repositoryNamestring
~ 1024자리포지토리 이름
sourcePathstring
~ 1024자마스터 데이터(JSON) 파일 경로
referenceType문자열 열거형
enum {
  “commit_hash”,
  “branch”,
  “tag”
}
코드 출처
정의설명
commit_hash커밋 해시
branch브랜치
tag태그
commitHashstring{referenceType} == “commit_hash”
✓※
~ 1024자커밋 해시
※ referenceType이(가) “commit_hash” 이면 필수
branchNamestring{referenceType} == “branch”
✓※
~ 1024자브랜치 이름
※ referenceType이(가) “branch” 이면 필수
tagNamestring{referenceType} == “tag”
✓※
~ 1024자태그 이름
※ referenceType이(가) “tag” 이면 필수

Gathering

개더링

매치메이킹에 의해 모인 게임 플레이어 그룹을 나타내는 엔티티입니다.
매치메이킹용 파라미터를 여러 개 가지고 있으며, 파라미터를 종합적으로 판단하여 플레이어를 그룹화합니다.
플레이어는 자신의 역할·속성값·거부 리스트(함께 플레이하고 싶지 않은 사용자)를 지정하여 개더링에 참가합니다.
참가 시에는 속성값 범위 조건, 역할의 정원, 화이트리스트 제한(allowUserIds)이 검증됩니다.
모든 역할 슬롯이 정원에 도달하면 개더링은 완성 상태가 되어 매치메이킹이 완료됩니다.
개더링 이름은 UUID 형식으로 자동 생성되며, 유효기간을 설정하여 자동 정리(클린업)하는 것도 가능합니다.

상세
타입활성화 조건필수기본값값 제한설명
gatheringIdstring
~ 1024자개더링 GRN
※ 서버가 자동으로 설정
namestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
attributeRangesList<AttributeRange>[]0 ~ 5 items모집 조건
이 개더링에 참가하기 위해 플레이어가 충족해야 하는 속성 범위 조건의 목록입니다.
각 항목은 속성 이름과 허용되는 최소값·최대값 범위를 지정합니다.
플레이어 자신의 속성값이 이 범위 내에 있지 않으면 참가할 수 없습니다. 최대 5건.
capacityOfRolesList<CapacityOfRole>[]1 ~ 5 items모집 슬롯 목록
이 개더링의 모집 슬롯을 정의합니다.
각 항목은 역할 이름, 그 별칭, 그리고 해당 역할에 참가 가능한 최대 인원수를 지정합니다.
모든 역할 슬롯이 정원에 도달하면 매치메이킹이 완료됩니다. 최소 1건, 최대 5건.
allowUserIdsList<string>[]0 ~ 100 items참가 허용 사용자 ID 목록
이 게더링에 참가하는 것이 허용된 사용자 ID의 화이트리스트입니다.
지정한 경우, 목록에 포함된 사용자만 이 게더링의 매치메이킹에 참가할 수 있습니다.
친구 전용 매치메이킹이나 초대제 매치메이킹 시나리오에 유용합니다. 최대 100건.
metadatastring~ 1024자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
expiresAtlong게더링 유효 기간
이 게더링이 자동으로 만료되어 삭제되는 시각입니다.
이 시각까지 매치메이킹이 완료되지 않으면 게더링은 정리됩니다.
지정하지 않은 경우, 매치메이킹이 완료되거나 수동으로 삭제될 때까지 게더링이 유지됩니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

SeasonGathering

시즌 게더링

시즌 기간 동안 플레이어를 모으는 영속적인 게더링입니다.
매치메이킹 완료 후 해산하는 일반 게더링과 달리, 시즌 게더링은 시즌 동안 계속 존속하며 참가자를 축적합니다.
플레이어는 티어(GS2-Experience의 랭크에 기반)와 시즌 번호로 그룹화되며, 각 시즌 게더링에는 SeasonModel에서 정의된 최대 참가 인원 제한이 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
seasonGatheringIdstring
~ 1024자시즌 개더링 GRN
※ 서버가 자동으로 설정
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
namestring
UUID~ 128자시즌 게더링명
시즌 게더링 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
participantsList<string>[]0 ~ 1000 items참가자 사용자 ID 목록
이 시즌 게더링에 참가한 플레이어의 사용자 ID 목록입니다.
플레이어가 참가하면 이 목록에 추가되며, 최대 참가 인원에 도달할 때까지 시즌 동안 계속 증가합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

JoinedSeasonGathering

참가 중인 시즌 게더링

특정 시즌과 티어에서 플레이어가 어느 시즌 게더링에 참가하고 있는지를 추적하는 레코드입니다.
플레이어가 시즌 게더링에 참가할 때 자동으로 생성되며, 플레이어의 현재 게더링을 빠르게 조회하기 위한 인덱스 역할을 합니다.
각 플레이어는 시즌과 티어의 조합마다 최대 1개의 시즌 게더링에 소속될 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
joinedSeasonGatheringIdstring
~ 1024자참가 중인 시즌 개더링 GRN
※ 서버가 자동으로 설정
userIdstring
~ 128자사용자ID
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
seasonGatheringNamestring
~ 128자시즌 게더링명
이 플레이어가 참가하고 있는 시즌 게더링의 이름입니다.
동일 시즌·티어 내의 특정 시즌 게더링 엔티티를 참조하기 위해 사용됩니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정

Rating

레이팅

게임 플레이어별 현재 레이팅 값을 보유하는 엔티티입니다.
플레이어가 처음 레이팅이 적용된 매치메이킹에 참가했을 때 자동으로 생성됩니다.
레이팅은 Glicko-2 알고리즘을 사용하여 계산되며, 초기 레이트 값과 레이팅의 불확실성을 나타내는 Rating Deviation(rd)을 가집니다.
대전 횟수가 늘어남에 따라 레이트 값은 플레이어의 실제 실력에 수렴해 갑니다.

상세
타입활성화 조건필수기본값값 제한설명
ratingIdstring
~ 1024자레이팅 GRN
※ 서버가 자동으로 설정
namestring
~ 128자레이팅 이름
레이팅 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
rateValuefloat1500.00 ~ 65535.0레이트 값
Glicko-2 알고리즘으로 계산된 플레이어의 현재 레이팅 점수입니다.
RatingModel에서 정의된 초기값(일반적으로 1500.0)이 기본값입니다.
대전 결과와 상대의 상대적인 실력에 따라 값이 증감합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

Ballot

투표용지

레이팅이 적용된 매치메이킹 게임 종료 후, 각 플레이어가 대전 결과를 보고하기 위해 발급되는 투표용지입니다.
레이팅 모델 이름, 개더링 이름, 참가 인원수 등 대전의 컨텍스트 정보를 포함합니다.
각 플레이어는 서버에서 서명된 투표용지를 받아 게임 결과를 기입하여 Vote API에 제출합니다.
투표 시스템은 레이팅 계산을 확정하기 위해 제출된 투표용지의 50%를 초과하는 합의를 필요로 합니다.

상세
타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
ratingNamestring
~ 128자레이팅 이름
이 대전 후의 레이팅 계산에 사용할 RatingModel의 이름입니다.
이 대전의 결과 처리에 적용되는 레이팅 시스템의 파라미터(초기값, 변동성)를 지정합니다.
gatheringNamestring
~ 128자개더링 이름
대전 결과 보고 대상이 되는 개더링의 이름입니다.
특정 매치메이킹 세션을 식별하고, 동일한 대전의 모든 참가자로부터의 투표를 연결하기 위해 사용됩니다.
numberOfPlayerint
2 ~ 10참가 인원수
이 대전에 참가한 플레이어의 총 인원수입니다.
예상되는 투표 수 결정 및 합의 검증(플레이어의 50%를 초과하는 인원이 일치하는 결과를 제출해야 함)에 사용됩니다.
2에서 10 사이의 범위로 지정합니다.

Vote

투표 현황

레이팅 계산을 위한 최종 대전 결과를 결정하기 위해, 특정 대전의 투표용지를 집계하는 엔티티입니다.
각 Vote는 레이팅 모델명과 게더링명의 조합으로 식별됩니다.
대전 참가자로부터 투표용지가 수집되며, 일치하는 결과를 가진 투표가 충분히 제출되면(50% 초과 합의),
투표가 완료된 것으로 간주되어 참가자의 레이팅 값이 대전 결과에 따라 갱신됩니다.

상세
타입활성화 조건필수기본값값 제한설명
voteIdstring
~ 1024자투표 상황 GRN
※ 서버가 자동으로 설정
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
writtenBallotsList<WrittenBallot>[]0 ~ 10 items기재 완료 투표용지 목록
대전 참가자로부터 제출된 투표용지 모음입니다.
각 기재 완료 투표용지는 서명이 첨부된 투표용지와, 해당 참가자가 보고한 게임 결과(플레이어 순위)를 포함합니다.
예상 투표 수의 50%를 초과하여 일치하는 결과가 포함된 경우, 투표가 확정되고 레이팅 계산이 실행됩니다. 최대 10건.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정

RatingModel

레이팅 모델

GS2에서는 레이팅 알고리즘으로 Glicko-2를 채택하고 있습니다.
Glicko-2에는 여러 파라미터가 있지만, GS2-Matchmaking에서는 이를 종합적으로 나타내는 변동성이라는 하나의 파라미터로 통합하고 있습니다.
변동성은 변화의 크기를 나타내는 파라미터로, 값이 클수록 레이팅 값의 변동 폭이 커집니다.

상세
타입활성화 조건필수기본값값 제한설명
ratingModelIdstring
~ 1024자레이팅 모델 GRN
※ 서버가 자동으로 설정
namestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
initialValueint1500100 ~ 10000레이트 값의 초기값
플레이어가 처음 레이팅이 적용된 매치메이킹에 참가할 때 부여되는 시작 레이트 값입니다.
기본값은 1500입니다. 모든 플레이어는 동일한 레이팅에서 시작하며, 대전 결과에 따라 조정됩니다.
volatilityint1001 ~ 20000레이팅의 변동성
각 대전 후 레이트 값이 얼마나 변동하는지를 제어하는 Glicko-2의 파라미터입니다.
값이 클수록 레이팅의 변동 폭이 커져 더 빠르게 레이팅이 조정됩니다.
값이 작을수록 레이팅이 안정되어 완만하게 변화합니다. 기본값은 100입니다.

SeasonModel

시즌 모델

시즌 매치메이킹에서, 일정 기간 동안 유효한 영속 개더링의 기간·최대 참가 인원수·티어 연동 설정을 정의하는 마스터 데이터입니다.
GS2-Schedule을 통해 기간을 관리하며, 필요에 따라 GS2-Experience와 연동하여 동일한 티어 내에서 영속 개더링을 형성합니다.

상세
타입활성화 조건필수기본값값 제한설명
seasonModelIdstring
~ 1024자시즌 모델 GRN
※ 서버가 자동으로 설정
namestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
maximumParticipantsint
2 ~ 1000최대 참가 인원수
하나의 시즌 개더링에 참가할 수 있는 플레이어의 최대 인원수입니다.
이 상한에 도달하면 시즌 개더링은 만원 상태가 되어 더 이상 플레이어가 참가할 수 없게 됩니다.
2에서 1000 사이의 범위로 지정합니다.
experienceModelIdstring~ 1024자티어 관리용 경험치 모델 GRN
플레이어의 티어를 결정하기 위해 사용하는 GS2-Experience 경험치 모델의 GRN입니다.
이 경험치 모델에서의 플레이어 랭크가 매치메이킹의 티어로 사용되어, 비슷한 레벨의 플레이어끼리 그룹화됩니다.
지정하지 않으면 티어에 의한 그룹화가 비활성화되어, 레벨에 관계없이 모든 플레이어가 매칭됩니다.
challengePeriodEventIdstring
~ 1024자챌린지 기간 이벤트 GRN
이 시즌의 유효 기간을 정의하는 GS2-Schedule 이벤트의 GRN입니다.
이 이벤트가 활성화되어 있는 동안에만 시즌 개더링의 생성·참가가 가능합니다.
이벤트 기간이 종료되면 시즌이 종료되어 새로운 매치메이킹이 불가능해집니다.

AttributeRange

모집 조건

게더링에 참가하기 위한 속성의 허용 범위를 정의하는 조건입니다.
플레이어가 참가를 시도할 때, 대응하는 이름의 속성값이 지정된 최소값·최대값 범위 내에 있어야 합니다.
스킬 기반 또는 레벨 기반의 매치메이킹 필터를 작성하는 데 사용됩니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
~ 128자속성명
이 범위 조건을 적용할 속성의 이름입니다.
조건이 평가되려면 플레이어의 속성 목록에 있는 속성명과 일치해야 합니다.
minint00 ~ 2147483646속성값의 최소값
게더링에 참가하기 위해 필요한 속성값의 하한(해당 값 포함)입니다.
속성값이 이 임계값보다 낮은 플레이어는 참가할 수 없습니다.
maxint00 ~ 2147483646속성값의 최대값
게더링에 참가 가능한 속성값의 상한(해당 값 포함)입니다.
속성값이 이 임계값을 초과하는 플레이어는 참가할 수 없습니다.

CapacityOfRole

모집 슬롯

개더링 내 특정 역할에 대한 모집 슬롯을 정의합니다.
각 역할은 이름, 선택적 별칭, 최대 정원, 현재 참가 중인 플레이어 목록을 가집니다.
역할 별칭을 사용하면 유연한 매칭이 가능합니다. 예를 들어 “탱크” 역할에 “팔라딘"과 “나이트"라는 별칭을 설정하면, 둘 중 어느 하위 역할을 지정한 플레이어도 탱크 슬롯을 채울 수 있습니다.
모든 역할의 참가자가 정원에 도달하면, 개더링의 매치메이킹이 완료됩니다.

상세
타입활성화 조건필수기본값값 제한설명
roleNamestring“default”~ 128자역할 이름
이 모집 슬롯의 역할 이름.
역할 구분이 없는 일반적인 매치메이킹의 경우, 기본값 “default"를 사용합니다.
역할 기반 매치메이킹(예: “탱크”, “힐러”, “어태커”)의 경우, 여기에 역할 카테고리 이름을 지정합니다.
roleAliasesList<string>[]0 ~ 9 items역할 이름 별칭 목록
이 모집 슬롯에서 허용되는 대체 역할 이름.
이러한 별칭 중 하나를 역할 이름으로 지정한 플레이어는 이 슬롯에 매칭됩니다.
하위 역할 매칭을 가능하게 합니다. 예: “탱크” 역할에 대한 “팔라딘"과 “나이트” 별칭. 최대 9건.
capacityint
1 ~ 256모집 인원수
이 역할 슬롯을 채울 수 있는 플레이어의 최대 수.
참가자 수가 이 정원에 도달하면, 역할은 가득 차게 되어 더 이상 이 역할의 플레이어는 참가할 수 없습니다.
1에서 256 범위로 지정합니다.
participantsList<Player>[]0 ~ 1000 items참가자 플레이어 정보 목록
현재 이 역할 슬롯을 차지하고 있는 플레이어의 목록.
플레이어는 개더링에 참가하면 추가되고, 이탈하면 삭제됩니다.
각 플레이어 항목에는 사용자 ID, 속성, 역할 이름, 거부 목록이 포함됩니다. 사용자 ID를 기준으로 고유성이 보장됩니다.

Attribute

속성값

매치메이킹을 위해 플레이어에게 연결된 이름이 지정된 수치 속성입니다.
어떤 플레이어가 참가할 수 있는지 필터링하기 위해 개더링의 AttributeRange 조건과 함께 사용됩니다.
예를 들어 값이 50인 “레벨” 속성을 가진 플레이어는 레벨 40~60을 요구하는 개더링에 매칭됩니다.
각 플레이어는 최대 5개의 속성을 가질 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
~ 128자속성 이름
속성 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
valueint00 ~ 2147483646속성값
이 플레이어의 속성 수치입니다.
매치메이킹 시 개더링의 AttributeRange 조건에서 지정된 최소값·최대값 범위와 대조됩니다.

Player

참가자 플레이어 정보

매치메이킹에 참가하는 플레이어를 나타내며, ID, 속성, 역할, 거부 목록을 포함합니다.
게더링에 참가할 때, 플레이어의 속성값, 희망하는 역할, 함께 플레이하고 싶지 않은 사용자 목록을 가진 Player 오브젝트가 생성됩니다.
플레이어의 속성은 게더링의 속성 범위 조건과 대조되며, 거부 목록은 원치 않는 페어링을 방지하기 위해 크로스체크됩니다.

상세
타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
attributesList<Attribute>[]0 ~ 5 items속성값 목록
매치메이킹 조건 평가에 사용되는 플레이어의 이름이 지정된 수치 속성입니다.
각 속성은 게더링의 AttributeRange 조건과 대조되어 참가 자격이 판정됩니다.
게더링 생성 시 범위 조건을 설정하는 경우, 플레이어 자신의 속성값도 그 범위 내에 있어야 합니다. 최대 5건.
roleNamestring“default”~ 128자역할명
이 플레이어가 게더링에서 채우고자 하는 역할입니다.
역할 구분이 없는 일반적인 매치메이킹의 경우 기본값 “default"를 사용합니다.
역할 기반 매치메이킹의 경우, 플레이어의 구체적인 역할(예: “팔라딘”, “나이트”)을 지정하며, 게더링의 정원 정의에 있는 역할명 및 별칭과 매칭됩니다.
denyUserIdsList<string>[]0 ~ 100 items매칭 거부 사용자 ID 목록
이 플레이어가 매칭을 거부하는 사용자 ID의 블랙리스트입니다.
매치메이킹 시, 게더링에 이미 참가한 플레이어가 이 목록에 포함되어 있으면 해당 게더링에 참가할 수 없습니다.
반대로, 기존 참가자의 거부 목록에 이 플레이어가 포함되어 있는 경우에도 참가가 차단됩니다. 최대 100건.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정

GameResult

대전 결과

Vote 시스템을 통한 레이팅 계산에 사용되는, 대전에서 한 플레이어의 결과를 나타냅니다.
각 GameResult 항목은 사용자 ID와 해당 대전에서의 순위(최종 순위)를 짝지어 나타냅니다.
순위 값이 작을수록 높은 성적을 나타냅니다(1위 = rank 1). 순위가 같은 플레이어는 무승부로 처리됩니다.

상세
타입활성화 조건필수기본값값 제한설명
rankint
0 ~ 2147483646순위
대전에서 플레이어의 최종 순위입니다. 1이 최상위(승자)입니다.
Glicko-2 알고리즘에 의한 레이팅 변동 계산에 사용됩니다. 상위 플레이어는 레이팅이 상승하고, 하위 플레이어는 레이팅이 하락합니다.
순위가 같은 플레이어는 무승부로 처리됩니다.
userIdstring
~ 128자사용자ID

SignedBallot

서명된 투표용지

진위를 검증하기 위한 디지털 서명이 부여된 투표용지입니다.
매치메이킹 완료 후 서버가 플레이어에게 서명된 투표용지를 발급하여, 정당한 참가자만이 대전 결과를 제출할 수 있도록 보장합니다.
투표용지가 Vote API에 제출될 때 서명이 검증되어, 대전 컨텍스트(레이팅 이름, 개더링 이름, 참가 인원수)의 변조를 방지합니다.

상세
타입활성화 조건필수기본값값 제한설명
bodystring
~ 1024자투표용지 본문
디지털 서명의 대상이 되는 직렬화된 투표용지 데이터입니다.
서명과 대조하여 검증 가능한 형식으로, 투표 컨텍스트(사용자 ID, 레이팅 이름, 개더링 이름, 참가 인원수)를 포함합니다.
signaturestring
~ 256자서명
투표용지 본문의 진위성과 무결성을 검증하기 위한 디지털 서명입니다.
GS2-Key의 암호화 키를 사용하여 서버에서 생성되며, 투표용지 제출 시 위조나 변조를 방지하기 위해 검증됩니다.

WrittenBallot

기재 완료 투표용지

대전 결과를 기입한 투표용지를 나타내는 데이터 모델입니다.
사용자 ID와 순위를 포함한 투표 내용을 보유하며, 서명이 첨부된 상태로 Vote API에 전달됩니다.

상세
타입활성화 조건필수기본값값 제한설명
ballotBallot
투표용지
gameResultsList<GameResult>0 ~ 10 items대전 결과 목록

TimeSpan

시간 간격(기간)

일·시간·분으로 구성된 시간의 길이를 나타냅니다.
현재 시각으로부터의 게더링 유효 기간 등, 상대적인 시간 오프셋을 지정하는 데 사용됩니다.
전체 기간은 세 구성 요소를 합산하여 계산됩니다.

상세
타입활성화 조건필수기본값값 제한설명
daysint00 ~ 365일수
기간에서의 일수입니다. 최대 365일. 기본값은 0입니다.
hoursint00 ~ 24시간
기간에서의 시간 수입니다. 최대 24시간. 기본값은 0입니다.
minutesint00 ~ 60
기간에서의 분 수입니다. 최대 60분. 기본값은 0입니다.

CurrentModelMaster

현재 활성화된 모델의 마스터 데이터

현재 네임스페이스 내에서 유효한 모델의 정의를 기술한 마스터 데이터입니다.
GS2에서는 마스터 데이터 관리에 JSON 형식의 파일을 사용합니다.
파일을 업로드하면 실제로 서버에 설정을 반영할 수 있습니다.

JSON 파일을 작성하는 방법으로, 매니지먼트 콘솔 내에 마스터 데이터 에디터를 제공하고 있습니다.
또한 게임 운영에 더 적합한 도구를 직접 제작하여 적절한 형식의 JSON 파일을 출력하는 방식으로도 서비스를 이용할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
namespaceIdstring
~ 1024자네임스페이스 GRN
※ 서버가 자동으로 설정
settingsstring
~ 5242880 바이트 (5MB)마스터 데이터

RatingModelMaster

레이팅 모델 마스터

레이팅 모델 마스터는 게임 내에서 사용되는 레이팅 모델의 편집·관리용 데이터로, 매니지먼트 콘솔의 마스터 데이터 에디터에 일시적으로 보관됩니다.
임포트·업데이트 처리를 수행하면 실제로 게임에서 참조되는 레이팅 모델로 반영됩니다.

GS2에서는 레이팅 알고리즘으로 Glicko-2를 채택하고 있습니다.
Glicko-2에는 여러 파라미터가 있지만, GS2-Matchmaking에서는 이를 종합적으로 나타내는 변동성이라는 하나의 파라미터로 집약하고 있습니다.
변동성은 변화의 크기를 나타내는 파라미터로, 값이 클수록 레이팅 값의 변동량이 커집니다.

상세
타입활성화 조건필수기본값값 제한설명
ratingModelIdstring
~ 1024자레이팅 모델 마스터 GRN
※ 서버가 자동으로 설정
namestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
descriptionstring~ 1024자설명문
initialValueint1500100 ~ 10000레이트 값의 초기값
플레이어가 처음 레이팅이 적용된 매치메이킹에 참가할 때 부여되는 시작 레이트 값입니다.
기본값은 1500입니다. 모든 플레이어는 동일한 레이팅에서 시작하며, 대전 결과에 따라 조정됩니다.
volatilityint1001 ~ 20000레이팅의 변동성
각 대전 후 레이트 값이 얼마나 변동하는지를 제어하는 Glicko-2의 파라미터입니다.
값이 클수록 레이팅의 변동 폭이 커져 더 빠르게 레이팅이 조정됩니다.
값이 작을수록 레이팅이 안정되어 완만하게 변화합니다. 기본값은 100입니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

SeasonModelMaster

시즌 모델 마스터

시즌 모델 마스터는 게임 내에서 사용되는 시즌 모델을 편집·관리하기 위한 데이터로, 매니지먼트 콘솔의 마스터 데이터 에디터에 일시적으로 보관됩니다.
임포트·업데이트 처리를 수행함으로써, 실제로 게임에서 참조되는 시즌 모델로 반영됩니다.

시즌 모델은 시즌 매치메이킹에서 일정 기간 동안 유효한 영속적 게더링의 기간·최대 참가 인원·티어 연동 설정을 정의하는 마스터 데이터입니다.
기간은 GS2-Schedule에 의해 관리되며, 필요에 따라 GS2-Experience와 연동하여 동일 티어 내에서 영속적 게더링을 형성합니다.

상세
타입활성화 조건필수기본값값 제한설명
seasonModelIdstring
~ 1024자시즌 모델 마스터 GRN
※ 서버가 자동으로 설정
namestring
~ 128자시즌 모델명
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
descriptionstring~ 1024자설명문
maximumParticipantsint
2 ~ 1000최대 참가 인원수
하나의 시즌 개더링에 참가할 수 있는 플레이어의 최대 인원수입니다.
이 상한에 도달하면 시즌 개더링은 만원 상태가 되어 더 이상 플레이어가 참가할 수 없게 됩니다.
2에서 1000 사이의 범위로 지정합니다.
experienceModelIdstring~ 1024자티어 관리용 경험치 모델 GRN
플레이어의 티어를 결정하기 위해 사용하는 GS2-Experience 경험치 모델의 GRN입니다.
이 경험치 모델에서의 플레이어 랭크가 매치메이킹의 티어로 사용되어, 비슷한 레벨의 플레이어끼리 그룹화됩니다.
지정하지 않으면 티어에 의한 그룹화가 비활성화되어, 레벨에 관계없이 모든 플레이어가 매칭됩니다.
challengePeriodEventIdstring
~ 1024자챌린지 기간 이벤트 GRN
이 시즌의 유효 기간을 정의하는 GS2-Schedule 이벤트의 GRN입니다.
이 이벤트가 활성화되어 있는 동안에만 시즌 개더링의 생성·참가가 가능합니다.
이벤트 기간이 종료되면 시즌이 종료되어 새로운 매치메이킹이 불가능해집니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

메서드

describeNamespaces

네임스페이스 목록 조회

프로젝트 내에서 서비스 단위로 생성된 네임스페이스의 목록을 조회합니다.
옵션인 페이지 토큰을 사용하여 목록의 특정 위치부터 데이터 조회를 시작할 수 있습니다.
또한 조회할 네임스페이스의 수를 제한하는 것도 가능합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namePrefixstring~ 64자네임스페이스 이름의 필터 접두사
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<Namespace>네임스페이스 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &matchmaking.DescribeNamespacesRequest {
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeNamespacesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeNamespacesRequest;
import io.gs2.matchmaking.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeNamespacesResult result = client.describeNamespaces(
        new DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Matchmaking.Request.DescribeNamespacesRequest()
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeNamespaces(
        new Gs2Matchmaking.DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_namespaces(
        matchmaking.DescribeNamespacesRequest()
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_namespaces({
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_namespaces_async({
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createNamespace

네임스페이스 신규 생성

네임스페이스의 이름, 설명 및 각종 설정을 포함한 상세 정보를 지정해야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
매치메이킹 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
enableRatingboolfalse레이팅 계산 기능 활성화
Glicko-2 기반의 레이팅 계산 기능을 활성화할지 여부입니다.
활성화하면, 플레이어는 Vote 시스템을 통해 대전 결과를 제출하고 레이팅이 자동으로 갱신됩니다.
RatingModel 마스터 데이터의 설정이 필요합니다. 기본값은 false입니다.
enableDisconnectDetection문자열 열거형
enum {
  “disable”,
  “enable”
}
“disable”연결 끊김 감지
매치메이킹 중인 플레이어가 대기 중임을 정기적으로 보고해야 하는지 여부를 제어합니다.
활성화하면, 플레이어가 설정된 타임아웃 시간 내에 킵얼라이브를 전송하지 않을 경우 자동으로 개더링에서 퇴장 처리됩니다.
이를 통해 “고스트” 플레이어가 매치메이킹 완료를 방해하는 것을 방지합니다. 기본값은 “disable” 입니다.
정의설명
disable비활성화
enable활성화
disconnectDetectionTimeoutSecondsint{enableDisconnectDetection} == “enable”
✓※
15 ~ 600연결 끊김 감지 타임아웃(초)
킵얼라이브 보고 없이 플레이어를 연결 끊김으로 간주하여 개더링에서 퇴장시키기까지의 대기 시간(초).
연결 끊김 감지가 활성화된 경우에만 적용됩니다. 15에서 600초 범위로 지정합니다.
※ enableDisconnectDetection이(가) “enable” 이면 필수
createGatheringTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”개더링 생성 시 트리거 타입
새로운 개더링이 생성되었을 때 실행할 액션의 종류.
GS2-Realtime의 룸 생성을 트리거하여 실시간 통신을 시작하거나, GS2-Script를 실행하여 커스텀 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
createGatheringTriggerRealtimeNamespaceIdstring{createGatheringTriggerType} == “gs2_realtime”
✓※
~ 1024자개더링 생성 시 룸을 생성할 GS2-Realtime의 네임스페이스
※ createGatheringTriggerType이(가) “gs2_realtime” 이면 필수
createGatheringTriggerScriptIdstring{createGatheringTriggerType} == “gs2_script”
✓※
~ 1024자개더링 생성 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - createGathering
※ createGatheringTriggerType이(가) “gs2_script” 이면 필수
completeMatchmakingTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”매치메이킹 완료 시 트리거 타입
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때) 실행할 액션의 종류.
매칭된 플레이어를 대상으로 GS2-Realtime의 룸 생성을 트리거하거나, GS2-Script를 실행하여 커스텀 사후 처리 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
completeMatchmakingTriggerRealtimeNamespaceIdstring{completeMatchmakingTriggerType} == “gs2_realtime”
✓※
~ 1024자매치메이킹 완료 시 룸을 생성할 GS2-Realtime의 네임스페이스 GRN
※ completeMatchmakingTriggerType이(가) “gs2_realtime” 이면 필수
completeMatchmakingTriggerScriptIdstring{completeMatchmakingTriggerType} == “gs2_script”
✓※
~ 1024자매치메이킹 완료 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - completeMatchmaking
※ completeMatchmakingTriggerType이(가) “gs2_script” 이면 필수
enableCollaborateSeasonRating문자열 열거형
enum {
  “enable”,
  “disable”
}
“disable”시즌 레이팅 연계 활성화
시즌 기반 레이팅 계산을 위해 GS2-SeasonRating과의 연계를 활성화할지 여부.
활성화하면, 매치메이킹 완료 시 지정한 GS2-SeasonRating의 네임스페이스에 레이팅 계산 세션이 자동으로 생성됩니다.
기본값은 “disable” 입니다.
정의설명
enable활성화
disable비활성화
collaborateSeasonRatingNamespaceIdstring{enableCollaborateSeasonRating} == “enable”
✓※
~ 1024자시즌 레이팅 네임스페이스 GRN
매치메이킹 완료 시 레이팅 계산 세션이 생성되는 GS2-SeasonRating의 네임스페이스 GRN.
시즌 레이팅 연계가 활성화된 경우에만 적용됩니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 필수
collaborateSeasonRatingTtlint{enableCollaborateSeasonRating} == “enable”6060 ~ 7200시즌 레이팅 결과 TTL(초)
매치메이킹 완료 후, GS2-SeasonRating을 통한 대전 결과 전송을 받아들이는 최대 대기 시간(초).
이 기간 내에 결과가 전송되지 않으면, 레이팅 세션은 만료됩니다. 60에서 7200초 범위로 지정합니다. 기본값은 60입니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 필수
changeRatingScriptScriptSetting레이팅 값이 변경되었을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - changeRating
joinNotificationNotificationSetting참가 알림
새로운 플레이어가 개더링에 참가했을 때의 푸시 알림 설정.
기존 참가자에게 새로운 플레이어가 참가했음을 알려, 게임 클라이언트가 매치메이킹 UI를 업데이트할 수 있도록 합니다.
leaveNotificationNotificationSetting이탈 알림
플레이어가 개더링에서 이탈했을 때의 푸시 알림 설정.
남은 참가자에게 플레이어가 이탈했음을 알려, 게임 클라이언트가 변경 사항을 반영할 수 있도록 합니다.
completeNotificationNotificationSetting완료 알림
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때)의 푸시 알림 설정.
모든 참가자에게 개더링이 가득 차 대전을 시작할 수 있음을 알립니다.
changeRatingNotificationNotificationSetting레이팅 변동 알림
투표 처리 후 플레이어의 레이팅 값이 변동되었을 때의 푸시 알림 설정.
영향을 받은 플레이어에게 새로운 레이팅을 알려, 게임 클라이언트가 업데이트된 값을 표시할 수 있도록 합니다.
logSettingLogSetting로그 출력 설정
API 요청/응답 로그를 GS2-Log에 출력하기 위한 설정.
설정하면, 매치메이킹 조작(개더링 생성·참가·이탈, 투표, 레이팅 변동 등)이 모니터링 및 분석을 위해 로그로 출력됩니다.

Result

타입설명
itemNamespace생성한 네임스페이스

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &matchmaking.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: nil,
        EnableRating: pointy.Bool(true),
        EnableDisconnectDetection: nil,
        DisconnectDetectionTimeoutSeconds: nil,
        CreateGatheringTriggerType: pointy.String("none"),
        CreateGatheringTriggerRealtimeNamespaceId: nil,
        CreateGatheringTriggerScriptId: nil,
        CompleteMatchmakingTriggerType: pointy.String("none"),
        CompleteMatchmakingTriggerRealtimeNamespaceId: nil,
        CompleteMatchmakingTriggerScriptId: nil,
        EnableCollaborateSeasonRating: pointy.String("disable"),
        CollaborateSeasonRatingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001"),
        CollaborateSeasonRatingTtl: pointy.Int32(60),
        ChangeRatingScript: nil,
        JoinNotification: nil,
        LeaveNotification: nil,
        CompleteNotification: nil,
        ChangeRatingNotification: nil,
        LogSetting: &matchmaking.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CreateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting(null)
            ->withEnableRating(true)
            ->withEnableDisconnectDetection(null)
            ->withDisconnectDetectionTimeoutSeconds(null)
            ->withCreateGatheringTriggerType("none")
            ->withCreateGatheringTriggerRealtimeNamespaceId(null)
            ->withCreateGatheringTriggerScriptId(null)
            ->withCompleteMatchmakingTriggerType("none")
            ->withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            ->withCompleteMatchmakingTriggerScriptId(null)
            ->withEnableCollaborateSeasonRating("disable")
            ->withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            ->withCollaborateSeasonRatingTtl(60)
            ->withChangeRatingScript(null)
            ->withJoinNotification(null)
            ->withLeaveNotification(null)
            ->withCompleteNotification(null)
            ->withChangeRatingNotification(null)
            ->withLogSetting((new \Gs2\Matchmaking\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CreateNamespaceRequest;
import io.gs2.matchmaking.result.CreateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withEnableRating(true)
            .withEnableDisconnectDetection(null)
            .withDisconnectDetectionTimeoutSeconds(null)
            .withCreateGatheringTriggerType("none")
            .withCreateGatheringTriggerRealtimeNamespaceId(null)
            .withCreateGatheringTriggerScriptId(null)
            .withCompleteMatchmakingTriggerType("none")
            .withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            .withCompleteMatchmakingTriggerScriptId(null)
            .withEnableCollaborateSeasonRating("disable")
            .withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            .withCollaborateSeasonRatingTtl(60)
            .withChangeRatingScript(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withCompleteNotification(null)
            .withChangeRatingNotification(null)
            .withLogSetting(new io.gs2.matchmaking.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Matchmaking.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(null)
        .WithEnableRating(true)
        .WithEnableDisconnectDetection(null)
        .WithDisconnectDetectionTimeoutSeconds(null)
        .WithCreateGatheringTriggerType("none")
        .WithCreateGatheringTriggerRealtimeNamespaceId(null)
        .WithCreateGatheringTriggerScriptId(null)
        .WithCompleteMatchmakingTriggerType("none")
        .WithCompleteMatchmakingTriggerRealtimeNamespaceId(null)
        .WithCompleteMatchmakingTriggerScriptId(null)
        .WithEnableCollaborateSeasonRating("disable")
        .WithCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
        .WithCollaborateSeasonRatingTtl(60)
        .WithChangeRatingScript(null)
        .WithJoinNotification(null)
        .WithLeaveNotification(null)
        .WithCompleteNotification(null)
        .WithChangeRatingNotification(null)
        .WithLogSetting(new Gs2.Gs2Matchmaking.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.createNamespace(
        new Gs2Matchmaking.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withEnableRating(true)
            .withEnableDisconnectDetection(null)
            .withDisconnectDetectionTimeoutSeconds(null)
            .withCreateGatheringTriggerType("none")
            .withCreateGatheringTriggerRealtimeNamespaceId(null)
            .withCreateGatheringTriggerScriptId(null)
            .withCompleteMatchmakingTriggerType("none")
            .withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            .withCompleteMatchmakingTriggerScriptId(null)
            .withEnableCollaborateSeasonRating("disable")
            .withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            .withCollaborateSeasonRatingTtl(60)
            .withChangeRatingScript(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withCompleteNotification(null)
            .withChangeRatingNotification(null)
            .withLogSetting(new Gs2Matchmaking.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.create_namespace(
        matchmaking.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(None)
            .with_enable_rating(True)
            .with_enable_disconnect_detection(None)
            .with_disconnect_detection_timeout_seconds(None)
            .with_create_gathering_trigger_type('none')
            .with_create_gathering_trigger_realtime_namespace_id(None)
            .with_create_gathering_trigger_script_id(None)
            .with_complete_matchmaking_trigger_type('none')
            .with_complete_matchmaking_trigger_realtime_namespace_id(None)
            .with_complete_matchmaking_trigger_script_id(None)
            .with_enable_collaborate_season_rating('disable')
            .with_collaborate_season_rating_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001')
            .with_collaborate_season_rating_ttl(60)
            .with_change_rating_script(None)
            .with_join_notification(None)
            .with_leave_notification(None)
            .with_complete_notification(None)
            .with_change_rating_notification(None)
            .with_log_setting(
                matchmaking.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    enableRating=true,
    enableDisconnectDetection=nil,
    disconnectDetectionTimeoutSeconds=nil,
    createGatheringTriggerType="none",
    createGatheringTriggerRealtimeNamespaceId=nil,
    createGatheringTriggerScriptId=nil,
    completeMatchmakingTriggerType="none",
    completeMatchmakingTriggerRealtimeNamespaceId=nil,
    completeMatchmakingTriggerScriptId=nil,
    enableCollaborateSeasonRating="disable",
    collaborateSeasonRatingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001",
    collaborateSeasonRatingTtl=60,
    changeRatingScript=nil,
    joinNotification=nil,
    leaveNotification=nil,
    completeNotification=nil,
    changeRatingNotification=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.create_namespace_async({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    enableRating=true,
    enableDisconnectDetection=nil,
    disconnectDetectionTimeoutSeconds=nil,
    createGatheringTriggerType="none",
    createGatheringTriggerRealtimeNamespaceId=nil,
    createGatheringTriggerScriptId=nil,
    completeMatchmakingTriggerType="none",
    completeMatchmakingTriggerRealtimeNamespaceId=nil,
    completeMatchmakingTriggerScriptId=nil,
    enableCollaborateSeasonRating="disable",
    collaborateSeasonRatingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001",
    collaborateSeasonRatingTtl=60,
    changeRatingScript=nil,
    joinNotification=nil,
    leaveNotification=nil,
    completeNotification=nil,
    changeRatingNotification=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getNamespaceStatus

네임스페이스의 상태 조회

지정된 네임스페이스의 현재 상태를 조회합니다.
상태에는 네임스페이스가 활성 상태인지, 삭제되었는지가 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
statusstring네임스페이스의 상태
정의설명
ACTIVE유효
DELETED삭제됨

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &matchmaking.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetNamespaceStatusRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName("namespace-0001")
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetNamespaceStatusRequest;
import io.gs2.matchmaking.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetNamespaceStatusResult result = client.getNamespaceStatus(
        new GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Matchmaking.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getNamespaceStatus(
        new Gs2Matchmaking.GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    const status = result.getStatus();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_namespace_status(
        matchmaking.GetNamespaceStatusRequest()
            .with_namespace_name('namespace-0001')
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_namespace_status({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
status = result.status;
client = gs2('matchmaking')

api_result_handler = client.get_namespace_status_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
status = result.status;

getNamespace

네임스페이스 조회

지정된 네임스페이스의 상세 정보를 조회합니다.
여기에는 네임스페이스의 이름, 설명 및 기타 설정 정보가 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemNamespace네임스페이스

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &matchmaking.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetNamespaceRequest;
import io.gs2.matchmaking.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetNamespaceResult result = client.getNamespace(
        new GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Matchmaking.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getNamespace(
        new Gs2Matchmaking.GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_namespace(
        matchmaking.GetNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_namespace({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_namespace_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateNamespace

네임스페이스 갱신

지정된 네임스페이스의 설정을 갱신합니다.
네임스페이스의 설명이나 특정 설정을 변경할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
매치메이킹 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
enableRatingboolfalse레이팅 계산 기능 활성화
Glicko-2 기반의 레이팅 계산 기능을 활성화할지 여부입니다.
활성화하면, 플레이어는 Vote 시스템을 통해 대전 결과를 제출하고 레이팅이 자동으로 갱신됩니다.
RatingModel 마스터 데이터의 설정이 필요합니다. 기본값은 false입니다.
enableDisconnectDetection문자열 열거형
enum {
  “disable”,
  “enable”
}
“disable”연결 끊김 감지
매치메이킹 중인 플레이어가 대기 중임을 정기적으로 보고해야 하는지 여부를 제어합니다.
활성화하면, 플레이어가 설정된 타임아웃 시간 내에 킵얼라이브를 전송하지 않을 경우 자동으로 개더링에서 퇴장 처리됩니다.
이를 통해 “고스트” 플레이어가 매치메이킹 완료를 방해하는 것을 방지합니다. 기본값은 “disable” 입니다.
정의설명
disable비활성화
enable활성화
disconnectDetectionTimeoutSecondsint{enableDisconnectDetection} == “enable”
✓※
15 ~ 600연결 끊김 감지 타임아웃(초)
킵얼라이브 보고 없이 플레이어를 연결 끊김으로 간주하여 개더링에서 퇴장시키기까지의 대기 시간(초).
연결 끊김 감지가 활성화된 경우에만 적용됩니다. 15에서 600초 범위로 지정합니다.
※ enableDisconnectDetection이(가) “enable” 이면 필수
createGatheringTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”개더링 생성 시 트리거 타입
새로운 개더링이 생성되었을 때 실행할 액션의 종류.
GS2-Realtime의 룸 생성을 트리거하여 실시간 통신을 시작하거나, GS2-Script를 실행하여 커스텀 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
createGatheringTriggerRealtimeNamespaceIdstring{createGatheringTriggerType} == “gs2_realtime”
✓※
~ 1024자개더링 생성 시 룸을 생성할 GS2-Realtime의 네임스페이스
※ createGatheringTriggerType이(가) “gs2_realtime” 이면 필수
createGatheringTriggerScriptIdstring{createGatheringTriggerType} == “gs2_script”
✓※
~ 1024자개더링 생성 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - createGathering
※ createGatheringTriggerType이(가) “gs2_script” 이면 필수
completeMatchmakingTriggerType문자열 열거형
enum {
  “none”,
  “gs2_realtime”,
  “gs2_script”
}
“none”매치메이킹 완료 시 트리거 타입
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때) 실행할 액션의 종류.
매칭된 플레이어를 대상으로 GS2-Realtime의 룸 생성을 트리거하거나, GS2-Script를 실행하여 커스텀 사후 처리 로직을 실행할 수 있습니다. 기본값은 “none” 입니다.
정의설명
none없음
gs2_realtimeGS2-Realtime의 룸 생성
gs2_scriptGS2-Script의 실행
completeMatchmakingTriggerRealtimeNamespaceIdstring{completeMatchmakingTriggerType} == “gs2_realtime”
✓※
~ 1024자매치메이킹 완료 시 룸을 생성할 GS2-Realtime의 네임스페이스 GRN
※ completeMatchmakingTriggerType이(가) “gs2_realtime” 이면 필수
completeMatchmakingTriggerScriptIdstring{completeMatchmakingTriggerType} == “gs2_script”
✓※
~ 1024자매치메이킹 완료 시 실행되는 GS2-Script의 스크립트 GRN
Script 트리거 레퍼런스 - completeMatchmaking
※ completeMatchmakingTriggerType이(가) “gs2_script” 이면 필수
enableCollaborateSeasonRating문자열 열거형
enum {
  “enable”,
  “disable”
}
“disable”시즌 레이팅 연계 활성화
시즌 기반 레이팅 계산을 위해 GS2-SeasonRating과의 연계를 활성화할지 여부.
활성화하면, 매치메이킹 완료 시 지정한 GS2-SeasonRating의 네임스페이스에 레이팅 계산 세션이 자동으로 생성됩니다.
기본값은 “disable” 입니다.
정의설명
enable활성화
disable비활성화
collaborateSeasonRatingNamespaceIdstring{enableCollaborateSeasonRating} == “enable”
✓※
~ 1024자시즌 레이팅 네임스페이스 GRN
매치메이킹 완료 시 레이팅 계산 세션이 생성되는 GS2-SeasonRating의 네임스페이스 GRN.
시즌 레이팅 연계가 활성화된 경우에만 적용됩니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 필수
collaborateSeasonRatingTtlint{enableCollaborateSeasonRating} == “enable”6060 ~ 7200시즌 레이팅 결과 TTL(초)
매치메이킹 완료 후, GS2-SeasonRating을 통한 대전 결과 전송을 받아들이는 최대 대기 시간(초).
이 기간 내에 결과가 전송되지 않으면, 레이팅 세션은 만료됩니다. 60에서 7200초 범위로 지정합니다. 기본값은 60입니다.
※ enableCollaborateSeasonRating이(가) “enable” 이면 필수
changeRatingScriptScriptSetting레이팅 값이 변경되었을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - changeRating
joinNotificationNotificationSetting참가 알림
새로운 플레이어가 개더링에 참가했을 때의 푸시 알림 설정.
기존 참가자에게 새로운 플레이어가 참가했음을 알려, 게임 클라이언트가 매치메이킹 UI를 업데이트할 수 있도록 합니다.
leaveNotificationNotificationSetting이탈 알림
플레이어가 개더링에서 이탈했을 때의 푸시 알림 설정.
남은 참가자에게 플레이어가 이탈했음을 알려, 게임 클라이언트가 변경 사항을 반영할 수 있도록 합니다.
completeNotificationNotificationSetting완료 알림
매치메이킹이 완료되었을 때(모든 역할 슬롯이 채워졌을 때)의 푸시 알림 설정.
모든 참가자에게 개더링이 가득 차 대전을 시작할 수 있음을 알립니다.
changeRatingNotificationNotificationSetting레이팅 변동 알림
투표 처리 후 플레이어의 레이팅 값이 변동되었을 때의 푸시 알림 설정.
영향을 받은 플레이어에게 새로운 레이팅을 알려, 게임 클라이언트가 업데이트된 값을 표시할 수 있도록 합니다.
logSettingLogSetting로그 출력 설정
API 요청/응답 로그를 GS2-Log에 출력하기 위한 설정.
설정하면, 매치메이킹 조작(개더링 생성·참가·이탈, 투표, 레이팅 변동 등)이 모니터링 및 분석을 위해 로그로 출력됩니다.

Result

타입설명
itemNamespace갱신한 네임스페이스

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &matchmaking.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: nil,
        EnableRating: pointy.Bool(true),
        EnableDisconnectDetection: nil,
        DisconnectDetectionTimeoutSeconds: nil,
        CreateGatheringTriggerType: pointy.String("none"),
        CreateGatheringTriggerRealtimeNamespaceId: nil,
        CreateGatheringTriggerScriptId: nil,
        CompleteMatchmakingTriggerType: pointy.String("none"),
        CompleteMatchmakingTriggerRealtimeNamespaceId: nil,
        CompleteMatchmakingTriggerScriptId: nil,
        EnableCollaborateSeasonRating: pointy.String("enable"),
        CollaborateSeasonRatingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001"),
        CollaborateSeasonRatingTtl: pointy.Int32(60),
        ChangeRatingScript: nil,
        JoinNotification: nil,
        LeaveNotification: nil,
        CompleteNotification: nil,
        ChangeRatingNotification: nil,
        LogSetting: &matchmaking.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting(null)
            ->withEnableRating(true)
            ->withEnableDisconnectDetection(null)
            ->withDisconnectDetectionTimeoutSeconds(null)
            ->withCreateGatheringTriggerType("none")
            ->withCreateGatheringTriggerRealtimeNamespaceId(null)
            ->withCreateGatheringTriggerScriptId(null)
            ->withCompleteMatchmakingTriggerType("none")
            ->withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            ->withCompleteMatchmakingTriggerScriptId(null)
            ->withEnableCollaborateSeasonRating("enable")
            ->withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            ->withCollaborateSeasonRatingTtl(60)
            ->withChangeRatingScript(null)
            ->withJoinNotification(null)
            ->withLeaveNotification(null)
            ->withCompleteNotification(null)
            ->withChangeRatingNotification(null)
            ->withLogSetting((new \Gs2\Matchmaking\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateNamespaceRequest;
import io.gs2.matchmaking.result.UpdateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withEnableRating(true)
            .withEnableDisconnectDetection(null)
            .withDisconnectDetectionTimeoutSeconds(null)
            .withCreateGatheringTriggerType("none")
            .withCreateGatheringTriggerRealtimeNamespaceId(null)
            .withCreateGatheringTriggerScriptId(null)
            .withCompleteMatchmakingTriggerType("none")
            .withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            .withCompleteMatchmakingTriggerScriptId(null)
            .withEnableCollaborateSeasonRating("enable")
            .withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            .withCollaborateSeasonRatingTtl(60)
            .withChangeRatingScript(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withCompleteNotification(null)
            .withChangeRatingNotification(null)
            .withLogSetting(new io.gs2.matchmaking.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Matchmaking.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(null)
        .WithEnableRating(true)
        .WithEnableDisconnectDetection(null)
        .WithDisconnectDetectionTimeoutSeconds(null)
        .WithCreateGatheringTriggerType("none")
        .WithCreateGatheringTriggerRealtimeNamespaceId(null)
        .WithCreateGatheringTriggerScriptId(null)
        .WithCompleteMatchmakingTriggerType("none")
        .WithCompleteMatchmakingTriggerRealtimeNamespaceId(null)
        .WithCompleteMatchmakingTriggerScriptId(null)
        .WithEnableCollaborateSeasonRating("enable")
        .WithCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
        .WithCollaborateSeasonRatingTtl(60)
        .WithChangeRatingScript(null)
        .WithJoinNotification(null)
        .WithLeaveNotification(null)
        .WithCompleteNotification(null)
        .WithChangeRatingNotification(null)
        .WithLogSetting(new Gs2.Gs2Matchmaking.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateNamespace(
        new Gs2Matchmaking.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withEnableRating(true)
            .withEnableDisconnectDetection(null)
            .withDisconnectDetectionTimeoutSeconds(null)
            .withCreateGatheringTriggerType("none")
            .withCreateGatheringTriggerRealtimeNamespaceId(null)
            .withCreateGatheringTriggerScriptId(null)
            .withCompleteMatchmakingTriggerType("none")
            .withCompleteMatchmakingTriggerRealtimeNamespaceId(null)
            .withCompleteMatchmakingTriggerScriptId(null)
            .withEnableCollaborateSeasonRating("enable")
            .withCollaborateSeasonRatingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001")
            .withCollaborateSeasonRatingTtl(60)
            .withChangeRatingScript(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withCompleteNotification(null)
            .withChangeRatingNotification(null)
            .withLogSetting(new Gs2Matchmaking.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_namespace(
        matchmaking.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(None)
            .with_enable_rating(True)
            .with_enable_disconnect_detection(None)
            .with_disconnect_detection_timeout_seconds(None)
            .with_create_gathering_trigger_type('none')
            .with_create_gathering_trigger_realtime_namespace_id(None)
            .with_create_gathering_trigger_script_id(None)
            .with_complete_matchmaking_trigger_type('none')
            .with_complete_matchmaking_trigger_realtime_namespace_id(None)
            .with_complete_matchmaking_trigger_script_id(None)
            .with_enable_collaborate_season_rating('enable')
            .with_collaborate_season_rating_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001')
            .with_collaborate_season_rating_ttl(60)
            .with_change_rating_script(None)
            .with_join_notification(None)
            .with_leave_notification(None)
            .with_complete_notification(None)
            .with_change_rating_notification(None)
            .with_log_setting(
                matchmaking.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    enableRating=true,
    enableDisconnectDetection=nil,
    disconnectDetectionTimeoutSeconds=nil,
    createGatheringTriggerType="none",
    createGatheringTriggerRealtimeNamespaceId=nil,
    createGatheringTriggerScriptId=nil,
    completeMatchmakingTriggerType="none",
    completeMatchmakingTriggerRealtimeNamespaceId=nil,
    completeMatchmakingTriggerScriptId=nil,
    enableCollaborateSeasonRating="enable",
    collaborateSeasonRatingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001",
    collaborateSeasonRatingTtl=60,
    changeRatingScript=nil,
    joinNotification=nil,
    leaveNotification=nil,
    completeNotification=nil,
    changeRatingNotification=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    enableRating=true,
    enableDisconnectDetection=nil,
    disconnectDetectionTimeoutSeconds=nil,
    createGatheringTriggerType="none",
    createGatheringTriggerRealtimeNamespaceId=nil,
    createGatheringTriggerScriptId=nil,
    completeMatchmakingTriggerType="none",
    completeMatchmakingTriggerRealtimeNamespaceId=nil,
    completeMatchmakingTriggerScriptId=nil,
    enableCollaborateSeasonRating="enable",
    collaborateSeasonRatingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:seasonRating:namespace-0001",
    collaborateSeasonRatingTtl=60,
    changeRatingScript=nil,
    joinNotification=nil,
    leaveNotification=nil,
    completeNotification=nil,
    changeRatingNotification=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteNamespace

네임스페이스 삭제

지정된 네임스페이스를 삭제합니다.
이 작업은 되돌릴 수 없으며, 삭제된 네임스페이스와 관련된 모든 데이터는 복구할 수 없게 됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemNamespace삭제한 네임스페이스

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &matchmaking.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteNamespaceRequest;
import io.gs2.matchmaking.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteNamespaceResult result = client.deleteNamespace(
        new DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Matchmaking.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteNamespace(
        new Gs2Matchmaking.DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_namespace(
        matchmaking.DeleteNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_namespace({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_namespace_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getServiceVersion

마이크로서비스 버전 조회

상세

Request

요청 파라미터: 없음

Result

타입설명
itemstring버전

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &matchmaking.GetServiceVersionRequest {
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetServiceVersionRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getServiceVersion(
        (new GetServiceVersionRequest())
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetServiceVersionRequest;
import io.gs2.matchmaking.result.GetServiceVersionResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetServiceVersionResult result = client.getServiceVersion(
        new GetServiceVersionRequest()
    );
    String item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Matchmaking.Request.GetServiceVersionRequest(),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getServiceVersion(
        new Gs2Matchmaking.GetServiceVersionRequest()
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_service_version(
        matchmaking.GetServiceVersionRequest()
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_service_version({
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_service_version_async({
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

dumpUserDataByUserId

지정한 사용자 ID에 연결된 데이터의 덤프 취득

개인정보 보호에 관한 법적 요건을 충족시키기 위해 사용하거나, 데이터의 백업 및 이관에 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &matchmaking.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DumpUserDataByUserIdRequest;
import io.gs2.matchmaking.result.DumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DumpUserDataByUserIdResult result = client.dumpUserDataByUserId(
        new DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.dumpUserDataByUserId(
        new Gs2Matchmaking.DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.dump_user_data_by_user_id(
        matchmaking.DumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
client = gs2('matchmaking')

api_result_handler = client.dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

checkDumpUserDataByUserId

지정한 사용자 ID에 연결된 데이터의 덤프가 완료되었는지 확인

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
urlstring출력 데이터의 URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &matchmaking.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CheckDumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.matchmaking.result.CheckDumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CheckDumpUserDataByUserIdResult result = client.checkDumpUserDataByUserId(
        new CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.checkDumpUserDataByUserId(
        new Gs2Matchmaking.CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.check_dump_user_data_by_user_id(
        matchmaking.CheckDumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.check_dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;
client = gs2('matchmaking')

api_result_handler = client.check_dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

cleanUserDataByUserId

사용자 데이터 완전 삭제

지정된 사용자 ID에 연결된 데이터의 클리닝을 실행합니다.
이를 통해 특정 사용자 데이터를 프로젝트에서 안전하게 삭제할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &matchmaking.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CleanUserDataByUserIdRequest;
import io.gs2.matchmaking.result.CleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CleanUserDataByUserIdResult result = client.cleanUserDataByUserId(
        new CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.cleanUserDataByUserId(
        new Gs2Matchmaking.CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.clean_user_data_by_user_id(
        matchmaking.CleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
client = gs2('matchmaking')

api_result_handler = client.clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

checkCleanUserDataByUserId

지정한 사용자 ID의 사용자 데이터 완전 삭제가 완료되었는지 확인

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &matchmaking.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CheckCleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.matchmaking.result.CheckCleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CheckCleanUserDataByUserIdResult result = client.checkCleanUserDataByUserId(
        new CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.checkCleanUserDataByUserId(
        new Gs2Matchmaking.CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.check_clean_user_data_by_user_id(
        matchmaking.CheckCleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.check_clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
client = gs2('matchmaking')

api_result_handler = client.check_clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

prepareImportUserDataByUserId

지정한 사용자 ID에 연결된 데이터 임포트 실행

임포트에 사용할 수 있는 데이터는 GS2를 통해 익스포트하여 취득한 데이터로 한정되며, 오래된 데이터는 임포트에 실패할 수 있습니다.
익스포트한 사용자 ID와 다른 사용자 ID로 임포트할 수 있지만, 사용자 데이터의 페이로드 내에 사용자 ID가 포함되어 있는 경우에는 그렇지 않을 수 있습니다.

이 API의 반환값으로 응답된 URL에 익스포트한 zip 파일을 업로드하고, importUserDataByUserId를 호출하면 실제 임포트 처리를 시작할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
uploadTokenstring업로드 후 결과를 반영할 때 사용하는 토큰
uploadUrlstring사용자 데이터 업로드 처리 실행에 사용하는 URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &matchmaking.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\PrepareImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.matchmaking.result.PrepareImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    PrepareImportUserDataByUserIdResult result = client.prepareImportUserDataByUserId(
        new PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2Matchmaking.PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.prepare_import_user_data_by_user_id(
        matchmaking.PrepareImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.prepare_import_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;
client = gs2('matchmaking')

api_result_handler = client.prepare_import_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

importUserDataByUserId

지정한 사용자 ID에 연결된 데이터의 임포트 실행

임포트에 사용할 수 있는 데이터는 GS2 를 통해 익스포트하여 취득한 데이터로 한정되며, 오래된 데이터는 임포트에 실패할 수 있습니다.
익스포트한 사용자 ID와 다른 사용자 ID로 임포트할 수 있지만, 사용자 데이터의 페이로드 내에 사용자 ID가 포함되어 있는 경우에는 그렇지 않을 수 있습니다.

이 API를 호출하기 전에 prepareImportUserDataByUserId 를 호출하여 업로드 준비를 완료해야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
uploadTokenstring
~ 1024자업로드 준비 시 수신한 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &matchmaking.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\ImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.ImportUserDataByUserIdRequest;
import io.gs2.matchmaking.result.ImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    ImportUserDataByUserIdResult result = client.importUserDataByUserId(
        new ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.importUserDataByUserId(
        new Gs2Matchmaking.ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.import_user_data_by_user_id(
        matchmaking.ImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
client = gs2('matchmaking')

api_result_handler = client.import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

checkImportUserDataByUserId

지정한 사용자 ID에 연결된 데이터의 임포트가 완료되었는지 확인

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
uploadTokenstring
~ 1024자업로드 준비 시 수신한 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
urlstring출력 로그의 URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &matchmaking.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CheckImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CheckImportUserDataByUserIdRequest;
import io.gs2.matchmaking.result.CheckImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CheckImportUserDataByUserIdResult result = client.checkImportUserDataByUserId(
        new CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Matchmaking.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2Matchmaking.CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.check_import_user_data_by_user_id(
        matchmaking.CheckImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.check_import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;
client = gs2('matchmaking')

api_result_handler = client.check_import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

describeGatherings

개더링 목록 취득

지정된 네임스페이스 내의 모든 개더링에 대한 페이지네이션 목록을 취득합니다.
현재 참가자를 모집 중인 개더링과 완료된 개더링이 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<Gathering>개더링 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeGatherings(
    &matchmaking.DescribeGatheringsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeGatheringsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeGatherings(
        (new DescribeGatheringsRequest())
            ->withNamespaceName("namespace-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeGatheringsRequest;
import io.gs2.matchmaking.result.DescribeGatheringsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeGatheringsResult result = client.describeGatherings(
        new DescribeGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Gathering> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeGatheringsResult> asyncResult = null;
yield return client.DescribeGatherings(
    new Gs2.Gs2Matchmaking.Request.DescribeGatheringsRequest()
        .WithNamespaceName("namespace-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeGatherings(
        new Gs2Matchmaking.DescribeGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_gatherings(
        matchmaking.DescribeGatheringsRequest()
            .with_namespace_name('namespace-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_gatherings({
    namespaceName="namespace-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_gatherings_async({
    namespaceName="namespace-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createGathering

개더링을 작성하고 모집 시작

모집 조건에는 작성한 개더링에 참가를 허용할 각 속성값의 범위를 지정합니다.

예를 들어 동일한 게임 모드를 희망하는 플레이어를 모집하고 싶은 경우, 게임 모드에 대응하는 속성값이 완전히 일치하는 참가 조건의 플레이어와 매치메이킹하도록

  • 속성명: 게임 모드
  • 속성 최소값: 게임 모드를 나타내는 숫자
  • 속성 최대값: 게임 모드를 나타내는 숫자

로 설정하면, 동일한 게임 모드를 희망하는 플레이어끼리 매치메이킹할 수 있습니다.

그 밖에 레이팅을 기반으로 한 매치메이킹을 실시하고 싶은 경우에는,
방 작성자의 레이팅값을 중심으로 한 속성값의 범위를 지정함으로써 레이팅값이 가까운 플레이어끼리 매치메이킹할 수 있습니다.
모집 조건은 나중에 갱신할 수 있으므로, 점차 조건을 완화해 나갈 수 있습니다.

역할은 방패 역할 1명, 회복 역할 1명, 공격 역할 2명 등 역할별로 모집 인원을 설정하고 싶은 경우에 사용합니다.
역할에는 별칭을 지정할 수 있습니다.
예를 들어 방패 역할은 팔라딘과 나이트라는 2종류의 직업으로 더 세분화할 수 있다고 합시다.
이 경우, 역할명에 방패 역할, 별칭에 팔라딘 나이트로 모집을 내도록 게임을 구현합니다.
그리고 플레이어는 자기 자신의 직업을 자신의 플레이어 정보의 역할로 지정합니다.

이렇게 함으로써, 모집 조건이 방패 역할로 되어 있는 개더링에는 팔라딘나이트도 참가할 수 있습니다.
반면, 개더링을 작성할 때 팔라딘만 모집하고 나이트는 모집하고 싶지 않은 경우에는,
모집할 역할명에 팔라딘을 직접 지정하거나, 별칭에 나이트를 포함하지 않도록 함으로써 실현할 수 있습니다.

참가자모집 인원수는 모집할 플레이어 수를 지정합니다. 역할명을 지정함으로써 역할명별 모집 인원수를 설정할 수 있습니다.

참가자참가자 플레이어 정보 리스트는 사전에 플레이어 간에 파티가 구성되어 있는 경우나, 참가자가 이탈한 후 추가 모집 시에 사용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
playerPlayer
자신의 플레이어 정보
attributeRangesList<AttributeRange>[]0 ~ 5 items모집 조건
이 개더링에 참가하기 위해 플레이어가 충족해야 하는 속성 범위 조건의 목록입니다.
각 항목은 속성 이름과 허용되는 최소값·최대값 범위를 지정합니다.
플레이어 자신의 속성값이 이 범위 내에 있지 않으면 참가할 수 없습니다. 최대 5건.
capacityOfRolesList<CapacityOfRole>[]1 ~ 5 items모집 슬롯 목록
이 개더링의 모집 슬롯을 정의합니다.
각 항목은 역할 이름, 그 별칭, 그리고 해당 역할에 참가 가능한 최대 인원수를 지정합니다.
모든 역할 슬롯이 정원에 도달하면 매치메이킹이 완료됩니다. 최소 1건, 최대 5건.
allowUserIdsList<string>[]0 ~ 100 items참가 허용 사용자 ID 목록
이 게더링에 참가하는 것이 허용된 사용자 ID의 화이트리스트입니다.
지정한 경우, 목록에 포함된 사용자만 이 게더링의 매치메이킹에 참가할 수 있습니다.
친구 전용 매치메이킹이나 초대제 매치메이킹 시나리오에 유용합니다. 최대 100건.
expiresAtlong게더링 유효 기간
이 게더링이 자동으로 만료되어 삭제되는 시각입니다.
이 시각까지 매치메이킹이 완료되지 않으면 게더링은 정리됩니다.
지정하지 않은 경우, 매치메이킹이 완료되거나 수동으로 삭제될 때까지 게더링이 유지됩니다.
expiresAtTimeSpanTimeSpan유효기간까지 남은 시간

Result

타입설명
itemGathering작성한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CreateGathering(
    &matchmaking.CreateGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Player: &matchmaking.Player{
            Attributes: []matchmaking.Attribute{
                matchmaking.Attribute{
                    Name: pointy.String("stage"),
                    Value: pointy.Int32(1),
                },
                matchmaking.Attribute{
                    Name: pointy.String("level"),
                    Value: pointy.Int32(10),
                },
            },
        },
        AttributeRanges: []matchmaking.AttributeRange{
            matchmaking.AttributeRange{
                Name: pointy.String("stage"),
                Min: pointy.Int32(1),
                Max: pointy.Int32(1),
            },
            matchmaking.AttributeRange{
                Name: pointy.String("level"),
                Min: pointy.Int32(0),
                Max: pointy.Int32(10),
            },
        },
        CapacityOfRoles: []matchmaking.CapacityOfRole{
            matchmaking.CapacityOfRole{
                RoleName: pointy.String("default"),
                Capacity: pointy.Int32(4),
            },
        },
        AllowUserIds: nil,
        ExpiresAt: nil,
        ExpiresAtTimeSpan: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CreateGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->createGathering(
        (new CreateGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPlayer((new \Gs2\Matchmaking\Model\Player())
                ->withAttributes([
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("stage")
                        ->withValue(1),
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("level")
                        ->withValue(10),
                ]))
            ->withAttributeRanges([
                (new \Gs2\Matchmaking\Model\AttributeRange())
                    ->withName("stage")
                    ->withMin(1)
                    ->withMax(1),
                (new \Gs2\Matchmaking\Model\AttributeRange())
                    ->withName("level")
                    ->withMin(0)
                    ->withMax(10),
            ])
            ->withCapacityOfRoles([
                (new \Gs2\Matchmaking\Model\CapacityOfRole())
                    ->withRoleName("default")
                    ->withCapacity(4),
            ])
            ->withAllowUserIds(null)
            ->withExpiresAt(null)
            ->withExpiresAtTimeSpan(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CreateGatheringRequest;
import io.gs2.matchmaking.result.CreateGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CreateGatheringResult result = client.createGathering(
        new CreateGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPlayer(new io.gs2.matchmaking.model.Player()
                .withAttributes(Arrays.asList(
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("stage")
                        .withValue(1),
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("level")
                        .withValue(10)
                )))
            .withAttributeRanges(Arrays.asList(
                new io.gs2.matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(1),
                new io.gs2.matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(0)
                    .withMax(10)
            ))
            .withCapacityOfRoles(Arrays.asList(
                new io.gs2.matchmaking.model.CapacityOfRole()
                    .withRoleName("default")
                    .withCapacity(4)
            ))
            .withAllowUserIds(null)
            .withExpiresAt(null)
            .withExpiresAtTimeSpan(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CreateGatheringResult> asyncResult = null;
yield return client.CreateGathering(
    new Gs2.Gs2Matchmaking.Request.CreateGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPlayer(new Gs2.Gs2Matchmaking.Model.Player()
            .WithAttributes(new Gs2.Gs2Matchmaking.Model.Attribute_[] {
                new Gs2.Gs2Matchmaking.Model.Attribute_()
                    .WithName("stage")
                    .WithValue(1),
                new Gs2.Gs2Matchmaking.Model.Attribute_()
                    .WithName("level")
                    .WithValue(10),
            }))
        .WithAttributeRanges(new Gs2.Gs2Matchmaking.Model.AttributeRange[] {
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("stage")
                .WithMin(1)
                .WithMax(1),
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("level")
                .WithMin(0)
                .WithMax(10),
        })
        .WithCapacityOfRoles(new Gs2.Gs2Matchmaking.Model.CapacityOfRole[] {
            new Gs2.Gs2Matchmaking.Model.CapacityOfRole()
                .WithRoleName("default")
                .WithCapacity(4),
        })
        .WithAllowUserIds(null)
        .WithExpiresAt(null)
        .WithExpiresAtTimeSpan(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.createGathering(
        new Gs2Matchmaking.CreateGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPlayer(new Gs2Matchmaking.model.Player()
                .withAttributes([
                    new Gs2Matchmaking.model.Attribute()
                        .withName("stage")
                        .withValue(1),
                    new Gs2Matchmaking.model.Attribute()
                        .withName("level")
                        .withValue(10),
                ]))
            .withAttributeRanges([
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(1),
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(0)
                    .withMax(10),
            ])
            .withCapacityOfRoles([
                new Gs2Matchmaking.model.CapacityOfRole()
                    .withRoleName("default")
                    .withCapacity(4),
            ])
            .withAllowUserIds(null)
            .withExpiresAt(null)
            .withExpiresAtTimeSpan(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.create_gathering(
        matchmaking.CreateGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_player(
                matchmaking.Player()
                    .with_attributes([
                        matchmaking.Attribute()
                            .with_name('stage')
                            .with_value(1),
                        matchmaking.Attribute()
                            .with_name('level')
                            .with_value(10),
                    ]))
            .with_attribute_ranges([
                matchmaking.AttributeRange()
                    .with_name('stage')
                    .with_min(1)
                    .with_max(1),
                matchmaking.AttributeRange()
                    .with_name('level')
                    .with_min(0)
                    .with_max(10),
            ])
            .with_capacity_of_roles([
                matchmaking.CapacityOfRole()
                    .with_role_name('default')
                    .with_capacity(4),
            ])
            .with_allow_user_ids(None)
            .with_expires_at(None)
            .with_expires_at_time_span(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.create_gathering({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    player={
        attributes={
            {
                name="stage",
                value=1,
            },
            {
                name="level",
                value=10,
            }
        },
    },
    attributeRanges={
        {
            name="stage",
            min=1,
            max=1,
        },
        {
            name="level",
            min=0,
            max=10,
        }
    },
    capacityOfRoles={
        {
            roleName="default",
            capacity=4,
        }
    },
    allowUserIds=nil,
    expiresAt=nil,
    expiresAtTimeSpan=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.create_gathering_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    player={
        attributes={
            {
                name="stage",
                value=1,
            },
            {
                name="level",
                value=10,
            }
        },
    },
    attributeRanges={
        {
            name="stage",
            min=1,
            max=1,
        },
        {
            name="level",
            min=0,
            max=10,
        }
    },
    capacityOfRoles={
        {
            roleName="default",
            capacity=4,
        }
    },
    allowUserIds=nil,
    expiresAt=nil,
    expiresAtTimeSpan=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

createGatheringByUserId

사용자 ID를 지정하여 개더링을 작성하고 모집 시작

모집 조건에는 작성한 개더링에 참가를 허용할 각 속성값의 범위를 지정합니다.

예를 들어 동일한 게임 모드를 희망하는 플레이어를 모집하고 싶은 경우, 게임 모드에 대응하는 속성값이 완전히 일치하는 참가 조건의 플레이어와 매치메이킹하도록
속성명: 게임 모드 속성 최소값: 게임 모드를 나타내는 숫자 속성 최대값: 게임 모드를 나타내는 숫자
로 설정하면, 동일한 게임 모드를 희망하는 플레이어끼리 매치메이킹할 수 있습니다.

그 밖에 레이팅을 기반으로 한 매치메이킹을 실시하고 싶은 경우에는,
방 작성자의 레이팅값을 중심으로 한 속성값의 범위를 지정함으로써 레이팅값이 가까운 플레이어끼리 매치메이킹할 수 있습니다.
모집 조건은 나중에 갱신할 수 있으므로, 점차 조건을 완화해 나갈 수 있습니다.

역할은 방패 역할 1명, 회복 역할 1명, 공격 역할 2명 등 역할별로 모집 인원을 설정하고 싶은 경우에 사용합니다.
역할에는 별칭을 지정할 수 있습니다.
예를 들어 방패 역할은 팔라딘과 나이트라는 2종류의 직업으로 더 세분화할 수 있다고 합시다.
이 경우, 역할명에 방패 역할, 별칭에 팔라딘 나이트로 모집을 내도록 게임을 구현합니다.
그리고 플레이어는 자기 자신의 직업을 자신의 플레이어 정보의 역할로 지정합니다.

이렇게 함으로써, 모집 조건이 방패 역할로 되어 있는 개더링에는 팔라딘나이트도 참가할 수 있습니다.
반면, 개더링을 작성할 때 팔라딘만 모집하고 나이트는 모집하고 싶지 않은 경우에는,
모집할 역할명에 팔라딘을 직접 지정하거나, 별칭에 나이트를 포함하지 않도록 함으로써 실현할 수 있습니다.

참가자모집 인원수는 모집할 플레이어 수를 지정합니다. 역할명을 지정함으로써 역할명별 모집 인원수를 설정할 수 있습니다.

참가자참가자 플레이어 정보 리스트는 사전에 플레이어 간에 파티가 구성되어 있는 경우나, 참가자가 이탈한 후 추가 모집 시에 사용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
playerPlayer
자신의 플레이어 정보
attributeRangesList<AttributeRange>[]0 ~ 5 items모집 조건
이 개더링에 참가하기 위해 플레이어가 충족해야 하는 속성 범위 조건의 목록입니다.
각 항목은 속성 이름과 허용되는 최소값·최대값 범위를 지정합니다.
플레이어 자신의 속성값이 이 범위 내에 있지 않으면 참가할 수 없습니다. 최대 5건.
capacityOfRolesList<CapacityOfRole>[]1 ~ 5 items모집 슬롯 목록
이 개더링의 모집 슬롯을 정의합니다.
각 항목은 역할 이름, 그 별칭, 그리고 해당 역할에 참가 가능한 최대 인원수를 지정합니다.
모든 역할 슬롯이 정원에 도달하면 매치메이킹이 완료됩니다. 최소 1건, 최대 5건.
allowUserIdsList<string>[]0 ~ 100 items참가 허용 사용자 ID 목록
이 게더링에 참가하는 것이 허용된 사용자 ID의 화이트리스트입니다.
지정한 경우, 목록에 포함된 사용자만 이 게더링의 매치메이킹에 참가할 수 있습니다.
친구 전용 매치메이킹이나 초대제 매치메이킹 시나리오에 유용합니다. 최대 100건.
expiresAtlong게더링 유효 기간
이 게더링이 자동으로 만료되어 삭제되는 시각입니다.
이 시각까지 매치메이킹이 완료되지 않으면 게더링은 정리됩니다.
지정하지 않은 경우, 매치메이킹이 완료되거나 수동으로 삭제될 때까지 게더링이 유지됩니다.
expiresAtTimeSpanTimeSpan유효기간까지 남은 시간
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering작성한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CreateGatheringByUserId(
    &matchmaking.CreateGatheringByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        Player: &matchmaking.Player{
            UserId: pointy.String("user-0001"),
            Attributes: []Matchmaking.Attribute{
                Matchmaking.Attribute{
                    Name: pointy.String("attr1"),
                    Value: 1,
                }
                Matchmaking.Attribute{
                    Name: pointy.String("attr2"),
                    Value: 1,
                }
            },
        },
        AttributeRanges: []matchmaking.AttributeRange{
            matchmaking.AttributeRange{
                Name: pointy.String("stage"),
                Min: pointy.Int32(1),
                Max: pointy.Int32(2),
            },
            matchmaking.AttributeRange{
                Name: pointy.String("level"),
                Min: pointy.Int32(3),
                Max: pointy.Int32(5),
            },
        },
        CapacityOfRoles: []matchmaking.CapacityOfRole{
            matchmaking.CapacityOfRole{
                Capacity: pointy.Int32(4),
            },
        },
        AllowUserIds: nil,
        ExpiresAt: nil,
        ExpiresAtTimeSpan: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CreateGatheringByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->createGatheringByUserId(
        (new CreateGatheringByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPlayer((new Player())
                ->withUserId("user-0001")
                ->withAttributes([
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr1")
                        ->withValue(1)
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr2")
                        ->withValue(1)
                ]))
            ->withAttributeRanges([
                (new AttributeRange())
                    ->withName("stage")
                    ->withMin(1)
                    ->withMax(2),
                (new AttributeRange())
                    ->withName("level")
                    ->withMin(3)
                    ->withMax(5),
            ])
            ->withCapacityOfRoles([
                (new CapacityOfRole())
                    ->withCapacity(4),
            ])
            ->withAllowUserIds(null)
            ->withExpiresAt(null)
            ->withExpiresAtTimeSpan(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CreateGatheringByUserIdRequest;
import io.gs2.matchmaking.result.CreateGatheringByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CreateGatheringByUserIdResult result = client.createGatheringByUserId(
        new CreateGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPlayer(new Player()
                .withUserId("user-0001")
                .withAttributes(Arrays.asList(
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1),
                ))
            .withAttributeRanges(Arrays.asList(
                new AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(2),
                new AttributeRange()
                    .withName("level")
                    .withMin(3)
                    .withMax(5)
            ))
            .withCapacityOfRoles(Arrays.asList(
                new CapacityOfRole()
                    .withCapacity(4)
            ))
            .withAllowUserIds(null)
            .withExpiresAt(null)
            .withExpiresAtTimeSpan(null)
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CreateGatheringByUserIdResult> asyncResult = null;
yield return client.CreateGatheringByUserId(
    new Gs2.Gs2Matchmaking.Request.CreateGatheringByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPlayer(new Gs2.Gs2Matchmaking.Model.Player()
            .WithUserId("user-0001")
            .WithAttributes(new Gs2.Gs2Matchmaking.Model.Attribute[] {
                    .WithName("attr1")
                    .WithValue(1)
                    .WithName("attr2")
                    .WithValue(1)
            }))
        .WithAttributeRanges(new Gs2.Gs2Matchmaking.Model.AttributeRange[] {
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("stage")
                .WithMin(1)
                .WithMax(2),
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("level")
                .WithMin(3)
                .WithMax(5),
        })
        .WithCapacityOfRoles(new Gs2.Gs2Matchmaking.Model.CapacityOfRole[] {
            new Gs2.Gs2Matchmaking.Model.CapacityOfRole()
                .WithCapacity(4),
        })
        .WithAllowUserIds(null)
        .WithExpiresAt(null)
        .WithExpiresAtTimeSpan(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.createGatheringByUserId(
        new Gs2Matchmaking.CreateGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPlayer(new Gs2Matchmaking.model.Player()
                .withUserId("user-0001")
                .withAttributes([
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1)
                ]))
            .withAttributeRanges([
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(2),
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(3)
                    .withMax(5),
            ])
            .withCapacityOfRoles([
                new Gs2Matchmaking.model.CapacityOfRole()
                    .withCapacity(4),
            ])
            .withAllowUserIds(null)
            .withExpiresAt(null)
            .withExpiresAtTimeSpan(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.create_gathering_by_user_id(
        matchmaking.CreateGatheringByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_player(matchmaking.Player()
                .with_user_id('user-0001')
                .with_attributes([
                    matchmaking.attribute()
                        .with_name('attr1')
                        .with_value(1),
                    matchmaking.attribute()
                        .with_name('attr2')
                        .with_value(1),
                ]))
            .with_attribute_ranges([
                matchmaking.AttributeRange()
                    .with_name('stage')
                    .with_min(1)
                    .with_max(2),
                matchmaking.AttributeRange()
                    .with_name('level')
                    .with_min(3)
                    .with_max(5),
            ])
            .with_capacity_of_roles([
                matchmaking.CapacityOfRole()
                    .with_capacity(4),
            ])
            .with_allow_user_ids(None)
            .with_expires_at(None)
            .with_expires_at_time_span(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.create_gathering_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    attributeRanges={
        {
            name="stage",
            min=1,
            max=2,
        },
        {
            name="level",
            min=3,
            max=5,
        }
    },
    capacityOfRoles={
        {
            capacity=4,
        }
    },
    allowUserIds=nil,
    expiresAt=nil,
    expiresAtTimeSpan=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.create_gathering_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    attributeRanges={
        {
            name="stage",
            min=1,
            max=2,
        },
        {
            name="level",
            min=3,
            max=5,
        }
    },
    capacityOfRoles={
        {
            capacity=4,
        }
    },
    allowUserIds=nil,
    expiresAt=nil,
    expiresAtTimeSpan=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateGathering

개더링 갱신

지정된 개더링의 모집 조건(속성값 범위)을 갱신합니다.
참가자를 기다리는 동안 매칭 조건을 점차 완화하거나 강화할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
accessTokenstring
~ 128자액세스 토큰
attributeRangesList<AttributeRange>[]0 ~ 5 items모집 조건
이 개더링에 참가하기 위해 플레이어가 충족해야 하는 속성 범위 조건의 목록입니다.
각 항목은 속성 이름과 허용되는 최소값·최대값 범위를 지정합니다.
플레이어 자신의 속성값이 이 범위 내에 있지 않으면 참가할 수 없습니다. 최대 5건.

Result

타입설명
itemGathering갱신한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateGathering(
    &matchmaking.UpdateGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        AttributeRanges: []matchmaking.AttributeRange{
            matchmaking.AttributeRange{
                Name: pointy.String("stage"),
                Min: pointy.Int32(1),
                Max: pointy.Int32(1),
            },
            matchmaking.AttributeRange{
                Name: pointy.String("level"),
                Min: pointy.Int32(0),
                Max: pointy.Int32(50),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateGathering(
        (new UpdateGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
            ->withAttributeRanges([
                (new \Gs2\Matchmaking\Model\AttributeRange())
                    ->withName("stage")
                    ->withMin(1)
                    ->withMax(1),
                (new \Gs2\Matchmaking\Model\AttributeRange())
                    ->withName("level")
                    ->withMin(0)
                    ->withMax(50),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateGatheringRequest;
import io.gs2.matchmaking.result.UpdateGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateGatheringResult result = client.updateGathering(
        new UpdateGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withAttributeRanges(Arrays.asList(
                new io.gs2.matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(1),
                new io.gs2.matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(0)
                    .withMax(50)
            ))
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateGatheringResult> asyncResult = null;
yield return client.UpdateGathering(
    new Gs2.Gs2Matchmaking.Request.UpdateGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001")
        .WithAttributeRanges(new Gs2.Gs2Matchmaking.Model.AttributeRange[] {
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("stage")
                .WithMin(1)
                .WithMax(1),
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("level")
                .WithMin(0)
                .WithMax(50),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateGathering(
        new Gs2Matchmaking.UpdateGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withAttributeRanges([
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(1),
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(0)
                    .withMax(50),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_gathering(
        matchmaking.UpdateGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
            .with_attribute_ranges([
                matchmaking.AttributeRange()
                    .with_name('stage')
                    .with_min(1)
                    .with_max(1),
                matchmaking.AttributeRange()
                    .with_name('level')
                    .with_min(0)
                    .with_max(50),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_gathering({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
    attributeRanges={
        {
            name="stage",
            min=1,
            max=1,
        },
        {
            name="level",
            min=0,
            max=50,
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_gathering_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
    attributeRanges={
        {
            name="stage",
            min=1,
            max=1,
        },
        {
            name="level",
            min=0,
            max=50,
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateGatheringByUserId

사용자 ID를 지정하여 개더링 갱신

지정된 사용자의 개더링 모집 조건(속성값 범위)을 갱신합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
userIdstring
~ 128자사용자ID
attributeRangesList<AttributeRange>[]0 ~ 5 items모집 조건
이 개더링에 참가하기 위해 플레이어가 충족해야 하는 속성 범위 조건의 목록입니다.
각 항목은 속성 이름과 허용되는 최소값·최대값 범위를 지정합니다.
플레이어 자신의 속성값이 이 범위 내에 있지 않으면 참가할 수 없습니다. 최대 5건.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering갱신한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateGatheringByUserId(
    &matchmaking.UpdateGatheringByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        AttributeRanges: []matchmaking.AttributeRange{
            matchmaking.AttributeRange{
                Name: pointy.String("stage"),
                Min: pointy.Int32(1),
                Max: pointy.Int32(2),
            },
            matchmaking.AttributeRange{
                Name: pointy.String("level"),
                Min: pointy.Int32(3),
                Max: pointy.Int32(5),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateGatheringByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateGatheringByUserId(
        (new UpdateGatheringByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withAttributeRanges([
                (new AttributeRange())
                    ->withName("stage")
                    ->withMin(1)
                    ->withMax(2),
                (new AttributeRange())
                    ->withName("level")
                    ->withMin(3)
                    ->withMax(5),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateGatheringByUserIdRequest;
import io.gs2.matchmaking.result.UpdateGatheringByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateGatheringByUserIdResult result = client.updateGatheringByUserId(
        new UpdateGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withAttributeRanges(Arrays.asList(
                new AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(2),
                new AttributeRange()
                    .withName("level")
                    .withMin(3)
                    .withMax(5)
            ))
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateGatheringByUserIdResult> asyncResult = null;
yield return client.UpdateGatheringByUserId(
    new Gs2.Gs2Matchmaking.Request.UpdateGatheringByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithAttributeRanges(new Gs2.Gs2Matchmaking.Model.AttributeRange[] {
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("stage")
                .WithMin(1)
                .WithMax(2),
            new Gs2.Gs2Matchmaking.Model.AttributeRange()
                .WithName("level")
                .WithMin(3)
                .WithMax(5),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateGatheringByUserId(
        new Gs2Matchmaking.UpdateGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withAttributeRanges([
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("stage")
                    .withMin(1)
                    .withMax(2),
                new Gs2Matchmaking.model.AttributeRange()
                    .withName("level")
                    .withMin(3)
                    .withMax(5),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_gathering_by_user_id(
        matchmaking.UpdateGatheringByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_attribute_ranges([
                matchmaking.AttributeRange()
                    .with_name('stage')
                    .with_min(1)
                    .with_max(2),
                matchmaking.AttributeRange()
                    .with_name('level')
                    .with_min(3)
                    .with_max(5),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_gathering_by_user_id({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    attributeRanges={
        {
            name="stage",
            min=1,
            max=2,
        },
        {
            name="level",
            min=3,
            max=5,
        }
    },
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_gathering_by_user_id_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    attributeRanges={
        {
            name="stage",
            min=1,
            max=2,
        },
        {
            name="level",
            min=3,
            max=5,
        }
    },
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

doMatchmakingByPlayer

플레이어가 참가할 수 있는 개더링을 찾아 참가

일정 시간 검색을 수행하며, 대상을 찾지 못한 경우 매치메이킹 상태를 유지하는 토큰을 반환합니다.
다음 번에 매치메이킹 상태를 유지하는 토큰을 붙여 다시 요청함으로써, 이전 검색 처리를 이어서 재개할 수 있습니다.
모든 개더링을 검색했지만 참가할 수 있는 개더링이 존재하지 않는 경우, 개더링과 토큰 모두 null이 응답됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
playerPlayer
플레이어 정보
matchmakingContextTokenstring~ 5120자검색 재개에 사용하는 매치메이킹 상태를 보유하는 토큰

Result

타입설명
itemGathering참가한 개더링
matchmakingContextTokenstring매치메이킹 상태를 보유하는 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DoMatchmakingByPlayer(
    &matchmaking.DoMatchmakingByPlayerRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Player: &matchmaking.Player{
            UserId: pointy.String("user-0001"),
            Attributes: []Matchmaking.Attribute{
                Matchmaking.Attribute{
                    Name: pointy.String("attr1"),
                    Value: 1,
                }
                Matchmaking.Attribute{
                    Name: pointy.String("attr2"),
                    Value: 1,
                }
            },
        },
        MatchmakingContextToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
matchmakingContextToken := result.MatchmakingContextToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DoMatchmakingByPlayerRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->doMatchmakingByPlayer(
        (new DoMatchmakingByPlayerRequest())
            ->withNamespaceName("namespace-0001")
            ->withPlayer((new Player())
                ->withUserId("user-0001")
                ->withAttributes([
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr1")
                        ->withValue(1)
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr2")
                        ->withValue(1)
                ]))
            ->withMatchmakingContextToken(null)
    );
    $item = $result->getItem();
    $matchmakingContextToken = $result->getMatchmakingContextToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DoMatchmakingByPlayerRequest;
import io.gs2.matchmaking.result.DoMatchmakingByPlayerResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DoMatchmakingByPlayerResult result = client.doMatchmakingByPlayer(
        new DoMatchmakingByPlayerRequest()
            .withNamespaceName("namespace-0001")
            .withPlayer(new Player()
                .withUserId("user-0001")
                .withAttributes(Arrays.asList(
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1),
                ))
            .withMatchmakingContextToken(null)
    );
    Gathering item = result.getItem();
    String matchmakingContextToken = result.getMatchmakingContextToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DoMatchmakingByPlayerResult> asyncResult = null;
yield return client.DoMatchmakingByPlayer(
    new Gs2.Gs2Matchmaking.Request.DoMatchmakingByPlayerRequest()
        .WithNamespaceName("namespace-0001")
        .WithPlayer(new Gs2.Gs2Matchmaking.Model.Player()
            .WithUserId("user-0001")
            .WithAttributes(new Gs2.Gs2Matchmaking.Model.Attribute[] {
                    .WithName("attr1")
                    .WithValue(1)
                    .WithName("attr2")
                    .WithValue(1)
            }))
        .WithMatchmakingContextToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var matchmakingContextToken = result.MatchmakingContextToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.doMatchmakingByPlayer(
        new Gs2Matchmaking.DoMatchmakingByPlayerRequest()
            .withNamespaceName("namespace-0001")
            .withPlayer(new Gs2Matchmaking.model.Player()
                .withUserId("user-0001")
                .withAttributes([
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1)
                ]))
            .withMatchmakingContextToken(null)
    );
    const item = result.getItem();
    const matchmakingContextToken = result.getMatchmakingContextToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.do_matchmaking_by_player(
        matchmaking.DoMatchmakingByPlayerRequest()
            .with_namespace_name('namespace-0001')
            .with_player(matchmaking.Player()
                .with_user_id('user-0001')
                .with_attributes([
                    matchmaking.attribute()
                        .with_name('attr1')
                        .with_value(1),
                    matchmaking.attribute()
                        .with_name('attr2')
                        .with_value(1),
                ]))
            .with_matchmaking_context_token(None)
    )
    item = result.item
    matchmaking_context_token = result.matchmaking_context_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.do_matchmaking_by_player({
    namespaceName="namespace-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    matchmakingContextToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;
client = gs2('matchmaking')

api_result_handler = client.do_matchmaking_by_player_async({
    namespaceName="namespace-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    matchmakingContextToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;

doMatchmaking

자신이 참가할 수 있는 개더링을 찾아 참가

일정 시간 검색을 수행하며, 대상을 찾지 못한 경우 매치메이킹 상태를 유지하는 토큰을 반환합니다.
다음 번에 매치메이킹 상태를 유지하는 토큰을 붙여 다시 요청함으로써, 이전 검색 처리를 이어서 재개할 수 있습니다.
모든 개더링을 검색했지만 참가할 수 있는 개더링이 존재하지 않는 경우, 개더링과 토큰 모두 null이 응답됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
playerPlayer
자신의 플레이어 정보
matchmakingContextTokenstring~ 5120자검색 재개에 사용하는 매치메이킹 상태를 보유하는 토큰

Result

타입설명
itemGathering참가한 개더링
matchmakingContextTokenstring매치메이킹 상태를 보유하는 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DoMatchmaking(
    &matchmaking.DoMatchmakingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Player: &matchmaking.Player{
            UserId: pointy.String("user-0001"),
            Attributes: []Matchmaking.Attribute{
                Matchmaking.Attribute{
                    Name: pointy.String("attr1"),
                    Value: 1,
                }
                Matchmaking.Attribute{
                    Name: pointy.String("attr2"),
                    Value: 1,
                }
            },
        },
        MatchmakingContextToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
matchmakingContextToken := result.MatchmakingContextToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DoMatchmakingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->doMatchmaking(
        (new DoMatchmakingRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPlayer((new Player())
                ->withUserId("user-0001")
                ->withAttributes([
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr1")
                        ->withValue(1)
                    (new \Gs2\Matchmaking\Model\Attribute())
                        ->withName("attr2")
                        ->withValue(1)
                ]))
            ->withMatchmakingContextToken(null)
    );
    $item = $result->getItem();
    $matchmakingContextToken = $result->getMatchmakingContextToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DoMatchmakingRequest;
import io.gs2.matchmaking.result.DoMatchmakingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DoMatchmakingResult result = client.doMatchmaking(
        new DoMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPlayer(new Player()
                .withUserId("user-0001")
                .withAttributes(Arrays.asList(
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new io.gs2.matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1),
                ))
            .withMatchmakingContextToken(null)
    );
    Gathering item = result.getItem();
    String matchmakingContextToken = result.getMatchmakingContextToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DoMatchmakingResult> asyncResult = null;
yield return client.DoMatchmaking(
    new Gs2.Gs2Matchmaking.Request.DoMatchmakingRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPlayer(new Gs2.Gs2Matchmaking.Model.Player()
            .WithUserId("user-0001")
            .WithAttributes(new Gs2.Gs2Matchmaking.Model.Attribute[] {
                    .WithName("attr1")
                    .WithValue(1)
                    .WithName("attr2")
                    .WithValue(1)
            }))
        .WithMatchmakingContextToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var matchmakingContextToken = result.MatchmakingContextToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.doMatchmaking(
        new Gs2Matchmaking.DoMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPlayer(new Gs2Matchmaking.model.Player()
                .withUserId("user-0001")
                .withAttributes([
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr1")
                        .withValue(1)
                    new Gs2Matchmaking.model.Attribute()
                        .withName("attr2")
                        .withValue(1)
                ]))
            .withMatchmakingContextToken(null)
    );
    const item = result.getItem();
    const matchmakingContextToken = result.getMatchmakingContextToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.do_matchmaking(
        matchmaking.DoMatchmakingRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_player(matchmaking.Player()
                .with_user_id('user-0001')
                .with_attributes([
                    matchmaking.attribute()
                        .with_name('attr1')
                        .with_value(1),
                    matchmaking.attribute()
                        .with_name('attr2')
                        .with_value(1),
                ]))
            .with_matchmaking_context_token(None)
    )
    item = result.item
    matchmaking_context_token = result.matchmaking_context_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.do_matchmaking({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    matchmakingContextToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;
client = gs2('matchmaking')

api_result_handler = client.do_matchmaking_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    player={
        user_id="user-0001",
        attributes={
            attribute={
                name="attr1",
                value=1,
            }attribute={
                name="attr2",
                value=1,
            }
        },
    },
    matchmakingContextToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;

doMatchmakingByUserId

자신이 참가할 수 있는 개더링을 찾아 참가

일정 시간 검색을 수행하며, 대상을 찾지 못한 경우 매치메이킹 상태를 유지하는 토큰을 반환합니다.
다음 번에 매치메이킹 상태를 유지하는 토큰을 붙여 다시 요청함으로써, 이전 검색 처리를 이어서 재개할 수 있습니다.
모든 개더링을 검색했지만 참가할 수 있는 개더링이 존재하지 않는 경우, 개더링과 토큰 모두 null이 응답됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
playerPlayer
자신의 플레이어 정보
matchmakingContextTokenstring~ 5120자검색 재개에 사용하는 매치메이킹 상태를 보유하는 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering참가한 개더링
matchmakingContextTokenstring매치메이킹 상태를 보유하는 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DoMatchmakingByUserId(
    &matchmaking.DoMatchmakingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        Player: nil,
        MatchmakingContextToken: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
matchmakingContextToken := result.MatchmakingContextToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DoMatchmakingByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->doMatchmakingByUserId(
        (new DoMatchmakingByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPlayer(null)
            ->withMatchmakingContextToken(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $matchmakingContextToken = $result->getMatchmakingContextToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DoMatchmakingByUserIdRequest;
import io.gs2.matchmaking.result.DoMatchmakingByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DoMatchmakingByUserIdResult result = client.doMatchmakingByUserId(
        new DoMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPlayer(null)
            .withMatchmakingContextToken(null)
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
    String matchmakingContextToken = result.getMatchmakingContextToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DoMatchmakingByUserIdResult> asyncResult = null;
yield return client.DoMatchmakingByUserId(
    new Gs2.Gs2Matchmaking.Request.DoMatchmakingByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPlayer(null)
        .WithMatchmakingContextToken(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var matchmakingContextToken = result.MatchmakingContextToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.doMatchmakingByUserId(
        new Gs2Matchmaking.DoMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPlayer(null)
            .withMatchmakingContextToken(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const matchmakingContextToken = result.getMatchmakingContextToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.do_matchmaking_by_user_id(
        matchmaking.DoMatchmakingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_player(None)
            .with_matchmaking_context_token(None)
            .with_time_offset_token(None)
    )
    item = result.item
    matchmaking_context_token = result.matchmaking_context_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.do_matchmaking_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    player=nil,
    matchmakingContextToken=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;
client = gs2('matchmaking')

api_result_handler = client.do_matchmaking_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    player=nil,
    matchmakingContextToken=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;

ping

매치메이킹 대기 중임을 통지

플레이어가 아직 개더링에서 대기 중임을 나타내는 킵얼라이브(keep-alive) ping을 전송합니다.
연결 해제 감지가 활성화된 경우, 설정된 타임아웃 기간 내에 ping을 전송하지 않은 플레이어는 개더링에서 자동으로 삭제됩니다.
타임아웃된 플레이어의 확인 및 삭제도 수행합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
accessTokenstring
~ 128자액세스 토큰

Result

타입설명
itemGathering갱신한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.Ping(
    &matchmaking.PingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\PingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->ping(
        (new PingRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.PingRequest;
import io.gs2.matchmaking.result.PingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    PingResult result = client.ping(
        new PingRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.PingResult> asyncResult = null;
yield return client.Ping(
    new Gs2.Gs2Matchmaking.Request.PingRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.ping(
        new Gs2Matchmaking.PingRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.ping(
        matchmaking.PingRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.ping({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.ping_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

pingByUserId

사용자 ID를 지정하여 매치메이킹 대기 중임을 통지

지정된 사용자의 킵얼라이브(keep-alive) ping을 전송합니다. 타임아웃된 플레이어는 자동으로 삭제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering갱신한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.PingByUserId(
    &matchmaking.PingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\PingByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->pingByUserId(
        (new PingByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.PingByUserIdRequest;
import io.gs2.matchmaking.result.PingByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    PingByUserIdResult result = client.pingByUserId(
        new PingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.PingByUserIdResult> asyncResult = null;
yield return client.PingByUserId(
    new Gs2.Gs2Matchmaking.Request.PingByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.pingByUserId(
        new Gs2Matchmaking.PingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.ping_by_user_id(
        matchmaking.PingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.ping_by_user_id({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.ping_by_user_id_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getGathering

개더링 취득

지정된 개더링의 현재 참가자, 속성값 범위, 역할 정원, 유효기간 설정을 포함한 정보를 취득합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.

Result

타입설명
itemGathering개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetGathering(
    &matchmaking.GetGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getGathering(
        (new GetGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetGatheringRequest;
import io.gs2.matchmaking.result.GetGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetGatheringResult result = client.getGathering(
        new GetGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetGatheringResult> asyncResult = null;
yield return client.GetGathering(
    new Gs2.Gs2Matchmaking.Request.GetGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getGathering(
        new Gs2Matchmaking.GetGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_gathering(
        matchmaking.GetGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_gathering({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_gathering_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

cancelMatchmaking

매치메이킹 취소

개더링에서 이탈하기 전에 매치메이킹이 완료된 경우, NotFoundException(404 에러)이 발생하여 실패합니다

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
accessTokenstring
~ 128자액세스 토큰

Result

타입설명
itemGathering취소한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CancelMatchmaking(
    &matchmaking.CancelMatchmakingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CancelMatchmakingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->cancelMatchmaking(
        (new CancelMatchmakingRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CancelMatchmakingRequest;
import io.gs2.matchmaking.result.CancelMatchmakingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CancelMatchmakingResult result = client.cancelMatchmaking(
        new CancelMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CancelMatchmakingResult> asyncResult = null;
yield return client.CancelMatchmaking(
    new Gs2.Gs2Matchmaking.Request.CancelMatchmakingRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.cancelMatchmaking(
        new Gs2Matchmaking.CancelMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.cancel_matchmaking(
        matchmaking.CancelMatchmakingRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.cancel_matchmaking({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.cancel_matchmaking_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

cancelMatchmakingByUserId

사용자 ID를 지정하여 매치메이킹 취소

개더링에서 이탈하기 전에 매치메이킹이 완료된 경우, NotFoundException(404 에러)이 발생하여 실패합니다

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering취소한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CancelMatchmakingByUserId(
    &matchmaking.CancelMatchmakingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CancelMatchmakingByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->cancelMatchmakingByUserId(
        (new CancelMatchmakingByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CancelMatchmakingByUserIdRequest;
import io.gs2.matchmaking.result.CancelMatchmakingByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CancelMatchmakingByUserIdResult result = client.cancelMatchmakingByUserId(
        new CancelMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CancelMatchmakingByUserIdResult> asyncResult = null;
yield return client.CancelMatchmakingByUserId(
    new Gs2.Gs2Matchmaking.Request.CancelMatchmakingByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.cancelMatchmakingByUserId(
        new Gs2Matchmaking.CancelMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.cancel_matchmaking_by_user_id(
        matchmaking.CancelMatchmakingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.cancel_matchmaking_by_user_id({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.cancel_matchmaking_by_user_id_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

earlyComplete

매치메이킹 조기 종료

매치메이킹이 규정 인원수에 도달하지 않은 상태에서 매치메이킹을 조기 종료합니다.
조기 종료가 가능한 것은 개더링을 작성한 플레이어뿐입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
accessTokenstring
~ 128자액세스 토큰

Result

타입설명
itemGathering취소한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.EarlyComplete(
    &matchmaking.EarlyCompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\EarlyCompleteRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->earlyComplete(
        (new EarlyCompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.EarlyCompleteRequest;
import io.gs2.matchmaking.result.EarlyCompleteResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    EarlyCompleteResult result = client.earlyComplete(
        new EarlyCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.EarlyCompleteResult> asyncResult = null;
yield return client.EarlyComplete(
    new Gs2.Gs2Matchmaking.Request.EarlyCompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.earlyComplete(
        new Gs2Matchmaking.EarlyCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.early_complete(
        matchmaking.EarlyCompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.early_complete({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.early_complete_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

earlyCompleteByUserId

사용자 ID를 지정하여 매치메이킹 조기 종료

매치메이킹이 규정 인원수에 도달하지 않은 상태에서 매치메이킹을 조기 종료합니다.
조기 종료가 가능한 것은 개더링을 작성한 플레이어뿐입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemGathering취소한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.EarlyCompleteByUserId(
    &matchmaking.EarlyCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\EarlyCompleteByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->earlyCompleteByUserId(
        (new EarlyCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.EarlyCompleteByUserIdRequest;
import io.gs2.matchmaking.result.EarlyCompleteByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    EarlyCompleteByUserIdResult result = client.earlyCompleteByUserId(
        new EarlyCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.EarlyCompleteByUserIdResult> asyncResult = null;
yield return client.EarlyCompleteByUserId(
    new Gs2.Gs2Matchmaking.Request.EarlyCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.earlyCompleteByUserId(
        new Gs2Matchmaking.EarlyCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.early_complete_by_user_id(
        matchmaking.EarlyCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.early_complete_by_user_id({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.early_complete_by_user_id_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteGathering

개더링 삭제

지정된 개더링 및 관련된 모든 참가자 데이터를 완전히 삭제합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.

Result

타입설명
itemGathering삭제한 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteGathering(
    &matchmaking.DeleteGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        GatheringName: pointy.String("gathering-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteGathering(
        (new DeleteGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withGatheringName("gathering-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteGatheringRequest;
import io.gs2.matchmaking.result.DeleteGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteGatheringResult result = client.deleteGathering(
        new DeleteGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
    );
    Gathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteGatheringResult> asyncResult = null;
yield return client.DeleteGathering(
    new Gs2.Gs2Matchmaking.Request.DeleteGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithGatheringName("gathering-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteGathering(
        new Gs2Matchmaking.DeleteGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withGatheringName("gathering-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_gathering(
        matchmaking.DeleteGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_gathering_name('gathering-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_gathering({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_gathering_async({
    namespaceName="namespace-0001",
    gatheringName="gathering-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeSeasonGatherings

시즌 개더링 목록 조회

지정된 시즌의 시즌 개더링에 대한 페이지네이션 목록을 조회합니다.
티어로 필터링하여 특정 스킬 레벨의 개더링만 표시할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong0 ~ 9223372036854775805티어
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<SeasonGathering>시즌 개더링 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeSeasonGatherings(
    &matchmaking.DescribeSeasonGatheringsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: pointy.Int64(0),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeSeasonGatheringsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeSeasonGatherings(
        (new DescribeSeasonGatheringsRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(0)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeSeasonGatheringsRequest;
import io.gs2.matchmaking.result.DescribeSeasonGatheringsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeSeasonGatheringsResult result = client.describeSeasonGatherings(
        new DescribeSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SeasonGathering> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeSeasonGatheringsResult> asyncResult = null;
yield return client.DescribeSeasonGatherings(
    new Gs2.Gs2Matchmaking.Request.DescribeSeasonGatheringsRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(0L)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeSeasonGatherings(
        new Gs2Matchmaking.DescribeSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(0)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_season_gatherings(
        matchmaking.DescribeSeasonGatheringsRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(0)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_season_gatherings({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_season_gatherings_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

describeMatchmakingSeasonGatherings

매치메이킹 중인 시즌 개더링 목록 조회

현재 매치메이킹이 가능한 시즌 개더링에 대한 페이지네이션 목록을 조회합니다.
티어로 필터링할 수 있습니다. 최대 참가 인원에 도달하지 않은 개더링만 반환됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong0 ~ 9223372036854775805티어
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<SeasonGathering>시즌 개더링 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeMatchmakingSeasonGatherings(
    &matchmaking.DescribeMatchmakingSeasonGatheringsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeMatchmakingSeasonGatheringsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeMatchmakingSeasonGatherings(
        (new DescribeMatchmakingSeasonGatheringsRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeMatchmakingSeasonGatheringsRequest;
import io.gs2.matchmaking.result.DescribeMatchmakingSeasonGatheringsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeMatchmakingSeasonGatheringsResult result = client.describeMatchmakingSeasonGatherings(
        new DescribeMatchmakingSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SeasonGathering> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeMatchmakingSeasonGatheringsResult> asyncResult = null;
yield return client.DescribeMatchmakingSeasonGatherings(
    new Gs2.Gs2Matchmaking.Request.DescribeMatchmakingSeasonGatheringsRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeMatchmakingSeasonGatherings(
        new Gs2Matchmaking.DescribeMatchmakingSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_matchmaking_season_gatherings(
        matchmaking.DescribeMatchmakingSeasonGatheringsRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_matchmaking_season_gatherings({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_matchmaking_season_gatherings_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

doSeasonMatchmaking

자신이 참가할 수 있는 시즌 개더링을 찾아 참가한다

일정 시간 동안 검색을 수행하며, 대상을 찾지 못한 경우에는 매치메이킹 상태를 보유하는 토큰을 반환한다.
다음 번에 매치메이킹 상태를 보유하는 토큰을 첨부하여 다시 요청하면, 이전 검색에 이어서 검색 처리를 재개할 수 있다.
모든 시즌 개더링을 검색했지만 참가할 수 있는 시즌 개더링이 존재하지 않는 경우에는 시즌 개더링과 토큰 모두 null이 응답된다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
matchmakingContextTokenstring~ 5120자검색 재개에 사용하는 매치메이킹 상태를 보유하는 토큰

Result

타입설명
itemSeasonGathering참가한 시즌 개더링
matchmakingContextTokenstring매치메이킹 상태를 보유하는 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DoSeasonMatchmaking(
    &matchmaking.DoSeasonMatchmakingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MatchmakingContextToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
matchmakingContextToken := result.MatchmakingContextToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DoSeasonMatchmakingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->doSeasonMatchmaking(
        (new DoSeasonMatchmakingRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withAccessToken("accessToken-0001")
            ->withMatchmakingContextToken(null)
    );
    $item = $result->getItem();
    $matchmakingContextToken = $result->getMatchmakingContextToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DoSeasonMatchmakingRequest;
import io.gs2.matchmaking.result.DoSeasonMatchmakingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DoSeasonMatchmakingResult result = client.doSeasonMatchmaking(
        new DoSeasonMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withAccessToken("accessToken-0001")
            .withMatchmakingContextToken(null)
    );
    SeasonGathering item = result.getItem();
    String matchmakingContextToken = result.getMatchmakingContextToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DoSeasonMatchmakingResult> asyncResult = null;
yield return client.DoSeasonMatchmaking(
    new Gs2.Gs2Matchmaking.Request.DoSeasonMatchmakingRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithAccessToken("accessToken-0001")
        .WithMatchmakingContextToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var matchmakingContextToken = result.MatchmakingContextToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.doSeasonMatchmaking(
        new Gs2Matchmaking.DoSeasonMatchmakingRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withAccessToken("accessToken-0001")
            .withMatchmakingContextToken(null)
    );
    const item = result.getItem();
    const matchmakingContextToken = result.getMatchmakingContextToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.do_season_matchmaking(
        matchmaking.DoSeasonMatchmakingRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_access_token('accessToken-0001')
            .with_matchmaking_context_token(None)
    )
    item = result.item
    matchmaking_context_token = result.matchmaking_context_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.do_season_matchmaking({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    accessToken="accessToken-0001",
    matchmakingContextToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;
client = gs2('matchmaking')

api_result_handler = client.do_season_matchmaking_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    accessToken="accessToken-0001",
    matchmakingContextToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;

doSeasonMatchmakingByUserId

자신이 참가할 수 있는 시즌 개더링을 찾아 참가한다

일정 시간 동안 검색을 수행하며, 대상을 찾지 못한 경우에는 매치메이킹 상태를 보유하는 토큰을 반환한다.
다음 번에 매치메이킹 상태를 보유하는 토큰을 첨부하여 다시 요청하면, 이전 검색에 이어서 검색 처리를 재개할 수 있다.
모든 시즌 개더링을 검색했지만 참가할 수 있는 시즌 개더링이 존재하지 않는 경우에는 시즌 개더링과 토큰 모두 null이 응답된다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
matchmakingContextTokenstring~ 5120자검색 재개에 사용하는 매치메이킹 상태를 보유하는 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemSeasonGathering참가한 시즌 개더링
matchmakingContextTokenstring매치메이킹 상태를 보유하는 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DoSeasonMatchmakingByUserId(
    &matchmaking.DoSeasonMatchmakingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        UserId: pointy.String("user-0001"),
        MatchmakingContextToken: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
matchmakingContextToken := result.MatchmakingContextToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DoSeasonMatchmakingByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->doSeasonMatchmakingByUserId(
        (new DoSeasonMatchmakingByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withUserId("user-0001")
            ->withMatchmakingContextToken(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $matchmakingContextToken = $result->getMatchmakingContextToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DoSeasonMatchmakingByUserIdRequest;
import io.gs2.matchmaking.result.DoSeasonMatchmakingByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DoSeasonMatchmakingByUserIdResult result = client.doSeasonMatchmakingByUserId(
        new DoSeasonMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withUserId("user-0001")
            .withMatchmakingContextToken(null)
            .withTimeOffsetToken(null)
    );
    SeasonGathering item = result.getItem();
    String matchmakingContextToken = result.getMatchmakingContextToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DoSeasonMatchmakingByUserIdResult> asyncResult = null;
yield return client.DoSeasonMatchmakingByUserId(
    new Gs2.Gs2Matchmaking.Request.DoSeasonMatchmakingByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithUserId("user-0001")
        .WithMatchmakingContextToken(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var matchmakingContextToken = result.MatchmakingContextToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.doSeasonMatchmakingByUserId(
        new Gs2Matchmaking.DoSeasonMatchmakingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withUserId("user-0001")
            .withMatchmakingContextToken(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const matchmakingContextToken = result.getMatchmakingContextToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.do_season_matchmaking_by_user_id(
        matchmaking.DoSeasonMatchmakingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_user_id('user-0001')
            .with_matchmaking_context_token(None)
            .with_time_offset_token(None)
    )
    item = result.item
    matchmaking_context_token = result.matchmaking_context_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.do_season_matchmaking_by_user_id({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    userId="user-0001",
    matchmakingContextToken=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;
client = gs2('matchmaking')

api_result_handler = client.do_season_matchmaking_by_user_id_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    userId="user-0001",
    matchmakingContextToken=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
matchmakingContextToken = result.matchmakingContextToken;

getSeasonGathering

시즌 개더링 조회

지정된 시즌 개더링의 참가자 및 티어 정보를 포함한 상세 정보를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
seasonGatheringNamestring
UUID~ 128자시즌 게더링명
시즌 게더링 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemSeasonGathering시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetSeasonGathering(
    &matchmaking.GetSeasonGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: pointy.Int64(0),
        SeasonGatheringName: pointy.String("gathering-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetSeasonGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getSeasonGathering(
        (new GetSeasonGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(0)
            ->withSeasonGatheringName("gathering-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetSeasonGatheringRequest;
import io.gs2.matchmaking.result.GetSeasonGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetSeasonGatheringResult result = client.getSeasonGathering(
        new GetSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(0L)
            .withSeasonGatheringName("gathering-0001")
    );
    SeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetSeasonGatheringResult> asyncResult = null;
yield return client.GetSeasonGathering(
    new Gs2.Gs2Matchmaking.Request.GetSeasonGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(0L)
        .WithSeasonGatheringName("gathering-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getSeasonGathering(
        new Gs2Matchmaking.GetSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(0)
            .withSeasonGatheringName("gathering-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_season_gathering(
        matchmaking.GetSeasonGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(0)
            .with_season_gathering_name('gathering-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_season_gathering({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_season_gathering_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

verifyIncludeParticipant

영속 개더링에 사용자 ID가 포함되어 있는지 검증

지정된 시즌 개더링에 사용자가 참가하고 있는지 여부를 검증합니다.
검증 타입은 ‘include’(사용자가 참가자임을 확인) 또는 ’notInclude’(사용자가 참가자가 아님을 확인)를 지정할 수 있습니다.
검증 조건이 충족되지 않으면 오류가 반환됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
seasonGatheringNamestring
UUID~ 128자시즌 게더링명
시즌 게더링 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
verifyType문자열 열거형
enum {
  “include”,
  “notInclude”
}
검증 종류
정의설명
include시즌 개더링에 지정한 사용자가 포함되어 있음
notInclude시즌 개더링에 지정한 사용자가 포함되지 않음

Result

타입설명
itemSeasonGathering시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.VerifyIncludeParticipant(
    &matchmaking.VerifyIncludeParticipantRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: pointy.Int64(0),
        SeasonGatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        VerifyType: pointy.String("include"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\VerifyIncludeParticipantRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->verifyIncludeParticipant(
        (new VerifyIncludeParticipantRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(0)
            ->withSeasonGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
            ->withVerifyType("include")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.VerifyIncludeParticipantRequest;
import io.gs2.matchmaking.result.VerifyIncludeParticipantResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    VerifyIncludeParticipantResult result = client.verifyIncludeParticipant(
        new VerifyIncludeParticipantRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(0L)
            .withSeasonGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("include")
    );
    SeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.VerifyIncludeParticipantResult> asyncResult = null;
yield return client.VerifyIncludeParticipant(
    new Gs2.Gs2Matchmaking.Request.VerifyIncludeParticipantRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(0L)
        .WithSeasonGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001")
        .WithVerifyType("include"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.verifyIncludeParticipant(
        new Gs2Matchmaking.VerifyIncludeParticipantRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(0)
            .withSeasonGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("include")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.verify_include_participant(
        matchmaking.VerifyIncludeParticipantRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(0)
            .with_season_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
            .with_verify_type('include')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.verify_include_participant({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
    accessToken="accessToken-0001",
    verifyType="include",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.verify_include_participant_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
    accessToken="accessToken-0001",
    verifyType="include",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

verifyIncludeParticipantByUserId

사용자 ID를 지정하여 영속 개더링에 사용자 ID가 포함되어 있는지 검증

지정된 사용자가 시즌 개더링에 참가하고 있는지 여부를 검증합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
seasonGatheringNamestring
UUID~ 128자시즌 게더링명
시즌 게더링 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
verifyType문자열 열거형
enum {
  “include”,
  “notInclude”
}
검증 종류
정의설명
include시즌 개더링에 지정한 사용자가 포함되어 있음
notInclude시즌 개더링에 지정한 사용자가 포함되지 않음
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemSeasonGathering시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.VerifyIncludeParticipantByUserId(
    &matchmaking.VerifyIncludeParticipantByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: pointy.Int64(0),
        SeasonGatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        VerifyType: pointy.String("include"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\VerifyIncludeParticipantByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->verifyIncludeParticipantByUserId(
        (new VerifyIncludeParticipantByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(0)
            ->withSeasonGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withVerifyType("include")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.VerifyIncludeParticipantByUserIdRequest;
import io.gs2.matchmaking.result.VerifyIncludeParticipantByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    VerifyIncludeParticipantByUserIdResult result = client.verifyIncludeParticipantByUserId(
        new VerifyIncludeParticipantByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(0L)
            .withSeasonGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withVerifyType("include")
            .withTimeOffsetToken(null)
    );
    SeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.VerifyIncludeParticipantByUserIdResult> asyncResult = null;
yield return client.VerifyIncludeParticipantByUserId(
    new Gs2.Gs2Matchmaking.Request.VerifyIncludeParticipantByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(0L)
        .WithSeasonGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithVerifyType("include")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.verifyIncludeParticipantByUserId(
        new Gs2Matchmaking.VerifyIncludeParticipantByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(0)
            .withSeasonGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withVerifyType("include")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.verify_include_participant_by_user_id(
        matchmaking.VerifyIncludeParticipantByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(0)
            .with_season_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_verify_type('include')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.verify_include_participant_by_user_id({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
    userId="user-0001",
    verifyType="include",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.verify_include_participant_by_user_id_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
    userId="user-0001",
    verifyType="include",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteSeasonGathering

시즌 개더링 삭제

지정된 시즌 개더링 및 관련된 모든 참가자 레코드를 삭제합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong
0 ~ 9223372036854775805시즌
tierlong
0 ~ 9223372036854775805티어
비슷한 랭크의 플레이어를 그룹화하기 위한 티어 레벨입니다.
SeasonModel에서 지정된 GS2-Experience 모델에서의 플레이어 랭크에 따라 결정됩니다.
플레이어는 동일한 티어의 플레이어와만 매칭되어 공평한 대전이 보장됩니다.
seasonGatheringNamestring
UUID~ 128자시즌 게더링명
시즌 게더링 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemSeasonGathering삭제한 시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteSeasonGathering(
    &matchmaking.DeleteSeasonGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        Tier: pointy.Int64(0),
        SeasonGatheringName: pointy.String("gathering-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteSeasonGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteSeasonGathering(
        (new DeleteSeasonGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTier(0)
            ->withSeasonGatheringName("gathering-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteSeasonGatheringRequest;
import io.gs2.matchmaking.result.DeleteSeasonGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteSeasonGatheringResult result = client.deleteSeasonGathering(
        new DeleteSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTier(0L)
            .withSeasonGatheringName("gathering-0001")
    );
    SeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteSeasonGatheringResult> asyncResult = null;
yield return client.DeleteSeasonGathering(
    new Gs2.Gs2Matchmaking.Request.DeleteSeasonGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTier(0L)
        .WithSeasonGatheringName("gathering-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteSeasonGathering(
        new Gs2Matchmaking.DeleteSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTier(0)
            .withSeasonGatheringName("gathering-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_season_gathering(
        matchmaking.DeleteSeasonGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_tier(0)
            .with_season_gathering_name('gathering-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_season_gathering({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_season_gathering_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    season=0,
    tier=0,
    seasonGatheringName="gathering-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeJoinedSeasonGatherings

참가한 시즌 개더링 목록 조회

요청한 사용자가 참가한 시즌 개더링의 페이지네이션 목록을 조회합니다.
시즌 이름으로 필터링할 수 있습니다. 플레이어가 속한 시즌 매치메이킹 그룹을 확인할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
seasonNamestring~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<JoinedSeasonGathering>시즌 개더링 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeJoinedSeasonGatherings(
    &matchmaking.DescribeJoinedSeasonGatheringsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        SeasonName: pointy.String("season-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeJoinedSeasonGatheringsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeJoinedSeasonGatherings(
        (new DescribeJoinedSeasonGatheringsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeasonName("season-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeJoinedSeasonGatheringsRequest;
import io.gs2.matchmaking.result.DescribeJoinedSeasonGatheringsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeJoinedSeasonGatheringsResult result = client.describeJoinedSeasonGatherings(
        new DescribeJoinedSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withSeasonName("season-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<JoinedSeasonGathering> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeJoinedSeasonGatheringsResult> asyncResult = null;
yield return client.DescribeJoinedSeasonGatherings(
    new Gs2.Gs2Matchmaking.Request.DescribeJoinedSeasonGatheringsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeasonName("season-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeJoinedSeasonGatherings(
        new Gs2Matchmaking.DescribeJoinedSeasonGatheringsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withSeasonName("season-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_joined_season_gatherings(
        matchmaking.DescribeJoinedSeasonGatheringsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_season_name('season-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_joined_season_gatherings({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    seasonName="season-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_joined_season_gatherings_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    seasonName="season-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

describeJoinedSeasonGatheringsByUserId

사용자 ID를 지정하여 참가한 시즌 개더링 목록 조회

지정된 사용자가 참가한 시즌 개더링의 페이지네이션 목록을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
seasonNamestring~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemsList<JoinedSeasonGathering>시즌 개더링 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeJoinedSeasonGatheringsByUserId(
    &matchmaking.DescribeJoinedSeasonGatheringsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        SeasonName: pointy.String("season-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeJoinedSeasonGatheringsByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeJoinedSeasonGatheringsByUserId(
        (new DescribeJoinedSeasonGatheringsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withSeasonName("season-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeJoinedSeasonGatheringsByUserIdRequest;
import io.gs2.matchmaking.result.DescribeJoinedSeasonGatheringsByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeJoinedSeasonGatheringsByUserIdResult result = client.describeJoinedSeasonGatheringsByUserId(
        new DescribeJoinedSeasonGatheringsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withSeasonName("season-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<JoinedSeasonGathering> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeJoinedSeasonGatheringsByUserIdResult> asyncResult = null;
yield return client.DescribeJoinedSeasonGatheringsByUserId(
    new Gs2.Gs2Matchmaking.Request.DescribeJoinedSeasonGatheringsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithSeasonName("season-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeJoinedSeasonGatheringsByUserId(
        new Gs2Matchmaking.DescribeJoinedSeasonGatheringsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withSeasonName("season-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_joined_season_gatherings_by_user_id(
        matchmaking.DescribeJoinedSeasonGatheringsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_season_name('season-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_joined_season_gatherings_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    seasonName="season-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_joined_season_gatherings_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    seasonName="season-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

getJoinedSeasonGathering

참가한 시즌 개더링 조회

지정된 시즌에서 요청한 사용자가 참가한 시즌 개더링을 조회합니다.
대상 개더링이 이미 존재하지 않는 경우, 참가 기록은 자동으로 정리(클린업)됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong0 ~ 9223372036854775805시즌

Result

타입설명
itemJoinedSeasonGathering시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetJoinedSeasonGathering(
    &matchmaking.GetJoinedSeasonGatheringRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetJoinedSeasonGatheringRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getJoinedSeasonGathering(
        (new GetJoinedSeasonGatheringRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetJoinedSeasonGatheringRequest;
import io.gs2.matchmaking.result.GetJoinedSeasonGatheringResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetJoinedSeasonGatheringResult result = client.getJoinedSeasonGathering(
        new GetJoinedSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
    );
    JoinedSeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetJoinedSeasonGatheringResult> asyncResult = null;
yield return client.GetJoinedSeasonGathering(
    new Gs2.Gs2Matchmaking.Request.GetJoinedSeasonGatheringRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getJoinedSeasonGathering(
        new Gs2Matchmaking.GetJoinedSeasonGatheringRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_joined_season_gathering(
        matchmaking.GetJoinedSeasonGatheringRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_season_name('season-0001')
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_joined_season_gathering({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    seasonName="season-0001",
    season=0,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_joined_season_gathering_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    seasonName="season-0001",
    season=0,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getJoinedSeasonGatheringByUserId

사용자 ID를 지정하여 참가한 시즌 개더링 조회

지정된 사용자가 지정 시즌에서 참가한 시즌 개더링을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonlong0 ~ 9223372036854775805시즌
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemJoinedSeasonGathering시즌 개더링

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetJoinedSeasonGatheringByUserId(
    &matchmaking.GetJoinedSeasonGatheringByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        SeasonName: pointy.String("season-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetJoinedSeasonGatheringByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getJoinedSeasonGatheringByUserId(
        (new GetJoinedSeasonGatheringByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withSeasonName("season-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetJoinedSeasonGatheringByUserIdRequest;
import io.gs2.matchmaking.result.GetJoinedSeasonGatheringByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetJoinedSeasonGatheringByUserIdResult result = client.getJoinedSeasonGatheringByUserId(
        new GetJoinedSeasonGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withSeasonName("season-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    JoinedSeasonGathering item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetJoinedSeasonGatheringByUserIdResult> asyncResult = null;
yield return client.GetJoinedSeasonGatheringByUserId(
    new Gs2.Gs2Matchmaking.Request.GetJoinedSeasonGatheringByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithSeasonName("season-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getJoinedSeasonGatheringByUserId(
        new Gs2Matchmaking.GetJoinedSeasonGatheringByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withSeasonName("season-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_joined_season_gathering_by_user_id(
        matchmaking.GetJoinedSeasonGatheringByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_season_name('season-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_joined_season_gathering_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    seasonName="season-0001",
    season=0,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_joined_season_gathering_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    seasonName="season-0001",
    season=0,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeRatings

레이팅 목록 조회

요청한 사용자의 모든 레이팅 엔트리에 대한 페이지네이션 목록을 조회합니다.
각 레이팅 엔트리에는 Glicko-2 알고리즘을 기반으로 한 현재 레이팅 값과 레이팅 편차(RD)가 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<Rating>레이팅 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeRatings(
    &matchmaking.DescribeRatingsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeRatingsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeRatings(
        (new DescribeRatingsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeRatingsRequest;
import io.gs2.matchmaking.result.DescribeRatingsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeRatingsResult result = client.describeRatings(
        new DescribeRatingsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Rating> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeRatingsResult> asyncResult = null;
yield return client.DescribeRatings(
    new Gs2.Gs2Matchmaking.Request.DescribeRatingsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeRatings(
        new Gs2Matchmaking.DescribeRatingsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_ratings(
        matchmaking.DescribeRatingsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_ratings({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_ratings_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

describeRatingsByUserId

사용자 ID를 지정하여 레이팅 목록 조회

지정된 사용자의 모든 레이팅 엔트리에 대한 페이지네이션 목록을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemsList<Rating>레이팅 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeRatingsByUserId(
    &matchmaking.DescribeRatingsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeRatingsByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeRatingsByUserId(
        (new DescribeRatingsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeRatingsByUserIdRequest;
import io.gs2.matchmaking.result.DescribeRatingsByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeRatingsByUserIdResult result = client.describeRatingsByUserId(
        new DescribeRatingsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Rating> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeRatingsByUserIdResult> asyncResult = null;
yield return client.DescribeRatingsByUserId(
    new Gs2.Gs2Matchmaking.Request.DescribeRatingsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeRatingsByUserId(
        new Gs2Matchmaking.DescribeRatingsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_ratings_by_user_id(
        matchmaking.DescribeRatingsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_ratings_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_ratings_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

getRating

레이팅 조회

지정된 레이팅 모델의 현재 레이팅 값과 레이팅 편차(RD)를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
ratingNamestring
~ 128자레이팅 이름
레이팅 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemRating레이팅

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetRating(
    &matchmaking.GetRatingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RatingName: pointy.String("rating-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetRatingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getRating(
        (new GetRatingRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRatingName("rating-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetRatingRequest;
import io.gs2.matchmaking.result.GetRatingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetRatingResult result = client.getRating(
        new GetRatingRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRatingName("rating-0001")
    );
    Rating item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetRatingResult> asyncResult = null;
yield return client.GetRating(
    new Gs2.Gs2Matchmaking.Request.GetRatingRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRatingName("rating-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getRating(
        new Gs2Matchmaking.GetRatingRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRatingName("rating-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_rating(
        matchmaking.GetRatingRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_rating_name('rating-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_rating({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    ratingName="rating-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_rating_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    ratingName="rating-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getRatingByUserId

사용자 ID를 지정하여 레이팅 조회

지정된 사용자와 레이팅 모델의 현재 레이팅 값과 레이팅 편차(RD)를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
ratingNamestring
~ 128자레이팅 이름
레이팅 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemRating레이팅

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetRatingByUserId(
    &matchmaking.GetRatingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RatingName: pointy.String("rating-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetRatingByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getRatingByUserId(
        (new GetRatingByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRatingName("rating-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetRatingByUserIdRequest;
import io.gs2.matchmaking.result.GetRatingByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetRatingByUserIdResult result = client.getRatingByUserId(
        new GetRatingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRatingName("rating-0001")
            .withTimeOffsetToken(null)
    );
    Rating item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetRatingByUserIdResult> asyncResult = null;
yield return client.GetRatingByUserId(
    new Gs2.Gs2Matchmaking.Request.GetRatingByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRatingName("rating-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getRatingByUserId(
        new Gs2Matchmaking.GetRatingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRatingName("rating-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_rating_by_user_id(
        matchmaking.GetRatingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_rating_name('rating-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_rating_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    ratingName="rating-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_rating_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    ratingName="rating-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

putResult

레이팅 값 재계산 실행

레이팅 계산 처리에는 Glicko-2 rating system을 기반으로 한 계산 알고리즘을 채택하고 있습니다.
레이팅 값의 초기값은 1500이며, 레이팅 값 차이가 큰 상대에게 승리할수록 상승폭이 커지고, 마찬가지로 패배한 측은 감소폭이 커집니다.

레이팅 계산에는 참가한 사용자 ID의 리스트가 필요합니다.
따라서 클라이언트에서 직접 이 API를 호출하는 것은 적절하지 않습니다. 게임의 승패를 판단할 수 있는 게임 서버에서 호출하도록 해주세요.
P2P 대전 등 클라이언트 주도로 대전을 구현하는 경우에는 투표 기능을 이용하여 승패를 결정하도록 해주세요.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 이름
레이팅 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
gameResultsList<GameResult>0 ~ 10 items대전 결과

Result

타입설명
itemsList<Rating>갱신 후 레이팅 목록

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.PutResult(
    &matchmaking.PutResultRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("rating-0001"),
        GameResults: []matchmaking.GameResult{
            matchmaking.GameResult{
                Rank: pointy.Int32(1),
                UserId: pointy.String("user-0001"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0002"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0003"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(3),
                UserId: pointy.String("user-0004"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\PutResultRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->putResult(
        (new PutResultRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("rating-0001")
            ->withGameResults([
                (new GameResult())
                    ->withRank(1)
                    ->withUserId("user-0001"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0002"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0003"),
                (new GameResult())
                    ->withRank(3)
                    ->withUserId("user-0004"),
            ])
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.PutResultRequest;
import io.gs2.matchmaking.result.PutResultResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    PutResultResult result = client.putResult(
        new PutResultRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGameResults(Arrays.asList(
                new GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new GameResult()
                    .withRank(3)
                    .withUserId("user-0004")
            ))
    );
    List<Rating> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.PutResultResult> asyncResult = null;
yield return client.PutResult(
    new Gs2.Gs2Matchmaking.Request.PutResultRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("rating-0001")
        .WithGameResults(new Gs2.Gs2Matchmaking.Model.GameResult[] {
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(1)
                .WithUserId("user-0001"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0002"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0003"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(3)
                .WithUserId("user-0004"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.putResult(
        new Gs2Matchmaking.PutResultRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGameResults([
                new Gs2Matchmaking.model.GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(3)
                    .withUserId("user-0004"),
            ])
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.put_result(
        matchmaking.PutResultRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('rating-0001')
            .with_game_results([
                matchmaking.GameResult()
                    .with_rank(1)
                    .with_user_id('user-0001'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0002'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0003'),
                matchmaking.GameResult()
                    .with_rank(3)
                    .with_user_id('user-0004'),
            ])
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.put_result({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
client = gs2('matchmaking')

api_result_handler = client.put_result_async({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

deleteRating

레이팅 삭제

지정된 사용자의 레이팅 기록을 삭제하고, 다음 레이팅 계산 시 초기값으로 재설정합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
ratingNamestring
~ 128자레이팅 이름
레이팅 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemRating삭제된 레이팅

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteRating(
    &matchmaking.DeleteRatingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RatingName: pointy.String("rating-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteRatingRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteRating(
        (new DeleteRatingRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRatingName("rating-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteRatingRequest;
import io.gs2.matchmaking.result.DeleteRatingResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteRatingResult result = client.deleteRating(
        new DeleteRatingRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRatingName("rating-0001")
            .withTimeOffsetToken(null)
    );
    Rating item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteRatingResult> asyncResult = null;
yield return client.DeleteRating(
    new Gs2.Gs2Matchmaking.Request.DeleteRatingRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRatingName("rating-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteRating(
        new Gs2Matchmaking.DeleteRatingRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRatingName("rating-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_rating(
        matchmaking.DeleteRatingRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_rating_name('rating-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_rating({
    namespaceName="namespace-0001",
    userId="user-0001",
    ratingName="rating-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_rating_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    ratingName="rating-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getBallot

서명과 함께 투표용지 생성

투표 프로세스에서 사용하기 위한 암호 서명이 첨부된 투표용지를 생성합니다.
투표용지에는 레이팅 이름, 개더링 이름, 사용자 ID, 참가 인원이 포함되며, 변조 감지를 위해 지정된 GS2-Key로 서명됩니다.
반환된 바디와 서명을 Vote 또는 VoteMultiple 엔드포인트로 전송해 주세요.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
accessTokenstring
~ 128자액세스 토큰
numberOfPlayerint
2 ~ 10참가 인원
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemBallot투표용지
bodystring서명 대상 데이터
signaturestring서명 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetBallot(
    &matchmaking.GetBallotRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("rating-0001"),
        GatheringName: pointy.String("gathering-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        NumberOfPlayer: pointy.Int32(4),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetBallotRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getBallot(
        (new GetBallotRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("rating-0001")
            ->withGatheringName("gathering-0001")
            ->withAccessToken("accessToken-0001")
            ->withNumberOfPlayer(4)
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetBallotRequest;
import io.gs2.matchmaking.result.GetBallotResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetBallotResult result = client.getBallot(
        new GetBallotRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withNumberOfPlayer(4)
            .withKeyId("key-0001")
    );
    Ballot item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetBallotResult> asyncResult = null;
yield return client.GetBallot(
    new Gs2.Gs2Matchmaking.Request.GetBallotRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("rating-0001")
        .WithGatheringName("gathering-0001")
        .WithAccessToken("accessToken-0001")
        .WithNumberOfPlayer(4)
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getBallot(
        new Gs2Matchmaking.GetBallotRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
            .withAccessToken("accessToken-0001")
            .withNumberOfPlayer(4)
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_ballot(
        matchmaking.GetBallotRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('rating-0001')
            .with_gathering_name('gathering-0001')
            .with_access_token('accessToken-0001')
            .with_number_of_player(4)
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_ballot({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
    numberOfPlayer=4,
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
client = gs2('matchmaking')

api_result_handler = client.get_ballot_async({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
    accessToken="accessToken-0001",
    numberOfPlayer=4,
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

getBallotByUserId

사용자 ID를 지정하여 서명과 함께 투표용지 생성

지정된 사용자의 투표 프로세스에서 사용하기 위한 암호 서명이 첨부된 투표용지를 생성합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.
userIdstring
~ 128자사용자ID
numberOfPlayerint
2 ~ 10참가 인원
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemBallot투표용지
bodystring서명 대상 데이터
signaturestring서명 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetBallotByUserId(
    &matchmaking.GetBallotByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("rating-0001"),
        GatheringName: pointy.String("gathering-0001"),
        UserId: pointy.String("user-0001"),
        NumberOfPlayer: pointy.Int32(4),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetBallotByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getBallotByUserId(
        (new GetBallotByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("rating-0001")
            ->withGatheringName("gathering-0001")
            ->withUserId("user-0001")
            ->withNumberOfPlayer(4)
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetBallotByUserIdRequest;
import io.gs2.matchmaking.result.GetBallotByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetBallotByUserIdResult result = client.getBallotByUserId(
        new GetBallotByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withNumberOfPlayer(4)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    Ballot item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetBallotByUserIdResult> asyncResult = null;
yield return client.GetBallotByUserId(
    new Gs2.Gs2Matchmaking.Request.GetBallotByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("rating-0001")
        .WithGatheringName("gathering-0001")
        .WithUserId("user-0001")
        .WithNumberOfPlayer(4)
        .WithKeyId("key-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getBallotByUserId(
        new Gs2Matchmaking.GetBallotByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
            .withUserId("user-0001")
            .withNumberOfPlayer(4)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_ballot_by_user_id(
        matchmaking.GetBallotByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('rating-0001')
            .with_gathering_name('gathering-0001')
            .with_user_id('user-0001')
            .with_number_of_player(4)
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_ballot_by_user_id({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    numberOfPlayer=4,
    keyId="key-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
client = gs2('matchmaking')

api_result_handler = client.get_ballot_by_user_id_async({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
    userId="user-0001",
    numberOfPlayer=4,
    keyId="key-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

vote

대전 결과를 투표

투표는 최초 투표가 이루어진 후 5분 이내에 진행해야 합니다.
즉, 결과는 즉시 반영되지 않고, 투표 시작으로부터 약 5분 후 또는 모든 플레이어가 투표를 완료했을 때 반영됩니다.
5분 이내에 모든 투표용지를 회수하지 못한 경우, 그 시점까지의 투표 내용으로 다수결을 취해 결과를 결정합니다.
각 결과의 투표 수가 동일할 경우 결과는 폐기됩니다(스크립트로 동작을 변경 가능).

결과를 즉시 반영하고 싶은 경우, 승리한 측의 대표 플레이어가 각 플레이어로부터 투표용지를 모아 voteMultiple을 호출하면 결과를 즉시 반영할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ballotBodystring
~ 1024자투표용지의 서명 대상 데이터
ballotSignaturestring
~ 256자투표용지의 서명
gameResultsList<GameResult>0 ~ 10 items투표 내용. 대전을 진행한 플레이어 그룹 1에 속한 사용자 ID 리스트
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemBallot투표용지

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.Vote(
    &matchmaking.VoteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        BallotBody: pointy.String("ballotBody..."),
        BallotSignature: pointy.String("ballotSignature..."),
        GameResults: []matchmaking.GameResult{
            matchmaking.GameResult{
                Rank: pointy.Int32(1),
                UserId: pointy.String("user-0001"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0002"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0003"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(3),
                UserId: pointy.String("user-0004"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\VoteRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->vote(
        (new VoteRequest())
            ->withNamespaceName("namespace-0001")
            ->withBallotBody("ballotBody...")
            ->withBallotSignature("ballotSignature...")
            ->withGameResults([
                (new GameResult())
                    ->withRank(1)
                    ->withUserId("user-0001"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0002"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0003"),
                (new GameResult())
                    ->withRank(3)
                    ->withUserId("user-0004"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.VoteRequest;
import io.gs2.matchmaking.result.VoteResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    VoteResult result = client.vote(
        new VoteRequest()
            .withNamespaceName("namespace-0001")
            .withBallotBody("ballotBody...")
            .withBallotSignature("ballotSignature...")
            .withGameResults(Arrays.asList(
                new GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new GameResult()
                    .withRank(3)
                    .withUserId("user-0004")
            ))
            .withKeyId("key-0001")
    );
    Ballot item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.VoteResult> asyncResult = null;
yield return client.Vote(
    new Gs2.Gs2Matchmaking.Request.VoteRequest()
        .WithNamespaceName("namespace-0001")
        .WithBallotBody("ballotBody...")
        .WithBallotSignature("ballotSignature...")
        .WithGameResults(new Gs2.Gs2Matchmaking.Model.GameResult[] {
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(1)
                .WithUserId("user-0001"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0002"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0003"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(3)
                .WithUserId("user-0004"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.vote(
        new Gs2Matchmaking.VoteRequest()
            .withNamespaceName("namespace-0001")
            .withBallotBody("ballotBody...")
            .withBallotSignature("ballotSignature...")
            .withGameResults([
                new Gs2Matchmaking.model.GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(3)
                    .withUserId("user-0004"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.vote(
        matchmaking.VoteRequest()
            .with_namespace_name('namespace-0001')
            .with_ballot_body('ballotBody...')
            .with_ballot_signature('ballotSignature...')
            .with_game_results([
                matchmaking.GameResult()
                    .with_rank(1)
                    .with_user_id('user-0001'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0002'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0003'),
                matchmaking.GameResult()
                    .with_rank(3)
                    .with_user_id('user-0004'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.vote({
    namespaceName="namespace-0001",
    ballotBody="ballotBody...",
    ballotSignature="ballotSignature...",
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.vote_async({
    namespaceName="namespace-0001",
    ballotBody="ballotBody...",
    ballotSignature="ballotSignature...",
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

voteMultiple

대전 결과를 일괄 투표

게임에서 승리한 측이 다른 플레이어들의 투표용지를 모아 일괄로 투표할 때 사용합니다.
‘승리한 측’이라고 표현한 이유는, 패배한 측이 자신들이 이긴 것으로 보고할 유인은 있지만 그 반대는 없기 때문입니다.
패배한 측이 투표용지를 건네지 않을 가능성이 있지만, 그 경우에도 과반수의 투표용지만 있으면 결과를 통과시킬 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
signedBallotsList<SignedBallot>0 ~ 10 items서명이 첨부된 투표용지 리스트
gameResultsList<GameResult>0 ~ 10 items투표 내용. 대전을 진행한 플레이어 그룹 1에 속한 사용자 ID 리스트
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemBallot투표용지

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.VoteMultiple(
    &matchmaking.VoteMultipleRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SignedBallots: []matchmaking.SignedBallot{
            matchmaking.SignedBallot{
                Body: pointy.String("aaa"),
                Signature: pointy.String("bbb"),
            },
            matchmaking.SignedBallot{
                Body: pointy.String("aaa"),
                Signature: pointy.String("bbb"),
            },
            matchmaking.SignedBallot{
                Body: pointy.String("aaa"),
                Signature: pointy.String("bbb"),
            },
            matchmaking.SignedBallot{
                Body: pointy.String("aaa"),
                Signature: pointy.String("bbb"),
            },
        },
        GameResults: []matchmaking.GameResult{
            matchmaking.GameResult{
                Rank: pointy.Int32(1),
                UserId: pointy.String("user-0001"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0002"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(2),
                UserId: pointy.String("user-0003"),
            },
            matchmaking.GameResult{
                Rank: pointy.Int32(3),
                UserId: pointy.String("user-0004"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\VoteMultipleRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->voteMultiple(
        (new VoteMultipleRequest())
            ->withNamespaceName("namespace-0001")
            ->withSignedBallots([
                (new SignedBallot())
                    ->withBody("aaa")
                    ->withSignature("bbb"),
                (new SignedBallot())
                    ->withBody("aaa")
                    ->withSignature("bbb"),
                (new SignedBallot())
                    ->withBody("aaa")
                    ->withSignature("bbb"),
                (new SignedBallot())
                    ->withBody("aaa")
                    ->withSignature("bbb"),
            ])
            ->withGameResults([
                (new GameResult())
                    ->withRank(1)
                    ->withUserId("user-0001"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0002"),
                (new GameResult())
                    ->withRank(2)
                    ->withUserId("user-0003"),
                (new GameResult())
                    ->withRank(3)
                    ->withUserId("user-0004"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.VoteMultipleRequest;
import io.gs2.matchmaking.result.VoteMultipleResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    VoteMultipleResult result = client.voteMultiple(
        new VoteMultipleRequest()
            .withNamespaceName("namespace-0001")
            .withSignedBallots(Arrays.asList(
                new SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb")
            ))
            .withGameResults(Arrays.asList(
                new GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new GameResult()
                    .withRank(3)
                    .withUserId("user-0004")
            ))
            .withKeyId("key-0001")
    );
    Ballot item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.VoteMultipleResult> asyncResult = null;
yield return client.VoteMultiple(
    new Gs2.Gs2Matchmaking.Request.VoteMultipleRequest()
        .WithNamespaceName("namespace-0001")
        .WithSignedBallots(new Gs2.Gs2Matchmaking.Model.SignedBallot[] {
            new Gs2.Gs2Matchmaking.Model.SignedBallot()
                .WithBody("aaa")
                .WithSignature("bbb"),
            new Gs2.Gs2Matchmaking.Model.SignedBallot()
                .WithBody("aaa")
                .WithSignature("bbb"),
            new Gs2.Gs2Matchmaking.Model.SignedBallot()
                .WithBody("aaa")
                .WithSignature("bbb"),
            new Gs2.Gs2Matchmaking.Model.SignedBallot()
                .WithBody("aaa")
                .WithSignature("bbb"),
        })
        .WithGameResults(new Gs2.Gs2Matchmaking.Model.GameResult[] {
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(1)
                .WithUserId("user-0001"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0002"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(2)
                .WithUserId("user-0003"),
            new Gs2.Gs2Matchmaking.Model.GameResult()
                .WithRank(3)
                .WithUserId("user-0004"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.voteMultiple(
        new Gs2Matchmaking.VoteMultipleRequest()
            .withNamespaceName("namespace-0001")
            .withSignedBallots([
                new Gs2Matchmaking.model.SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new Gs2Matchmaking.model.SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new Gs2Matchmaking.model.SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
                new Gs2Matchmaking.model.SignedBallot()
                    .withBody("aaa")
                    .withSignature("bbb"),
            ])
            .withGameResults([
                new Gs2Matchmaking.model.GameResult()
                    .withRank(1)
                    .withUserId("user-0001"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0002"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(2)
                    .withUserId("user-0003"),
                new Gs2Matchmaking.model.GameResult()
                    .withRank(3)
                    .withUserId("user-0004"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.vote_multiple(
        matchmaking.VoteMultipleRequest()
            .with_namespace_name('namespace-0001')
            .with_signed_ballots([
                matchmaking.SignedBallot()
                    .with_body('aaa')
                    .with_signature('bbb'),
                matchmaking.SignedBallot()
                    .with_body('aaa')
                    .with_signature('bbb'),
                matchmaking.SignedBallot()
                    .with_body('aaa')
                    .with_signature('bbb'),
                matchmaking.SignedBallot()
                    .with_body('aaa')
                    .with_signature('bbb'),
            ])
            .with_game_results([
                matchmaking.GameResult()
                    .with_rank(1)
                    .with_user_id('user-0001'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0002'),
                matchmaking.GameResult()
                    .with_rank(2)
                    .with_user_id('user-0003'),
                matchmaking.GameResult()
                    .with_rank(3)
                    .with_user_id('user-0004'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.vote_multiple({
    namespaceName="namespace-0001",
    signedBallots={
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        }
    },
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.vote_multiple_async({
    namespaceName="namespace-0001",
    signedBallots={
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        },
        {
            body="aaa",
            signature="bbb",
        }
    },
    gameResults={
        {
            rank=1,
            user_id="user-0001",
        },
        {
            rank=2,
            user_id="user-0002",
        },
        {
            rank=2,
            user_id="user-0003",
        },
        {
            rank=3,
            user_id="user-0004",
        }
    },
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

commitVote

투표 상황을 강제 확정

지정된 개더링의 투표 프로세스를 강제로 완료합니다.
결과는 지금까지 수집된 투표용지를 기반으로 다수결로 결정됩니다. 표가 동수인 경우 결과는 폐기됩니다(스크립트로 동작 변경 가능).

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.
gatheringNamestring
UUID~ 128자개더링 이름
개더링의 고유한 이름을 보유합니다.
이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 개더링을 식별하기 위해 사용됩니다.

Result

반환값: 없음

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CommitVote(
    &matchmaking.CommitVoteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("rating-0001"),
        GatheringName: pointy.String("gathering-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CommitVoteRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->commitVote(
        (new CommitVoteRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("rating-0001")
            ->withGatheringName("gathering-0001")
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CommitVoteRequest;
import io.gs2.matchmaking.result.CommitVoteResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CommitVoteResult result = client.commitVote(
        new CommitVoteRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CommitVoteResult> asyncResult = null;
yield return client.CommitVote(
    new Gs2.Gs2Matchmaking.Request.CommitVoteRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("rating-0001")
        .WithGatheringName("gathering-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.commitVote(
        new Gs2Matchmaking.CommitVoteRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("rating-0001")
            .withGatheringName("gathering-0001")
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.commit_vote(
        matchmaking.CommitVoteRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('rating-0001')
            .with_gathering_name('gathering-0001')
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.commit_vote({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
client = gs2('matchmaking')

api_result_handler = client.commit_vote_async({
    namespaceName="namespace-0001",
    ratingName="rating-0001",
    gatheringName="gathering-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

describeRatingModels

레이팅 모델 목록 조회

지정된 네임스페이스의 현재 활성화된 레이팅 모델 목록을 조회합니다.
레이팅 모델은 초기값이나 변동성 등 Glicko-2 알고리즘의 매개변수를 정의합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemsList<RatingModel>레이팅 모델 리스트

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeRatingModels(
    &matchmaking.DescribeRatingModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeRatingModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeRatingModels(
        (new DescribeRatingModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeRatingModelsRequest;
import io.gs2.matchmaking.result.DescribeRatingModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeRatingModelsResult result = client.describeRatingModels(
        new DescribeRatingModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<RatingModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeRatingModelsResult> asyncResult = null;
yield return client.DescribeRatingModels(
    new Gs2.Gs2Matchmaking.Request.DescribeRatingModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeRatingModels(
        new Gs2Matchmaking.DescribeRatingModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_rating_models(
        matchmaking.DescribeRatingModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_rating_models({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
client = gs2('matchmaking')

api_result_handler = client.describe_rating_models_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

getRatingModel

레이팅 모델 조회

지정된 레이팅 모델의 Glicko-2 알고리즘 초기값 및 변동성 설정을 포함한 정보를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름. 영숫자 및 -(하이픈), _(밑줄), .(마침표)로 지정합니다.

Result

타입설명
itemRatingModel레이팅 모델

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetRatingModel(
    &matchmaking.GetRatingModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("mode1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetRatingModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getRatingModel(
        (new GetRatingModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("mode1")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetRatingModelRequest;
import io.gs2.matchmaking.result.GetRatingModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetRatingModelResult result = client.getRatingModel(
        new GetRatingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    RatingModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetRatingModelResult> asyncResult = null;
yield return client.GetRatingModel(
    new Gs2.Gs2Matchmaking.Request.GetRatingModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("mode1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getRatingModel(
        new Gs2Matchmaking.GetRatingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_rating_model(
        matchmaking.GetRatingModelRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('mode1')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_rating_model({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_rating_model_async({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeSeasonModels

시즌 모델 목록 취득

지정된 네임스페이스의 현재 활성화된 시즌 모델 목록을 취득합니다.
시즌 모델은 최대 참가 인원수, 경험치 모델을 사용한 티어 계산, 챌린지 기간 이벤트를 정의합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemsList<SeasonModel>시즌 모델 목록

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeSeasonModels(
    &matchmaking.DescribeSeasonModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeSeasonModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeSeasonModels(
        (new DescribeSeasonModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeSeasonModelsRequest;
import io.gs2.matchmaking.result.DescribeSeasonModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeSeasonModelsResult result = client.describeSeasonModels(
        new DescribeSeasonModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<SeasonModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeSeasonModelsResult> asyncResult = null;
yield return client.DescribeSeasonModels(
    new Gs2.Gs2Matchmaking.Request.DescribeSeasonModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeSeasonModels(
        new Gs2Matchmaking.DescribeSeasonModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_season_models(
        matchmaking.DescribeSeasonModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_season_models({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
client = gs2('matchmaking')

api_result_handler = client.describe_season_models_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

getSeasonModel

시즌 모델 취득

지정된 시즌 모델의 최대 참가 인원수, 티어 계산용 경험치 모델 ID, 챌린지 기간 이벤트 ID를 포함한 정보를 취득합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델 이름
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemSeasonModel시즌 모델

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetSeasonModel(
    &matchmaking.GetSeasonModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetSeasonModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getSeasonModel(
        (new GetSeasonModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetSeasonModelRequest;
import io.gs2.matchmaking.result.GetSeasonModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetSeasonModelResult result = client.getSeasonModel(
        new GetSeasonModelRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    SeasonModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetSeasonModelResult> asyncResult = null;
yield return client.GetSeasonModel(
    new Gs2.Gs2Matchmaking.Request.GetSeasonModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getSeasonModel(
        new Gs2Matchmaking.GetSeasonModelRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_season_model(
        matchmaking.GetSeasonModelRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_season_model({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_season_model_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

exportMaster

모델 마스터를 활성화 가능한 마스터 데이터 형식으로 익스포트

현재 활성화된 레이팅 모델 마스터와 시즌 모델 마스터를 활성화 가능한 형식으로 익스포트합니다.
익스포트된 데이터는 다른 네임스페이스의 마스터 데이터 갱신이나 백업 용도로 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemCurrentModelMaster활성화 가능한 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &matchmaking.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\ExportMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.ExportMasterRequest;
import io.gs2.matchmaking.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Matchmaking.Request.ExportMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.exportMaster(
        new Gs2Matchmaking.ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.export_master(
        matchmaking.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.export_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.export_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getCurrentModelMaster

현재 활성화된 모델의 마스터 데이터 취득

지정된 네임스페이스의 현재 활성화된 레이팅 모델 및 시즌 모델의 마스터 데이터를 취득합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemCurrentModelMaster현재 활성화된 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetCurrentModelMaster(
    &matchmaking.GetCurrentModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetCurrentModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getCurrentModelMaster(
        (new GetCurrentModelMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetCurrentModelMasterRequest;
import io.gs2.matchmaking.result.GetCurrentModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetCurrentModelMasterResult result = client.getCurrentModelMaster(
        new GetCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetCurrentModelMasterResult> asyncResult = null;
yield return client.GetCurrentModelMaster(
    new Gs2.Gs2Matchmaking.Request.GetCurrentModelMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getCurrentModelMaster(
        new Gs2Matchmaking.GetCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_current_model_master(
        matchmaking.GetCurrentModelMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_current_model_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_current_model_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

preUpdateCurrentModelMaster

현재 활성화된 모델의 마스터 데이터 갱신(3단계 버전)

1MB를 초과하는 마스터 데이터를 업로드하는 경우, 3단계로 나누어 갱신을 수행합니다.

  1. 이 API를 실행하여 업로드용 토큰과 URL을 취득합니다.
  2. 취득한 URL에 대해 마스터 데이터를 업로드합니다.
  3. UpdateCurrentModelMaster에 업로드로 취득한 토큰을 전달하여 실행하고, 마스터 데이터를 반영합니다.
상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
uploadTokenstring업로드 후 결과를 반영할 때 사용하는 토큰
uploadUrlstring업로드 처리 실행에 사용하는 URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentModelMaster(
    &matchmaking.PreUpdateCurrentModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\PreUpdateCurrentModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentModelMaster(
        (new PreUpdateCurrentModelMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.PreUpdateCurrentModelMasterRequest;
import io.gs2.matchmaking.result.PreUpdateCurrentModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    PreUpdateCurrentModelMasterResult result = client.preUpdateCurrentModelMaster(
        new PreUpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.PreUpdateCurrentModelMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentModelMaster(
    new Gs2.Gs2Matchmaking.Request.PreUpdateCurrentModelMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.preUpdateCurrentModelMaster(
        new Gs2Matchmaking.PreUpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.pre_update_current_model_master(
        matchmaking.PreUpdateCurrentModelMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.pre_update_current_model_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;
client = gs2('matchmaking')

api_result_handler = client.pre_update_current_model_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

updateCurrentModelMaster

현재 활성화된 모델의 마스터 데이터 갱신

현재 활성화된 모델의 마스터 데이터를 갱신합니다.
2가지 모드를 지원합니다: 인라인 설정용 ‘direct’ 모드와, 3단계 갱신 프로세스에서 사전에 업로드한 설정을 적용하는 ‘preUpload’ 모드입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
mode문자열 열거형
enum {
  “direct”,
  “preUpload”
}
“direct”업데이트 모드
정의설명
direct마스터 데이터를 직접 업데이트
preUpload마스터 데이터를 업로드한 후 업데이트
settingsstring{mode} == “direct”
✓※
~ 5242880 바이트 (5MB)마스터 데이터
※ mode이(가) “direct” 이면 필수
uploadTokenstring{mode} == “preUpload”
✓※
~ 1024자사전 업로드로 획득한 토큰
업로드한 마스터 데이터를 적용하기 위해 사용됩니다.
※ mode이(가) “preUpload” 이면 필수

Result

타입설명
itemCurrentModelMaster갱신된 현재 활성화된 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentModelMaster(
    &matchmaking.UpdateCurrentModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateCurrentModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateCurrentModelMaster(
        (new UpdateCurrentModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateCurrentModelMasterRequest;
import io.gs2.matchmaking.result.UpdateCurrentModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateCurrentModelMasterResult result = client.updateCurrentModelMaster(
        new UpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}")
            .withUploadToken(null)
    );
    CurrentModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateCurrentModelMasterResult> asyncResult = null;
yield return client.UpdateCurrentModelMaster(
    new Gs2.Gs2Matchmaking.Request.UpdateCurrentModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateCurrentModelMaster(
        new Gs2Matchmaking.UpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_current_model_master(
        matchmaking.UpdateCurrentModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{"version": "2020-06-24", "ratingModels": [{"name": "rating-0001", "metadata": "RATING_0001", "volatility": 100, "initialValue": 1500}, {"name": "rating-0002", "metadata": "RATING_0002", "volatility": 150, "initialValue": 1500}], "seasonModels": [{"name": "season-0001", "maximumParticipants": 50, "challengePeriodEventId": "grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001"}, {"name": "season-0002", "maximumParticipants": 100, "challengePeriodEventId": "grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002"}]}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_current_model_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}",
    uploadToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_current_model_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2020-06-24\", \"ratingModels\": [{\"name\": \"rating-0001\", \"metadata\": \"RATING_0001\", \"volatility\": 100, \"initialValue\": 1500}, {\"name\": \"rating-0002\", \"metadata\": \"RATING_0002\", \"volatility\": 150, \"initialValue\": 1500}], \"seasonModels\": [{\"name\": \"season-0001\", \"maximumParticipants\": 50, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001\"}, {\"name\": \"season-0002\", \"maximumParticipants\": 100, \"challengePeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002\"}]}",
    uploadToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateCurrentModelMasterFromGitHub

현재 활성화된 모델의 마스터 데이터를 GitHub에서 갱신

지정된 GitHub 리포지토리에서 마스터 데이터를 가져와 현재 활성화된 모델의 마스터 데이터를 갱신합니다.
GS2-Key에 저장된 API 키가 인증에 사용되며, 체크아웃할 브랜치, 태그 또는 커밋 해시를 지정할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
checkoutSettingGitHubCheckoutSetting
GitHub에서 마스터 데이터를 체크아웃하는 설정

Result

타입설명
itemCurrentModelMaster갱신된 현재 활성화된 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentModelMasterFromGitHub(
    &matchmaking.UpdateCurrentModelMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateCurrentModelMasterFromGitHubRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateCurrentModelMasterFromGitHub(
        (new UpdateCurrentModelMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateCurrentModelMasterFromGitHubRequest;
import io.gs2.matchmaking.result.UpdateCurrentModelMasterFromGitHubResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateCurrentModelMasterFromGitHubResult result = client.updateCurrentModelMasterFromGitHub(
        new UpdateCurrentModelMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(null)
    );
    CurrentModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateCurrentModelMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentModelMasterFromGitHub(
    new Gs2.Gs2Matchmaking.Request.UpdateCurrentModelMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateCurrentModelMasterFromGitHub(
        new Gs2Matchmaking.UpdateCurrentModelMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_current_model_master_from_git_hub(
        matchmaking.UpdateCurrentModelMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_current_model_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_current_model_master_from_git_hub_async({
    namespaceName="namespace-0001",
    checkoutSetting=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeRatingModelMasters

레이팅 모델 마스터 목록 취득

지정된 네임스페이스의 레이팅 모델 마스터 페이지네이션 목록을 취득합니다.
이름 접두어로 필터링할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namePrefixstring~ 64자레이팅 모델명의 필터 접두어
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<RatingModelMaster>레이팅 모델 마스터 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeRatingModelMasters(
    &matchmaking.DescribeRatingModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeRatingModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeRatingModelMasters(
        (new DescribeRatingModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeRatingModelMastersRequest;
import io.gs2.matchmaking.result.DescribeRatingModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeRatingModelMastersResult result = client.describeRatingModelMasters(
        new DescribeRatingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<RatingModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeRatingModelMastersResult> asyncResult = null;
yield return client.DescribeRatingModelMasters(
    new Gs2.Gs2Matchmaking.Request.DescribeRatingModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeRatingModelMasters(
        new Gs2Matchmaking.DescribeRatingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_rating_model_masters(
        matchmaking.DescribeRatingModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_rating_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_rating_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createRatingModelMaster

레이팅 모델 마스터 신규 작성

지정된 Glicko-2 알고리즘 파라미터로 새로운 레이팅 모델 마스터를 작성합니다.
레이팅 계산의 초기값(기본값: 1500)과 변동성을 설정할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
initialValueint1500100 ~ 10000레이트 값의 초기값
플레이어가 처음 레이팅이 적용된 매치메이킹에 참가할 때 부여되는 시작 레이트 값입니다.
기본값은 1500입니다. 모든 플레이어는 동일한 레이팅에서 시작하며, 대전 결과에 따라 조정됩니다.
volatilityint1001 ~ 20000레이팅의 변동성
각 대전 후 레이트 값이 얼마나 변동하는지를 제어하는 Glicko-2의 파라미터입니다.
값이 클수록 레이팅의 변동 폭이 커져 더 빠르게 레이팅이 조정됩니다.
값이 작을수록 레이팅이 안정되어 완만하게 변화합니다. 기본값은 100입니다.

Result

타입설명
itemRatingModelMaster작성한 레이팅 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CreateRatingModelMaster(
    &matchmaking.CreateRatingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("mode1"),
        Description: nil,
        Metadata: nil,
        InitialValue: nil,
        Volatility: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CreateRatingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->createRatingModelMaster(
        (new CreateRatingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("mode1")
            ->withDescription(null)
            ->withMetadata(null)
            ->withInitialValue(null)
            ->withVolatility(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CreateRatingModelMasterRequest;
import io.gs2.matchmaking.result.CreateRatingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CreateRatingModelMasterResult result = client.createRatingModelMaster(
        new CreateRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mode1")
            .withDescription(null)
            .withMetadata(null)
            .withInitialValue(null)
            .withVolatility(null)
    );
    RatingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CreateRatingModelMasterResult> asyncResult = null;
yield return client.CreateRatingModelMaster(
    new Gs2.Gs2Matchmaking.Request.CreateRatingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("mode1")
        .WithDescription(null)
        .WithMetadata(null)
        .WithInitialValue(null)
        .WithVolatility(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.createRatingModelMaster(
        new Gs2Matchmaking.CreateRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mode1")
            .withDescription(null)
            .withMetadata(null)
            .withInitialValue(null)
            .withVolatility(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.create_rating_model_master(
        matchmaking.CreateRatingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('mode1')
            .with_description(None)
            .with_metadata(None)
            .with_initial_value(None)
            .with_volatility(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.create_rating_model_master({
    namespaceName="namespace-0001",
    name="mode1",
    description=nil,
    metadata=nil,
    initialValue=nil,
    volatility=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.create_rating_model_master_async({
    namespaceName="namespace-0001",
    name="mode1",
    description=nil,
    metadata=nil,
    initialValue=nil,
    volatility=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getRatingModelMaster

레이팅 모델 마스터 취득

지정된 레이팅 모델 마스터의 초기값 및 변동성 설정을 포함한 정보를 취득합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemRatingModelMaster레이팅 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetRatingModelMaster(
    &matchmaking.GetRatingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("mode1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetRatingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getRatingModelMaster(
        (new GetRatingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("mode1")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetRatingModelMasterRequest;
import io.gs2.matchmaking.result.GetRatingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetRatingModelMasterResult result = client.getRatingModelMaster(
        new GetRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    RatingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetRatingModelMasterResult> asyncResult = null;
yield return client.GetRatingModelMaster(
    new Gs2.Gs2Matchmaking.Request.GetRatingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("mode1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getRatingModelMaster(
        new Gs2Matchmaking.GetRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_rating_model_master(
        matchmaking.GetRatingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('mode1')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_rating_model_master({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_rating_model_master_async({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateRatingModelMaster

레이팅 모델 마스터 갱신

지정된 레이팅 모델 마스터를 갱신합니다. 설명, 메타데이터, 초기값, 변동성 설정을 변경할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
initialValueint1500100 ~ 10000레이트 값의 초기값
플레이어가 처음 레이팅이 적용된 매치메이킹에 참가할 때 부여되는 시작 레이트 값입니다.
기본값은 1500입니다. 모든 플레이어는 동일한 레이팅에서 시작하며, 대전 결과에 따라 조정됩니다.
volatilityint1001 ~ 20000레이팅의 변동성
각 대전 후 레이트 값이 얼마나 변동하는지를 제어하는 Glicko-2의 파라미터입니다.
값이 클수록 레이팅의 변동 폭이 커져 더 빠르게 레이팅이 조정됩니다.
값이 작을수록 레이팅이 안정되어 완만하게 변화합니다. 기본값은 100입니다.

Result

타입설명
itemRatingModelMaster갱신한 레이팅 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateRatingModelMaster(
    &matchmaking.UpdateRatingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("mode1"),
        Description: pointy.String("description1"),
        Metadata: nil,
        InitialValue: nil,
        Volatility: pointy.Int32(50),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateRatingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateRatingModelMaster(
        (new UpdateRatingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("mode1")
            ->withDescription("description1")
            ->withMetadata(null)
            ->withInitialValue(null)
            ->withVolatility(50)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateRatingModelMasterRequest;
import io.gs2.matchmaking.result.UpdateRatingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateRatingModelMasterResult result = client.updateRatingModelMaster(
        new UpdateRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
            .withDescription("description1")
            .withMetadata(null)
            .withInitialValue(null)
            .withVolatility(50)
    );
    RatingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateRatingModelMasterResult> asyncResult = null;
yield return client.UpdateRatingModelMaster(
    new Gs2.Gs2Matchmaking.Request.UpdateRatingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("mode1")
        .WithDescription("description1")
        .WithMetadata(null)
        .WithInitialValue(null)
        .WithVolatility(50),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateRatingModelMaster(
        new Gs2Matchmaking.UpdateRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
            .withDescription("description1")
            .withMetadata(null)
            .withInitialValue(null)
            .withVolatility(50)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_rating_model_master(
        matchmaking.UpdateRatingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('mode1')
            .with_description('description1')
            .with_metadata(None)
            .with_initial_value(None)
            .with_volatility(50)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_rating_model_master({
    namespaceName="namespace-0001",
    ratingName="mode1",
    description="description1",
    metadata=nil,
    initialValue=nil,
    volatility=50,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_rating_model_master_async({
    namespaceName="namespace-0001",
    ratingName="mode1",
    description="description1",
    metadata=nil,
    initialValue=nil,
    volatility=50,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteRatingModelMaster

레이팅 모델 마스터 삭제

지정된 레이팅 모델 마스터를 삭제합니다.
다음 마스터 데이터 갱신까지, 현재 활성화된 마스터 데이터에는 영향을 주지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
ratingNamestring
~ 128자레이팅 모델 이름
레이팅 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemRatingModelMaster삭제한 레이팅 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteRatingModelMaster(
    &matchmaking.DeleteRatingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RatingName: pointy.String("mode1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteRatingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteRatingModelMaster(
        (new DeleteRatingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRatingName("mode1")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteRatingModelMasterRequest;
import io.gs2.matchmaking.result.DeleteRatingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteRatingModelMasterResult result = client.deleteRatingModelMaster(
        new DeleteRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    RatingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteRatingModelMasterResult> asyncResult = null;
yield return client.DeleteRatingModelMaster(
    new Gs2.Gs2Matchmaking.Request.DeleteRatingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRatingName("mode1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteRatingModelMaster(
        new Gs2Matchmaking.DeleteRatingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRatingName("mode1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_rating_model_master(
        matchmaking.DeleteRatingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_rating_name('mode1')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_rating_model_master({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_rating_model_master_async({
    namespaceName="namespace-0001",
    ratingName="mode1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeSeasonModelMasters

시즌 모델 마스터 목록 조회

지정된 네임스페이스의 시즌 모델 마스터에 대한 페이지네이션 목록을 조회합니다.
이름의 접두사로 필터링할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namePrefixstring~ 64자시즌 모델 이름 필터 접두사
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000조회한 데이터 건수

Result

타입설명
itemsList<SeasonModelMaster>시즌 모델 마스터 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DescribeSeasonModelMasters(
    &matchmaking.DescribeSeasonModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DescribeSeasonModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->describeSeasonModelMasters(
        (new DescribeSeasonModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DescribeSeasonModelMastersRequest;
import io.gs2.matchmaking.result.DescribeSeasonModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DescribeSeasonModelMastersResult result = client.describeSeasonModelMasters(
        new DescribeSeasonModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SeasonModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DescribeSeasonModelMastersResult> asyncResult = null;
yield return client.DescribeSeasonModelMasters(
    new Gs2.Gs2Matchmaking.Request.DescribeSeasonModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.describeSeasonModelMasters(
        new Gs2Matchmaking.DescribeSeasonModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.describe_season_model_masters(
        matchmaking.DescribeSeasonModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.describe_season_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('matchmaking')

api_result_handler = client.describe_season_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createSeasonModelMaster

시즌 모델 마스터 신규 생성

지정된 설정으로 새로운 시즌 모델 마스터를 생성합니다.
개더링당 최대 참가 인원, 티어 기반 매치메이킹용 경험치 모델, 매치메이킹이 가능한 기간을 제어하는 챌린지 기간 이벤트를 설정할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namestring
~ 128자시즌 모델명
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
maximumParticipantsint
2 ~ 1000최대 참가 인원수
하나의 시즌 개더링에 참가할 수 있는 플레이어의 최대 인원수입니다.
이 상한에 도달하면 시즌 개더링은 만원 상태가 되어 더 이상 플레이어가 참가할 수 없게 됩니다.
2에서 1000 사이의 범위로 지정합니다.
experienceModelIdstring~ 1024자티어 관리용 경험치 모델 GRN
플레이어의 티어를 결정하기 위해 사용하는 GS2-Experience 경험치 모델의 GRN입니다.
이 경험치 모델에서의 플레이어 랭크가 매치메이킹의 티어로 사용되어, 비슷한 레벨의 플레이어끼리 그룹화됩니다.
지정하지 않으면 티어에 의한 그룹화가 비활성화되어, 레벨에 관계없이 모든 플레이어가 매칭됩니다.
challengePeriodEventIdstring
~ 1024자챌린지 기간 이벤트 GRN
이 시즌의 유효 기간을 정의하는 GS2-Schedule 이벤트의 GRN입니다.
이 이벤트가 활성화되어 있는 동안에만 시즌 개더링의 생성·참가가 가능합니다.
이벤트 기간이 종료되면 시즌이 종료되어 새로운 매치메이킹이 불가능해집니다.

Result

타입설명
itemSeasonModelMaster생성한 시즌 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.CreateSeasonModelMaster(
    &matchmaking.CreateSeasonModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("season-0001"),
        Description: nil,
        Metadata: nil,
        MaximumParticipants: pointy.Int32(50),
        ExperienceModelId: nil,
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\CreateSeasonModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->createSeasonModelMaster(
        (new CreateSeasonModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("season-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMaximumParticipants(50)
            ->withExperienceModelId(null)
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.CreateSeasonModelMasterRequest;
import io.gs2.matchmaking.result.CreateSeasonModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    CreateSeasonModelMasterResult result = client.createSeasonModelMaster(
        new CreateSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("season-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMaximumParticipants(50)
            .withExperienceModelId(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
    );
    SeasonModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.CreateSeasonModelMasterResult> asyncResult = null;
yield return client.CreateSeasonModelMaster(
    new Gs2.Gs2Matchmaking.Request.CreateSeasonModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("season-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMaximumParticipants(50)
        .WithExperienceModelId(null)
        .WithChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.createSeasonModelMaster(
        new Gs2Matchmaking.CreateSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("season-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMaximumParticipants(50)
            .withExperienceModelId(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.create_season_model_master(
        matchmaking.CreateSeasonModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('season-0001')
            .with_description(None)
            .with_metadata(None)
            .with_maximum_participants(50)
            .with_experience_model_id(None)
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.create_season_model_master({
    namespaceName="namespace-0001",
    name="season-0001",
    description=nil,
    metadata=nil,
    maximumParticipants=50,
    experienceModelId=nil,
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.create_season_model_master_async({
    namespaceName="namespace-0001",
    name="season-0001",
    description=nil,
    metadata=nil,
    maximumParticipants=50,
    experienceModelId=nil,
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getSeasonModelMaster

시즌 모델 마스터 조회

지정된 시즌 모델 마스터의 최대 참가 인원, 경험치 모델 ID, 챌린지 기간 이벤트 ID를 포함한 정보를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델명
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemSeasonModelMaster시즌 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.GetSeasonModelMaster(
    &matchmaking.GetSeasonModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\GetSeasonModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->getSeasonModelMaster(
        (new GetSeasonModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.GetSeasonModelMasterRequest;
import io.gs2.matchmaking.result.GetSeasonModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    GetSeasonModelMasterResult result = client.getSeasonModelMaster(
        new GetSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    SeasonModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.GetSeasonModelMasterResult> asyncResult = null;
yield return client.GetSeasonModelMaster(
    new Gs2.Gs2Matchmaking.Request.GetSeasonModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.getSeasonModelMaster(
        new Gs2Matchmaking.GetSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.get_season_model_master(
        matchmaking.GetSeasonModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.get_season_model_master({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.get_season_model_master_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateSeasonModelMaster

시즌 모델 마스터 갱신

지정된 시즌 모델 마스터를 갱신합니다. 설명, 메타데이터, 최대 참가 인원, 경험치 모델 ID, 챌린지 기간 이벤트 ID를 변경할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델명
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 128자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
maximumParticipantsint
2 ~ 1000최대 참가 인원수
하나의 시즌 개더링에 참가할 수 있는 플레이어의 최대 인원수입니다.
이 상한에 도달하면 시즌 개더링은 만원 상태가 되어 더 이상 플레이어가 참가할 수 없게 됩니다.
2에서 1000 사이의 범위로 지정합니다.
experienceModelIdstring~ 1024자티어 관리용 경험치 모델 GRN
플레이어의 티어를 결정하기 위해 사용하는 GS2-Experience 경험치 모델의 GRN입니다.
이 경험치 모델에서의 플레이어 랭크가 매치메이킹의 티어로 사용되어, 비슷한 레벨의 플레이어끼리 그룹화됩니다.
지정하지 않으면 티어에 의한 그룹화가 비활성화되어, 레벨에 관계없이 모든 플레이어가 매칭됩니다.
challengePeriodEventIdstring
~ 1024자챌린지 기간 이벤트 GRN
이 시즌의 유효 기간을 정의하는 GS2-Schedule 이벤트의 GRN입니다.
이 이벤트가 활성화되어 있는 동안에만 시즌 개더링의 생성·참가가 가능합니다.
이벤트 기간이 종료되면 시즌이 종료되어 새로운 매치메이킹이 불가능해집니다.

Result

타입설명
itemSeasonModelMaster갱신한 시즌 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.UpdateSeasonModelMaster(
    &matchmaking.UpdateSeasonModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        MaximumParticipants: pointy.Int32(100),
        ExperienceModelId: nil,
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\UpdateSeasonModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->updateSeasonModelMaster(
        (new UpdateSeasonModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
            ->withDescription("description1")
            ->withMetadata(null)
            ->withMaximumParticipants(100)
            ->withExperienceModelId(null)
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.UpdateSeasonModelMasterRequest;
import io.gs2.matchmaking.result.UpdateSeasonModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    UpdateSeasonModelMasterResult result = client.updateSeasonModelMaster(
        new UpdateSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withMaximumParticipants(100)
            .withExperienceModelId(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002")
    );
    SeasonModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.UpdateSeasonModelMasterResult> asyncResult = null;
yield return client.UpdateSeasonModelMaster(
    new Gs2.Gs2Matchmaking.Request.UpdateSeasonModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001")
        .WithDescription("description1")
        .WithMetadata(null)
        .WithMaximumParticipants(100)
        .WithExperienceModelId(null)
        .WithChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.updateSeasonModelMaster(
        new Gs2Matchmaking.UpdateSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withMaximumParticipants(100)
            .withExperienceModelId(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.update_season_model_master(
        matchmaking.UpdateSeasonModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_maximum_participants(100)
            .with_experience_model_id(None)
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.update_season_model_master({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    description="description1",
    metadata=nil,
    maximumParticipants=100,
    experienceModelId=nil,
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.update_season_model_master_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
    description="description1",
    metadata=nil,
    maximumParticipants=100,
    experienceModelId=nil,
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0002",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteSeasonModelMaster

시즌 모델 마스터 삭제

지정된 시즌 모델 마스터를 삭제합니다.
다음 마스터 데이터 갱신까지, 현재 활성화된 마스터 데이터에는 영향을 미치지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
seasonNamestring
~ 128자시즌 모델명
시즌 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemSeasonModelMaster삭제한 시즌 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/matchmaking"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := matchmaking.Gs2MatchmakingRestClient{
    Session: &session,
}
result, err := client.DeleteSeasonModelMaster(
    &matchmaking.DeleteSeasonModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SeasonName: pointy.String("season-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Matchmaking\Gs2MatchmakingRestClient;
use Gs2\Matchmaking\Request\DeleteSeasonModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2MatchmakingRestClient(
    $session
);

try {
    $result = $client->deleteSeasonModelMaster(
        (new DeleteSeasonModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSeasonName("season-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.matchmaking.rest.Gs2MatchmakingRestClient;
import io.gs2.matchmaking.request.DeleteSeasonModelMasterRequest;
import io.gs2.matchmaking.result.DeleteSeasonModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2MatchmakingRestClient client = new Gs2MatchmakingRestClient(session);

try {
    DeleteSeasonModelMasterResult result = client.deleteSeasonModelMaster(
        new DeleteSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    SeasonModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2MatchmakingRestClient(session);

AsyncResult<Gs2.Gs2Matchmaking.Result.DeleteSeasonModelMasterResult> asyncResult = null;
yield return client.DeleteSeasonModelMaster(
    new Gs2.Gs2Matchmaking.Request.DeleteSeasonModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSeasonName("season-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Matchmaking from '@/gs2/matchmaking';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Matchmaking.Gs2MatchmakingRestClient(session);

try {
    const result = await client.deleteSeasonModelMaster(
        new Gs2Matchmaking.DeleteSeasonModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSeasonName("season-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import matchmaking

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = matchmaking.Gs2MatchmakingRestClient(session)

try:
    result = client.delete_season_model_master(
        matchmaking.DeleteSeasonModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_season_name('season-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('matchmaking')

api_result = client.delete_season_model_master({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('matchmaking')

api_result_handler = client.delete_season_model_master_async({
    namespaceName="namespace-0001",
    seasonName="season-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;