Documentation index for AI agents

GS2-Account SDK API 레퍼런스

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

모델

Namespace

네임스페이스

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

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

상세
타입활성화 조건필수기본값값 제한설명
namespaceIdstring
~ 1024자네임스페이스 GRN
※ 서버가 자동으로 설정
namestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
changePasswordIfTakeOverboolfalse계정 인계 시 비밀번호를 변경할지 여부
계정 인계 시 비밀번호를 변경할지 여부를 지정합니다.
이 설정을 통해 계정 인계를 실행한 후 인계 이전 디바이스로부터의 로그인을 제한할 수 있습니다.
differentUserIdForLoginAndDataRetentionboolfalse로그인에 사용하는 사용자 ID와 데이터의 보유에 사용하는 사용자 ID를 다르게 함
로그인용 사용자 ID와 데이터 보유용 사용자 ID를 분리할지 여부를 지정합니다.
이 설정을 통해 플랫폼 제공업체가 규정하는 개인정보 보호 요건을 적은 작업량으로 충족할 수 있습니다.

※이 파라미터는 네임스페이스 생성 시에만 설정할 수 있습니다.
createAccountScriptScriptSetting계정을 신규 생성했을 때 실행할 스크립트의 설정
계정 생성의 커스텀 로직을 구현하는 데 사용됩니다.
Script 트리거 레퍼런스 - createAccount
authenticationScriptScriptSetting인증했을 때 실행할 스크립트의 설정
인증 프로세스를 커스터마이즈하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - authentication
createTakeOverScriptScriptSetting인계 정보를 등록했을 때 실행할 스크립트의 설정
인계 정보를 처음 등록했을 때 보상을 지급하기 위해 GS2-Mission의 카운터를 증가시키는 등의 커스텀 로직을 추가하는 데 사용됩니다.
Script 트리거 레퍼런스 - createTakeOver
doTakeOverScriptScriptSetting인계를 실행했을 때 실행할 스크립트의 설정
인계 처리의 추가 로직을 구현하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - doTakeOver
banScriptScriptSetting계정 BAN 상태를 추가했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - ban
unBanScriptScriptSetting계정 BAN 상태를 해제했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - unBan
logSettingLogSetting로그 출력 설정
로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 기록하는 데 사용되는 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” 이면 활성화

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” 이면 필수

Account

게임 플레이어 계정

게임 플레이어를 식별하는 ID 정보 엔티티입니다.
게임 플레이어 계정은 익명 계정이며 사용자ID(UUID)와 비밀번호(무작위 32자 문자열)로 구성되므로, 게임 플레이어는 이메일 주소 등의 정보를 입력할 필요가 없습니다.

발급된 게임 플레이어 계정은 디바이스의 로컬 스토리지에 저장해 두고, 다음번 로그인부터 사용합니다.

상세
타입활성화 조건필수기본값값 제한설명
accountIdstring
~ 1024자게임 플레이어 계정 GRN
※ 서버가 자동으로 설정
userIdstring
UUID~ 128자사용자ID
passwordstring
~ 128자비밀번호
계정의 보안을 확보하기 위한 비밀번호를 저장합니다.
비밀번호는 최대 128자 길이를 가지며, 계정 보호에 중요한 역할을 합니다.
timeOffsetint00 ~ 315360000현재 시각에 대한 보정값(현재 시각을 기준으로 한 초 수)
시각 보정값은 서버의 현재 시각과의 차이를 초 단위로 나타냅니다.
이 값은 게임 내 이벤트나 기능이 특정 시각에 맞춰 동작해야 할 때 사용됩니다.
banStatusesList<BanStatus>[]0 ~ 10 items계정 BAN 상태 리스트
계정에 연결된 BAN(접근 금지) 상태의 상세 정보를 저장합니다.
각 항목에는 BAN 사유, 기간 및 기타 관련 정보가 포함됩니다.
bannedboolfalse계정이 BAN되어 있는지 여부
계정이 현재 BAN되어 있는지 여부를 나타냅니다.
true인 경우 계정은 접근 금지 상태이며, false인 경우 접근이 가능합니다.
lastAuthenticatedAtlong최종 인증 시각
계정이 마지막으로 인증된 시각입니다.
이 값은 계정이 인증될 때마다 업데이트됩니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

TakeOver

인계 정보

인계 정보란 디바이스 기종 변경이나 플랫폼 간 계정 이동·공유 시에 사용하는 정보입니다.
개인을 식별하는 고유한 문자열과 비밀번호로 구성되며, 올바른 조합을 입력함으로써 Account(익명 계정)를 취득할 수 있습니다.

하나의 Account에 대해 여러 개의 인계 정보를 설정할 수 있습니다.
여러 개의 인계 정보를 설정하려면 각각 다른 슬롯을 지정해야 합니다.
슬롯에는 0~1024를 지정할 수 있으므로, 최대 1,025종류의 인계 정보를 설정할 수 있습니다.

구체적인 예시로는 0에는 Sign in with Apple의 계정 정보를, 1에는 Google의 계정 정보를 저장하는 방식이 예상됩니다.
어디까지나 이 인계 정보는 데이터 홀더일 뿐이며, 소셜 계정과의 인증 구조는 별도로 준비해야 합니다.

상세
타입활성화 조건필수기본값값 제한설명
takeOverIdstring
~ 1024자인계 정보 GRN
※ 서버가 자동으로 설정
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
userIdentifierstring
~ 1024자인계용 사용자 ID
계정을 인계할 때 사용되는 개인을 식별하기 위한 고유 키입니다.
서로 다른 계정에서 동일한 userIdentifier를 지정한 경우, 나중에 설정한 값이 우선됩니다.
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

PlatformId

외부 플랫폼 계정 ID

X, Instagram, Facebook 등 외부 서비스의 사용자 식별자를 보유합니다.
다른 플레이어는 외부 플랫폼 계정 정보를 사용하여 GS2-Account 사용자 ID를 검색할 수 있습니다.

Instagram의 팔로워나 Facebook의 친구를 게임 내 친구로 임포트할 때, GS2-Account의 계정을 특정하기 위해 사용합니다.

상세
타입활성화 조건필수기본값값 제한설명
platformIdstring
~ 1024자외부 플랫폼 계정 ID GRN
※ 서버가 자동으로 설정
userIdstring
~ 128자GS2-Account 사용자 ID
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

DataOwner

데이터 오너

데이터 오너는 네임스페이스 설정에서 “로그인에 사용하는 사용자 ID와 데이터의 보유에 사용하는 사용자 ID를 다르게 한다"를 지정한 경우에 사용됩니다.
사용자 ID와는 다른 데이터 오너 ID를 발급하여 GS2-Account의 인증 처리를 통해 액세스 토큰을 수신한 경우 취득할 수 있는 사용자 ID는 데이터 오너 ID가 됩니다.

상세
타입활성화 조건필수기본값값 제한설명
dataOwnerIdstring
~ 1024자데이터 오너 GRN
※ 서버가 자동으로 설정
userIdstring
~ 128자사용자ID
namestring
UUID~ 36자데이터 오너 ID
데이터 오너의 고유 식별자로서 기능합니다.
데이터 오너 ID는 데이터의 실제 소유자를 나타내며, 사용자 ID와는 다를 수 있습니다.
이 ID는 시스템에 의해 자동으로 생성되며, 각 데이터 오너에 대해 고유합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

TakeOverTypeModel

인계 정보 타입 모델

인계 정보를 정의하는 모델입니다.

인계 정보란 디바이스 기종 변경이나 플랫폼 간 계정 이동·공유 시에 사용하는 정보입니다.
개인을 식별하는 고유한 문자열과 비밀번호로 구성되며, 그 올바른 조합을 입력함으로써 Account(익명 계정)를 취득할 수 있습니다.

하나의 Account에 대해 여러 개의 인계 정보를 설정할 수 있습니다.
여러 개의 인계 정보를 설정하려면 각각 다른 슬롯을 지정해야 합니다.
슬롯은 0~1024를 지정할 수 있으므로 최대 1,025종류의 인계 정보를 설정할 수 있습니다.

구체적인 예로는 0에는 Sign in with Apple의 계정 정보를, 1에는 Google 계정 정보를 저장하는 등의 방식이 상정되어 있습니다.
어디까지나 이 인계 정보는 데이터 홀더이며, 소셜 계정과의 인증 메커니즘은 별도로 준비해야 합니다.

상세
타입활성화 조건필수기본값값 제한설명
takeOverTypeModelIdstring
~ 1024자인계 정보 타입 모델 GRN
※ 서버가 자동으로 설정
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
openIdConnectSettingOpenIdConnectSetting
OpenID Connect 설정
OpenID Connect 준수 Identity Provider(IdP)와 연동하기 위한 설정입니다. 디스커버리 URL, 클라이언트 인증 정보, Apple Sign In 파라미터 등 플랫폼별 설정이 포함됩니다.

OpenIdConnectSetting

OpenID Connect 설정

OpenID Connect 준수 IdP의 설정을 등록함으로써 계정의 인계 정보로 IdP 연동을 이용할 수 있게 됩니다.

상세
타입활성화 조건필수기본값값 제한설명
configurationPathstring
~ 1024자OpenID Connect 설정 URL
OpenID Connect 제공자의 디스커버리 엔드포인트 URL입니다. well-known 형식(예: https://example.com/.well-known/openid-configuration)을 따라야 합니다.
clientIdstring
~ 1024자클라이언트 ID
IdP에 등록된 애플리케이션의 클라이언트 ID입니다.
clientSecretstring{configurationPath} != “https://appleid.apple.com/.well-known/openid-configuration”
✓※
~ 1024자클라이언트 시크릿
※ configurationPath가 “https://appleid.apple.com/.well-known/openid-configuration” 이외의 다른 IdP 연동인 경우 필수
appleTeamIdstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓※
~ 1024자Apple Developer 팀 ID
Apple Developer 계정의 팀 ID입니다. Sign in with Apple 인증에 필요합니다.
※ configurationPath이(가) “https://appleid.apple.com/.well-known/openid-configuration” 이면 필수
appleKeyIdstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓※
~ 1024자Apple에 등록된 키 ID
Sign in with Apple용으로 Apple Developer 계정에 등록된 키 ID입니다.
※ configurationPath이(가) “https://appleid.apple.com/.well-known/openid-configuration” 이면 필수
applePrivateKeyPemstring{configurationPath} == “https://appleid.apple.com/.well-known/openid-configuration”
✓※
~ 10240자Apple로부터 받은 비밀 키
Apple Developer 포털에서 다운로드한 PEM 형식의 비밀 키입니다. Sign in with Apple 인증에 필요합니다.
※ configurationPath이(가) “https://appleid.apple.com/.well-known/openid-configuration” 이면 필수
doneEndpointUrlstring~ 1024자인증 완료 시 이동하는 URL
지정하지 않으면 /authorization/done으로 이동합니다.
쿼리 스트링에 id_token이 부여됩니다.
additionalScopeValuesList<ScopeValue>[]0 ~ 10 itemsOpenID Connect에서 획득하는 추가 스코프
기본 OpenID Connect 스코프 외에 IdP에 요청하는 추가 OAuth 스코프입니다. 인증 시 추가 사용자 정보를 취득할 수 있습니다.
additionalReturnValuesList<string>[]0 ~ 10 itemsOpenID Connect에서 획득하는 추가 반환값
ID 토큰 또는 UserInfo 응답에서 반환값에 포함할 추가 클레임 이름입니다. 지정된 클레임이 추출되어 표준 인증 결과와 함께 반환됩니다.

ScopeValue

스코프 값

OpenID Connect 인증 시 취득되는 추가 OAuth 스코프 값을 나타내는 키-값 쌍입니다. 표준 OpenID Connect 클레임 외에 IdP로부터 취득한 추가 데이터를 저장하는 데 사용됩니다.

상세
타입활성화 조건필수기본값값 제한설명
keystring
~ 64자이름
인증 시 IdP에 요청한 스코프 이름입니다.
valuestring~ 51200자
해당 스코프에 대해 IdP로부터 반환된 값입니다.

PlatformUser

외부 플랫폼 사용자 정보

외부 플랫폼에서의 사용자 정보를 보유합니다. 플랫폼 고유의 사용자 식별자와 대응하는 GS2-Account 사용자 ID의 매핑을 포함하며, 외부 플랫폼의 계정 ID를 이용한 플레이어 검색에 사용됩니다.

상세
타입활성화 조건필수기본값값 제한설명
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.
userIdstring
~ 128자GS2-Account 사용자 ID
이 플랫폼 사용자에게 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.

BanStatus

계정 BAN 상태

게임 플레이어 계정에 적용된 BAN(접근 금지) 상태에 관한 정보를 나타냅니다.
이 타입은 BAN이 적용된 이유, BAN의 명칭, 그리고 BAN 해제 예정 일시 등의 상세 정보를 포함합니다.
BAN 상태는 부정 행위나 이용 약관 위반 등 다양한 이유로 계정에 적용될 수 있으며, 이 타입은 그 상태를 관리하는 데 도움이 됩니다.
시스템은 이 정보를 바탕으로 계정의 접근 권한을 제어하고, 필요에 따라 접근을 제한하거나 해제합니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
UUID~ 36자BAN 상태 이름
BAN 상태의 고유한 이름을 보유합니다. 이름에는 임의의 값을 설정할 수 있습니다.
생략할 경우 UUID(Universally Unique Identifier) 형식으로 자동 생성되어 각 BAN 상태를 식별하는 데 사용됩니다.
이 ID를 통해 여러 개의 BAN 상태를 쉽게 추적할 수 있습니다.
reasonstring
~ 256자계정이 BAN된 이유
계정이 BAN된 구체적인 이유를 설명합니다.
최대 256자 길이로, 계정 BAN의 원인을 명확히 하는 데 도움이 됩니다.
이 정보는 계정 관리자나 운영팀이 참조할 뿐만 아니라, 게임 클라이언트로의 응답값에도 포함됩니다.
releaseTimestamplong
BAN이 해제되는 일시
계정 BAN이 해제될 예정 일시를 나타냅니다.
이 일시가 지나면 계정은 자동으로 BAN 해제 상태가 되어 정상적인 접근이 가능해집니다.

CurrentModelMaster

현재 활성화된 인계 정보 타입 모델의 마스터 데이터

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

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

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

TakeOverTypeModelMaster

인계 정보 타입 모델 마스터

인계 정보 타입 모델 마스터는 게임 내에서 사용되는 인계 정보 타입 모델의 편집·관리용 데이터로, 매니지먼트 콘솔의 마스터 데이터 에디터에서 일시적으로 보관됩니다.
임포트·갱신 처리를 수행함으로써 실제로 게임에서 참조되는 인계 정보 타입 모델로 반영됩니다.

인계 정보란 디바이스 기종 변경이나 플랫폼 간 계정 이동·공유 시에 사용하는 정보입니다.
개인을 식별하는 고유한 문자열과 비밀번호로 구성되며, 올바른 조합을 입력함으로써 Account(익명 계정)를 취득할 수 있습니다.

하나의 Account에 대해 여러 개의 인계 정보를 설정할 수 있습니다.
여러 개의 인계 정보를 설정하려면 각각 다른 슬롯을 지정해야 합니다.
슬롯에는 0~1024를 지정할 수 있으므로, 최대 1,025종류의 인계 정보를 설정할 수 있습니다.

구체적인 예시로는 0에는 Sign in with Apple의 계정 정보를, 1에는 Google의 계정 정보를 저장하는 방식이 예상됩니다.
어디까지나 이 인계 정보는 데이터 홀더일 뿐이며, 소셜 계정과의 인증 구조는 별도로 준비해야 합니다.

상세
타입활성화 조건필수기본값값 제한설명
takeOverTypeModelIdstring
~ 1024자인계 정보 타입 모델 마스터 데이터 GRN
※ 서버가 자동으로 설정
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
openIdConnectSettingOpenIdConnectSetting
OpenID Connect 설정
OpenID Connect 준수 Identity Provider(IdP)와 연동하기 위한 설정입니다. 디스커버리 URL, 클라이언트 인증 정보, Apple Sign In 파라미터 등 플랫폼별 설정이 포함됩니다.
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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeNamespacesRequest;
import io.gs2.account.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeNamespaces(
        new Gs2Account.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 account

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

try:
    result = client.describe_namespaces(
        account.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('account')

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('account')

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트랜잭션 설정
changePasswordIfTakeOverboolfalse계정 인계 시 비밀번호를 변경할지 여부
계정 인계 시 비밀번호를 변경할지 여부를 지정합니다.
이 설정을 통해 계정 인계를 실행한 후 인계 이전 디바이스로부터의 로그인을 제한할 수 있습니다.
differentUserIdForLoginAndDataRetentionboolfalse로그인에 사용하는 사용자 ID와 데이터의 보유에 사용하는 사용자 ID를 다르게 함
로그인용 사용자 ID와 데이터 보유용 사용자 ID를 분리할지 여부를 지정합니다.
이 설정을 통해 플랫폼 제공업체가 규정하는 개인정보 보호 요건을 적은 작업량으로 충족할 수 있습니다.

※이 파라미터는 네임스페이스 생성 시에만 설정할 수 있습니다.
createAccountScriptScriptSetting계정을 신규 생성했을 때 실행할 스크립트의 설정
계정 생성의 커스텀 로직을 구현하는 데 사용됩니다.
Script 트리거 레퍼런스 - createAccount
authenticationScriptScriptSetting인증했을 때 실행할 스크립트의 설정
인증 프로세스를 커스터마이즈하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - authentication
createTakeOverScriptScriptSetting인계 정보를 등록했을 때 실행할 스크립트의 설정
인계 정보를 처음 등록했을 때 보상을 지급하기 위해 GS2-Mission의 카운터를 증가시키는 등의 커스텀 로직을 추가하는 데 사용됩니다.
Script 트리거 레퍼런스 - createTakeOver
doTakeOverScriptScriptSetting인계를 실행했을 때 실행할 스크립트의 설정
인계 처리의 추가 로직을 구현하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - doTakeOver
banScriptScriptSetting계정 BAN 상태를 추가했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - ban
unBanScriptScriptSetting계정 BAN 상태를 해제했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - unBan
logSettingLogSetting로그 출력 설정
로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 기록하는 데 사용되는 GS2-Log 네임스페이스 정보를 보유합니다.

Result

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

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &account.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: nil,
        ChangePasswordIfTakeOver: pointy.Bool(false),
        DifferentUserIdForLoginAndDataRetention: nil,
        CreateAccountScript: nil,
        AuthenticationScript: nil,
        CreateTakeOverScript: nil,
        DoTakeOverScript: nil,
        BanScript: nil,
        UnBanScript: nil,
        LogSetting: &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting(null)
            ->withChangePasswordIfTakeOver(false)
            ->withDifferentUserIdForLoginAndDataRetention(null)
            ->withCreateAccountScript(null)
            ->withAuthenticationScript(null)
            ->withCreateTakeOverScript(null)
            ->withDoTakeOverScript(null)
            ->withBanScript(null)
            ->withUnBanScript(null)
            ->withLogSetting((new \Gs2\Account\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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateNamespaceRequest;
import io.gs2.account.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withChangePasswordIfTakeOver(false)
            .withDifferentUserIdForLoginAndDataRetention(null)
            .withCreateAccountScript(null)
            .withAuthenticationScript(null)
            .withCreateTakeOverScript(null)
            .withDoTakeOverScript(null)
            .withBanScript(null)
            .withUnBanScript(null)
            .withLogSetting(new io.gs2.account.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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Account.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(null)
        .WithChangePasswordIfTakeOver(false)
        .WithDifferentUserIdForLoginAndDataRetention(null)
        .WithCreateAccountScript(null)
        .WithAuthenticationScript(null)
        .WithCreateTakeOverScript(null)
        .WithDoTakeOverScript(null)
        .WithBanScript(null)
        .WithUnBanScript(null)
        .WithLogSetting(new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createNamespace(
        new Gs2Account.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withChangePasswordIfTakeOver(false)
            .withDifferentUserIdForLoginAndDataRetention(null)
            .withCreateAccountScript(null)
            .withAuthenticationScript(null)
            .withCreateTakeOverScript(null)
            .withDoTakeOverScript(null)
            .withBanScript(null)
            .withUnBanScript(null)
            .withLogSetting(new Gs2Account.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 account

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

try:
    result = client.create_namespace(
        account.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(None)
            .with_change_password_if_take_over(False)
            .with_different_user_id_for_login_and_data_retention(None)
            .with_create_account_script(None)
            .with_authentication_script(None)
            .with_create_take_over_script(None)
            .with_do_take_over_script(None)
            .with_ban_script(None)
            .with_un_ban_script(None)
            .with_log_setting(
                account.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('account')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    changePasswordIfTakeOver=false,
    differentUserIdForLoginAndDataRetention=nil,
    createAccountScript=nil,
    authenticationScript=nil,
    createTakeOverScript=nil,
    doTakeOverScript=nil,
    banScript=nil,
    unBanScript=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('account')

api_result_handler = client.create_namespace_async({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    changePasswordIfTakeOver=false,
    differentUserIdForLoginAndDataRetention=nil,
    createAccountScript=nil,
    authenticationScript=nil,
    createTakeOverScript=nil,
    doTakeOverScript=nil,
    banScript=nil,
    unBanScript=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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetNamespaceStatusRequest;
import io.gs2.account.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetNamespaceRequest;
import io.gs2.account.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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트랜잭션 설정
changePasswordIfTakeOverboolfalse계정 인계 시 비밀번호를 변경할지 여부
계정 인계 시 비밀번호를 변경할지 여부를 지정합니다.
이 설정을 통해 계정 인계를 실행한 후 인계 이전 디바이스로부터의 로그인을 제한할 수 있습니다.
createAccountScriptScriptSetting계정을 신규 생성했을 때 실행할 스크립트의 설정
계정 생성의 커스텀 로직을 구현하는 데 사용됩니다.
Script 트리거 레퍼런스 - createAccount
authenticationScriptScriptSetting인증했을 때 실행할 스크립트의 설정
인증 프로세스를 커스터마이즈하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - authentication
createTakeOverScriptScriptSetting인계 정보를 등록했을 때 실행할 스크립트의 설정
인계 정보를 처음 등록했을 때 보상을 지급하기 위해 GS2-Mission의 카운터를 증가시키는 등의 커스텀 로직을 추가하는 데 사용됩니다.
Script 트리거 레퍼런스 - createTakeOver
doTakeOverScriptScriptSetting인계를 실행했을 때 실행할 스크립트의 설정
인계 처리의 추가 로직을 구현하는 데 도움이 됩니다.
Script 트리거 레퍼런스 - doTakeOver
banScriptScriptSetting계정 BAN 상태를 추가했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - ban
unBanScriptScriptSetting계정 BAN 상태를 해제했을 때 실행할 스크립트의 설정
Script 트리거 레퍼런스 - unBan
logSettingLogSetting로그 출력 설정
로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 기록하는 데 사용되는 GS2-Log 네임스페이스 정보를 보유합니다.

Result

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

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &account.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: nil,
        ChangePasswordIfTakeOver: pointy.Bool(true),
        CreateAccountScript: &account.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002"),
        },
        AuthenticationScript: &account.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"),
        },
        CreateTakeOverScript: &account.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"),
        },
        DoTakeOverScript: &account.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008"),
        },
        BanScript: nil,
        UnBanScript: nil,
        LogSetting: &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting(null)
            ->withChangePasswordIfTakeOver(true)
            ->withCreateAccountScript((new \Gs2\Account\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002"))
            ->withAuthenticationScript((new \Gs2\Account\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"))
            ->withCreateTakeOverScript((new \Gs2\Account\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"))
            ->withDoTakeOverScript((new \Gs2\Account\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008"))
            ->withBanScript(null)
            ->withUnBanScript(null)
            ->withLogSetting((new \Gs2\Account\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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateNamespaceRequest;
import io.gs2.account.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withChangePasswordIfTakeOver(true)
            .withCreateAccountScript(new io.gs2.account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002"))
            .withAuthenticationScript(new io.gs2.account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"))
            .withCreateTakeOverScript(new io.gs2.account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"))
            .withDoTakeOverScript(new io.gs2.account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008"))
            .withBanScript(null)
            .withUnBanScript(null)
            .withLogSetting(new io.gs2.account.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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Account.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(null)
        .WithChangePasswordIfTakeOver(true)
        .WithCreateAccountScript(new Gs2.Gs2Account.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002"))
        .WithAuthenticationScript(new Gs2.Gs2Account.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"))
        .WithCreateTakeOverScript(new Gs2.Gs2Account.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"))
        .WithDoTakeOverScript(new Gs2.Gs2Account.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008"))
        .WithBanScript(null)
        .WithUnBanScript(null)
        .WithLogSetting(new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateNamespace(
        new Gs2Account.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withChangePasswordIfTakeOver(true)
            .withCreateAccountScript(new Gs2Account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002"))
            .withAuthenticationScript(new Gs2Account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"))
            .withCreateTakeOverScript(new Gs2Account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"))
            .withDoTakeOverScript(new Gs2Account.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008"))
            .withBanScript(null)
            .withUnBanScript(null)
            .withLogSetting(new Gs2Account.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 account

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

try:
    result = client.update_namespace(
        account.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(None)
            .with_change_password_if_take_over(True)
            .with_create_account_script(
                account.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002'))
            .with_authentication_script(
                account.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004'))
            .with_create_take_over_script(
                account.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006'))
            .with_do_take_over_script(
                account.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008'))
            .with_ban_script(None)
            .with_un_ban_script(None)
            .with_log_setting(
                account.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('account')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    changePasswordIfTakeOver=true,
    createAccountScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002",
    },
    authenticationScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004",
    },
    createTakeOverScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006",
    },
    doTakeOverScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008",
    },
    banScript=nil,
    unBanScript=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('account')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    changePasswordIfTakeOver=true,
    createAccountScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1001",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1002",
    },
    authenticationScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004",
    },
    createTakeOverScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006",
    },
    doTakeOverScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1007",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1008",
    },
    banScript=nil,
    unBanScript=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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteNamespaceRequest;
import io.gs2.account.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetServiceVersionRequest;
import io.gs2.account.result.GetServiceVersionResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DumpUserDataByUserIdRequest;
import io.gs2.account.result.DumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.account.result.CheckDumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CleanUserDataByUserIdRequest;
import io.gs2.account.result.CleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.account.result.CheckCleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

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

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.account.result.PrepareImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2Account.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 account

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

try:
    result = client.prepare_import_user_data_by_user_id(
        account.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('account')

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.ImportUserDataByUserIdRequest;
import io.gs2.account.result.ImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

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

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

try:
    result = client.import_user_data_by_user_id(
        account.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('account')

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CheckImportUserDataByUserIdRequest;
import io.gs2.account.result.CheckImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2Account.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 account

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

try:
    result = client.check_import_user_data_by_user_id(
        account.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('account')

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('account')

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;

describeAccounts

게임 플레이어 계정의 목록을 취득

지정된 네임스페이스에 존재하는 모든 게임 플레이어 계정의 목록을 취득합니다.
취득되는 계정 정보에는 계정ID, 상태, 생성일시 등이 포함됩니다.
페이지네이션을 지원하며, 한 번에 취득할 수 있는 계정 수를 제한하고 다음 페이지의 토큰을 제공합니다.

상세

Request

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

Result

타입설명
itemsList<Account>게임 플레이어 계정의 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeAccounts(
    &account.DescribeAccountsRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeAccountsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeAccounts(
        (new DescribeAccountsRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeAccountsRequest;
import io.gs2.account.result.DescribeAccountsResult;

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

try {
    DescribeAccountsResult result = client.describeAccounts(
        new DescribeAccountsRequest()
            .withNamespaceName("namespace-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Account> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeAccountsResult> asyncResult = null;
yield return client.DescribeAccounts(
    new Gs2.Gs2Account.Request.DescribeAccountsRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeAccounts(
        new Gs2Account.DescribeAccountsRequest()
            .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 account

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

try:
    result = client.describe_accounts(
        account.DescribeAccountsRequest()
            .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('account')

api_result = client.describe_accounts({
    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('account')

api_result_handler = client.describe_accounts_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;

createAccount

게임 플레이어 계정을 신규 생성

이 메서드는 새로운 게임 플레이어 계정을 생성합니다.
계정 생성 시 사용자ID, 비밀번호의 지정은 필요하지 않습니다. 사용자ID, 비밀번호는 자동으로 생성됩니다.
생성 성공 시, 새로 생성된 계정의 상세 정보가 응답으로 반환됩니다.

상세

Request

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

Result

타입설명
itemAccount작성한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateAccount(
    &account.CreateAccountRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateAccountRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createAccount(
        (new CreateAccountRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateAccountRequest;
import io.gs2.account.result.CreateAccountResult;

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

try {
    CreateAccountResult result = client.createAccount(
        new CreateAccountRequest()
            .withNamespaceName("namespace-0001")
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateAccountResult> asyncResult = null;
yield return client.CreateAccount(
    new Gs2.Gs2Account.Request.CreateAccountRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createAccount(
        new Gs2Account.CreateAccountRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_account(
        account.CreateAccountRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_account({
    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('account')

api_result_handler = client.create_account_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;

updateTimeOffset

게임 플레이어 계정의 현재 시각에 대한 보정값을 갱신

특정 게임 플레이어 계정의 시각 보정값을 갱신합니다.
이 시각 보정은 미래의 이벤트 스케줄을 사전에 테스트하는 데 활용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
timeOffsetint00 ~ 315360000현재 시각에 대한 보정값(현재 시각을 기준으로 한 초 수)
시각 보정값은 서버의 현재 시각과의 차이를 초 단위로 나타냅니다.
이 값은 게임 내 이벤트나 기능이 특정 시각에 맞춰 동작해야 할 때 사용됩니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount갱신한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateTimeOffset(
    &account.UpdateTimeOffsetRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        TimeOffset: 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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateTimeOffsetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateTimeOffset(
        (new UpdateTimeOffsetRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withTimeOffset(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateTimeOffsetRequest;
import io.gs2.account.result.UpdateTimeOffsetResult;

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

try {
    UpdateTimeOffsetResult result = client.updateTimeOffset(
        new UpdateTimeOffsetRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffset(null)
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateTimeOffsetResult> asyncResult = null;
yield return client.UpdateTimeOffset(
    new Gs2.Gs2Account.Request.UpdateTimeOffsetRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithTimeOffset(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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateTimeOffset(
        new Gs2Account.UpdateTimeOffsetRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffset(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_time_offset(
        account.UpdateTimeOffsetRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_time_offset(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_time_offset({
    namespaceName="namespace-0001",
    userId="userId-0001",
    timeOffset=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('account')

api_result_handler = client.update_time_offset_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    timeOffset=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;

updateBanned

게임 플레이어 계정의 계정 BAN 상태를 갱신

특정 게임 플레이어 계정의 BAN(접근 금지) 상태를 갱신하기 위해 사용됩니다.
계정의 BAN 상태를 활성화 또는 비활성화할 수 있으며, 이를 통해 계정의 게임 내 이용을 제한할 수 있습니다.
계정ID와 새로운 BAN 상태를 지정하여 갱신합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
bannedboolfalse계정이 BAN되어 있는지 여부
계정이 현재 BAN되어 있는지 여부를 나타냅니다.
true인 경우 계정은 접근 금지 상태이며, false인 경우 접근이 가능합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount갱신한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateBanned(
    &account.UpdateBannedRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Banned: pointy.Bool(true),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateBannedRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateBanned(
        (new UpdateBannedRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withBanned(true)
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateBannedRequest;
import io.gs2.account.result.UpdateBannedResult;

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

try {
    UpdateBannedResult result = client.updateBanned(
        new UpdateBannedRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanned(true)
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateBannedResult> asyncResult = null;
yield return client.UpdateBanned(
    new Gs2.Gs2Account.Request.UpdateBannedRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithBanned(true)
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateBanned(
        new Gs2Account.UpdateBannedRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanned(true)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_banned(
        account.UpdateBannedRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_banned(True)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_banned({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banned=true,
    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('account')

api_result_handler = client.update_banned_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banned=true,
    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;

addBan

게임 플레이어 계정에 계정 BAN 상태를 추가

게임 플레이어 계정에 계정 BAN 상태를 추가하기 위해 사용됩니다.
특정 계정에 대해 일시적 또는 영구적인 접근 금지를 설정할 수 있습니다.
BAN을 추가하려면 계정ID와 BAN 상태(이유 및 기간 포함)를 지정해야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
banStatusBanStatus
BAN 상태
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount갱신한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.AddBan(
    &account.AddBanRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        BanStatus: &account.BanStatus{
            Name: pointy.String("feature1"),
            Reason: pointy.String("reason"),
            ReleaseTimestamp: pointy.Int64(1000000000000),
        },
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\AddBanRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addBan(
        (new AddBanRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withBanStatus((new BanStatus())
                ->withName("feature1")
                ->withReason("reason")
                ->withReleaseTimestamp(1000000000000)
            )
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.AddBanRequest;
import io.gs2.account.result.AddBanResult;

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

try {
    AddBanResult result = client.addBan(
        new AddBanRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanStatus(new BanStatus()
                .withName("feature1")
                .withReason("reason")
                .withReleaseTimestamp(1000000000000L)
            )
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.AddBanResult> asyncResult = null;
yield return client.AddBan(
    new Gs2.Gs2Account.Request.AddBanRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithBanStatus(new Gs2.Gs2Account.Model.BanStatus()
            .WithName("feature1")
            .WithReason("reason")
            .WithReleaseTimestamp(1000000000000L)
        )
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.addBan(
        new Gs2Account.AddBanRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanStatus(new Gs2Account.model.BanStatus()
                .withName("feature1")
                .withReason("reason")
                .withReleaseTimestamp(1000000000000)
            )
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.add_ban(
        account.AddBanRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_ban_status(account.BanStatus()
                .with_name('feature1')
                .with_reason('reason')
                .with_release_timestamp(1000000000000)
            )
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.add_ban({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banStatus={
        name="feature1",
        reason="reason",
        release_timestamp=1000000000000,
    },
    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('account')

api_result_handler = client.add_ban_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banStatus={
        name="feature1",
        reason="reason",
        release_timestamp=1000000000000,
    },
    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;

removeBan

게임 플레이어 계정의 계정 BAN 상태를 삭제

특정 게임 플레이어 계정에 적용된 계정 BAN 상태를 삭제합니다.
삭제를 수행하려면 사용자ID와 삭제할 계정 BAN 상태의 이름을 지정합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
banStatusNamestring
~ 36자BAN 상태명
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount갱신한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.RemoveBan(
    &account.RemoveBanRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        BanStatusName: pointy.String("status-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\RemoveBanRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->removeBan(
        (new RemoveBanRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withBanStatusName("status-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.RemoveBanRequest;
import io.gs2.account.result.RemoveBanResult;

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

try {
    RemoveBanResult result = client.removeBan(
        new RemoveBanRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanStatusName("status-0001")
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.RemoveBanResult> asyncResult = null;
yield return client.RemoveBan(
    new Gs2.Gs2Account.Request.RemoveBanRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithBanStatusName("status-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.removeBan(
        new Gs2Account.RemoveBanRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withBanStatusName("status-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.remove_ban(
        account.RemoveBanRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_ban_status_name('status-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.remove_ban({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banStatusName="status-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('account')

api_result_handler = client.remove_ban_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    banStatusName="status-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;

getAccount

게임 플레이어 계정을 취득

지정된 ID를 가진 특정 게임 플레이어 계정의 상세 정보를 취득합니다.
취득되는 정보에는 계정의 이름, 상태, 생성일시 등이 포함됩니다.
이 메서드는 계정의 상세 정보를 표시하기 위한 것입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
UUID~ 128자사용자ID
includeLastAuthenticatedAtboolfalse마지막 인증 일시 포함
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetAccount(
    &account.GetAccountRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        IncludeLastAuthenticatedAt: 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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetAccountRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getAccount(
        (new GetAccountRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withIncludeLastAuthenticatedAt(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetAccountRequest;
import io.gs2.account.result.GetAccountResult;

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

try {
    GetAccountResult result = client.getAccount(
        new GetAccountRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withIncludeLastAuthenticatedAt(null)
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetAccountResult> asyncResult = null;
yield return client.GetAccount(
    new Gs2.Gs2Account.Request.GetAccountRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithIncludeLastAuthenticatedAt(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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getAccount(
        new Gs2Account.GetAccountRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withIncludeLastAuthenticatedAt(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_account(
        account.GetAccountRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_include_last_authenticated_at(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_account({
    namespaceName="namespace-0001",
    userId="userId-0001",
    includeLastAuthenticatedAt=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('account')

api_result_handler = client.get_account_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    includeLastAuthenticatedAt=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;

deleteAccount

게임 플레이어 계정을 삭제

특정 게임 플레이어 계정을 삭제하기 위해 사용됩니다.
계정을 삭제하면 해당 계정으로는 로그인할 수 없게 되지만, GS2-Account가 관리하지 않는 사용자 데이터는 계속 GS2에 남아 있습니다.
사용자 데이터도 모두 삭제해야 하는 경우에는 매니지먼트 콘솔에서 접근할 수 있는 사용자 데이터 완전 삭제 기능을 이용해 주십시오.

상세

Request

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

Result

타입설명
itemAccount삭제한 게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteAccount(
    &account.DeleteAccountRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteAccountRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteAccount(
        (new DeleteAccountRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteAccountRequest;
import io.gs2.account.result.DeleteAccountResult;

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

try {
    DeleteAccountResult result = client.deleteAccount(
        new DeleteAccountRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteAccountResult> asyncResult = null;
yield return client.DeleteAccount(
    new Gs2.Gs2Account.Request.DeleteAccountRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteAccount(
        new Gs2Account.DeleteAccountRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_account(
        account.DeleteAccountRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_account({
    namespaceName="namespace-0001",
    userId="userId-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('account')

api_result_handler = client.delete_account_async({
    namespaceName="namespace-0001",
    userId="userId-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;

authentication

게임 플레이어 계정을 인증

게임 플레이어 계정의 인증에 사용됩니다.
사용자가 계정에 로그인할 때, 사용자 이름과 비밀번호를 대조합니다.
올바른 인증 정보가 제공되면, 계정 정보와 그 서명이 발급됩니다.
이 정보를 GS2-Auth 에 전달하면 액세스 토큰을 얻을 수 있으며, GS2 가 제공하는 다양한 마이크로서비스에 로그인한 사용자로서 접근할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN
passwordstring
~ 128자비밀번호
계정의 보안을 확보하기 위한 비밀번호를 저장합니다.
비밀번호는 최대 128자 길이를 가지며, 계정 보호에 중요한 역할을 합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemAccount게임 플레이어 계정
banStatusesList<BanStatus>BAN 상태 리스트
bodystring서명 대상 계정 인증 정보
signaturestring서명

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.Authentication(
    &account.AuthenticationRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        KeyId: pointy.String("grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001"),
        Password: pointy.String("password-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
banStatuses := result.BanStatuses
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\AuthenticationRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->authentication(
        (new AuthenticationRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withKeyId("grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001")
            ->withPassword("password-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $banStatuses = $result->getBanStatuses();
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.AuthenticationRequest;
import io.gs2.account.result.AuthenticationResult;

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

try {
    AuthenticationResult result = client.authentication(
        new AuthenticationRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withKeyId("grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001")
            .withPassword("password-0001")
            .withTimeOffsetToken(null)
    );
    Account item = result.getItem();
    List<BanStatus> banStatuses = result.getBanStatuses();
    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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.AuthenticationResult> asyncResult = null;
yield return client.Authentication(
    new Gs2.Gs2Account.Request.AuthenticationRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithKeyId("grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001")
        .WithPassword("password-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var banStatuses = result.BanStatuses;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Account from '@/gs2/account';

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

try {
    const result = await client.authentication(
        new Gs2Account.AuthenticationRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withKeyId("grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001")
            .withPassword("password-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const banStatuses = result.getBanStatuses();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.authentication(
        account.AuthenticationRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_key_id('grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001')
            .with_password('password-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    ban_statuses = result.ban_statuses
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.authentication({
    namespaceName="namespace-0001",
    userId="user-0001",
    keyId="grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001",
    password="password-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;
banStatuses = result.banStatuses;
body = result.body;
signature = result.signature;
client = gs2('account')

api_result_handler = client.authentication_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    keyId="grn:gs2:ap-northeast-1:owner_id:key:namespace-0001:key:key-0001",
    password="password-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;
banStatuses = result.banStatuses;
body = result.body;
signature = result.signature;

describeTakeOvers

인계 정보 목록을 취득

현재 로그인 중인 게임 플레이어 계정에 등록된 인계 정보 목록을 취득합니다.
인계 정보는 기기 변경이나 게임 재설치 시 계정 데이터를 이전하기 위해 사용됩니다.
페이지네이션을 지원하며, 한 번에 취득하는 건수를 제한하고 다음 페이지의 토큰을 사용하여 이어서 취득할 수 있습니다.

상세

Request

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

Result

타입설명
itemsList<TakeOver>인계 정보의 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeTakeOvers(
    &account.DescribeTakeOversRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeTakeOversRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeTakeOvers(
        (new DescribeTakeOversRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeTakeOversRequest;
import io.gs2.account.result.DescribeTakeOversResult;

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

try {
    DescribeTakeOversResult result = client.describeTakeOvers(
        new DescribeTakeOversRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<TakeOver> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeTakeOversResult> asyncResult = null;
yield return client.DescribeTakeOvers(
    new Gs2.Gs2Account.Request.DescribeTakeOversRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeTakeOvers(
        new Gs2Account.DescribeTakeOversRequest()
            .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 account

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

try:
    result = client.describe_take_overs(
        account.DescribeTakeOversRequest()
            .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('account')

api_result = client.describe_take_overs({
    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('account')

api_result_handler = client.describe_take_overs_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;

describeTakeOversByUserId

사용자ID를 지정하여 인계 정보 목록을 취득

지정된 게임 플레이어 계정에 등록된 인계 정보 목록을 취득합니다.
인계 정보는 기기 변경이나 게임 재설치 시 계정 데이터를 이전하기 위해 사용됩니다.
페이지네이션을 지원하며, 한 번에 취득하는 건수를 제한하고 다음 페이지의 토큰을 사용하여 이어서 취득할 수 있습니다.

상세

Request

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

Result

타입설명
itemsList<TakeOver>인계 정보의 리스트
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeTakeOversByUserId(
    &account.DescribeTakeOversByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeTakeOversByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeTakeOversByUserId(
        (new DescribeTakeOversByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeTakeOversByUserIdRequest;
import io.gs2.account.result.DescribeTakeOversByUserIdResult;

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

try {
    DescribeTakeOversByUserIdResult result = client.describeTakeOversByUserId(
        new DescribeTakeOversByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<TakeOver> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeTakeOversByUserIdResult> asyncResult = null;
yield return client.DescribeTakeOversByUserId(
    new Gs2.Gs2Account.Request.DescribeTakeOversByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeTakeOversByUserId(
        new Gs2Account.DescribeTakeOversByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-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 account

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

try:
    result = client.describe_take_overs_by_user_id(
        account.DescribeTakeOversByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-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('account')

api_result = client.describe_take_overs_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-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('account')

api_result_handler = client.describe_take_overs_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-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;

createTakeOver

인계 정보를 신규 작성

현재 로그인 중인 게임 플레이어 계정에 새로운 인계 정보를 등록합니다.
타입 슬롯(숫자), 사용자 식별자(이메일 주소 등), 비밀번호를 지정해야 합니다.
등록한 정보는 이후 다른 단말에서 동일한 사용자 식별자와 비밀번호를 사용하여 계정을 복구할 때 사용됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
userIdentifierstring
~ 1024자인계용 사용자 ID
계정을 인계할 때 사용되는 개인을 식별하기 위한 고유 키입니다.
서로 다른 계정에서 동일한 userIdentifier를 지정한 경우, 나중에 설정한 값이 우선됩니다.
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.

Result

타입설명
itemTakeOver작성한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateTakeOver(
    &account.CreateTakeOverRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("user-0001@gs2.io"),
        Password: pointy.String("password-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateTakeOverRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createTakeOver(
        (new CreateTakeOverRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withUserIdentifier("user-0001@gs2.io")
            ->withPassword("password-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateTakeOverRequest;
import io.gs2.account.result.CreateTakeOverResult;

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

try {
    CreateTakeOverResult result = client.createTakeOver(
        new CreateTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateTakeOverResult> asyncResult = null;
yield return client.CreateTakeOver(
    new Gs2.Gs2Account.Request.CreateTakeOverRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithUserIdentifier("user-0001@gs2.io")
        .WithPassword("password-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createTakeOver(
        new Gs2Account.CreateTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_take_over(
        account.CreateTakeOverRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_user_identifier('user-0001@gs2.io')
            .with_password('password-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_take_over({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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('account')

api_result_handler = client.create_take_over_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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;

createTakeOverByUserId

사용자ID를 지정하여 인계 정보를 신규 작성

지정된 게임 플레이어 계정에 새로운 인계 정보를 등록합니다.
타입 슬롯(숫자), 사용자 식별자(이메일 주소 등), 비밀번호를 지정해야 합니다.
등록한 정보는 이후 다른 단말에서 동일한 사용자 식별자와 비밀번호를 사용하여 계정을 복구할 때 사용됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
userIdentifierstring
~ 1024자인계용 사용자 ID
계정을 인계할 때 사용되는 개인을 식별하기 위한 고유 키입니다.
서로 다른 계정에서 동일한 userIdentifier를 지정한 경우, 나중에 설정한 값이 우선됩니다.
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemTakeOver작성한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateTakeOverByUserId(
    &account.CreateTakeOverByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("user-0001@gs2.io"),
        Password: pointy.String("password-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateTakeOverByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createTakeOverByUserId(
        (new CreateTakeOverByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(0)
            ->withUserIdentifier("user-0001@gs2.io")
            ->withPassword("password-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateTakeOverByUserIdRequest;
import io.gs2.account.result.CreateTakeOverByUserIdResult;

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

try {
    CreateTakeOverByUserIdResult result = client.createTakeOverByUserId(
        new CreateTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
            .withTimeOffsetToken(null)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateTakeOverByUserIdResult> asyncResult = null;
yield return client.CreateTakeOverByUserId(
    new Gs2.Gs2Account.Request.CreateTakeOverByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .WithUserIdentifier("user-0001@gs2.io")
        .WithPassword("password-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createTakeOverByUserId(
        new Gs2Account.CreateTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_take_over_by_user_id(
        account.CreateTakeOverByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_user_identifier('user-0001@gs2.io')
            .with_password('password-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_take_over_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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('account')

api_result_handler = client.create_take_over_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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;

createTakeOverOpenIdConnect

OpenID Connect 를 사용하여 인계 정보를 신규 작성

OpenID Connect 의 ID Token 을 사용하여, 현재 로그인 중인 게임 플레이어 계정에 새로운 인계 정보를 등록합니다.
비밀번호 대신, ID 제공자(Google, Apple 등)로부터 취득한 ID Token 을 사용합니다.
사용자 식별자(subject)는 ID Token 에서 자동으로 추출되어 계정에 연결됩니다.
대응하는 인계 타입 모델에 OpenID Connect 설정이 사전에 구성되어 있어야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
idTokenstring
~ 10240자OpenID Connect ID Token

Result

타입설명
itemTakeOver작성한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateTakeOverOpenIdConnect(
    &account.CreateTakeOverOpenIdConnectRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        IdToken: pointy.String("0123456789"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateTakeOverOpenIdConnectRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createTakeOverOpenIdConnect(
        (new CreateTakeOverOpenIdConnectRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withIdToken("0123456789")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateTakeOverOpenIdConnectRequest;
import io.gs2.account.result.CreateTakeOverOpenIdConnectResult;

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

try {
    CreateTakeOverOpenIdConnectResult result = client.createTakeOverOpenIdConnect(
        new CreateTakeOverOpenIdConnectRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withIdToken("0123456789")
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateTakeOverOpenIdConnectResult> asyncResult = null;
yield return client.CreateTakeOverOpenIdConnect(
    new Gs2.Gs2Account.Request.CreateTakeOverOpenIdConnectRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithIdToken("0123456789"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createTakeOverOpenIdConnect(
        new Gs2Account.CreateTakeOverOpenIdConnectRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withIdToken("0123456789")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_take_over_open_id_connect(
        account.CreateTakeOverOpenIdConnectRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_id_token('0123456789')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_take_over_open_id_connect({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    idToken="0123456789",
})

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('account')

api_result_handler = client.create_take_over_open_id_connect_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    idToken="0123456789",
})

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;

createTakeOverOpenIdConnectAndByUserId

사용자ID를 지정하여 OpenID Connect 를 사용해 인계 정보를 신규 작성

OpenID Connect 의 ID Token 을 사용하여, 지정된 게임 플레이어 계정에 새로운 인계 정보를 등록합니다.
비밀번호 대신, ID 제공자(Google, Apple 등)로부터 취득한 ID Token 을 사용합니다.
사용자 식별자(subject)는 ID Token 에서 자동으로 추출되어 계정에 연결됩니다.
대응하는 인계 타입 모델에 OpenID Connect 설정이 사전에 구성되어 있어야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
idTokenstring
~ 10240자OpenID Connect ID Token
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemTakeOver작성한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateTakeOverOpenIdConnectAndByUserId(
    &account.CreateTakeOverOpenIdConnectAndByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(0),
        IdToken: pointy.String("0123456789"),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateTakeOverOpenIdConnectAndByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createTakeOverOpenIdConnectAndByUserId(
        (new CreateTakeOverOpenIdConnectAndByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(0)
            ->withIdToken("0123456789")
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateTakeOverOpenIdConnectAndByUserIdRequest;
import io.gs2.account.result.CreateTakeOverOpenIdConnectAndByUserIdResult;

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

try {
    CreateTakeOverOpenIdConnectAndByUserIdResult result = client.createTakeOverOpenIdConnectAndByUserId(
        new CreateTakeOverOpenIdConnectAndByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withIdToken("0123456789")
            .withTimeOffsetToken(null)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateTakeOverOpenIdConnectAndByUserIdResult> asyncResult = null;
yield return client.CreateTakeOverOpenIdConnectAndByUserId(
    new Gs2.Gs2Account.Request.CreateTakeOverOpenIdConnectAndByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .WithIdToken("0123456789")
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createTakeOverOpenIdConnectAndByUserId(
        new Gs2Account.CreateTakeOverOpenIdConnectAndByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withIdToken("0123456789")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_take_over_open_id_connect_and_by_user_id(
        account.CreateTakeOverOpenIdConnectAndByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_id_token('0123456789')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_take_over_open_id_connect_and_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    idToken="0123456789",
    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('account')

api_result_handler = client.create_take_over_open_id_connect_and_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    idToken="0123456789",
    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;

getTakeOver

인계 정보를 취득

현재 로그인 중인 게임 플레이어 계정에 등록된, 지정된 타입의 인계 정보를 취득합니다.
취득되는 정보에는 타입 슬롯, 사용자 식별자, 생성 일시 등이 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
itemTakeOver인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetTakeOver(
    &account.GetTakeOverRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetTakeOverRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getTakeOver(
        (new GetTakeOverRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetTakeOverRequest;
import io.gs2.account.result.GetTakeOverResult;

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

try {
    GetTakeOverResult result = client.getTakeOver(
        new GetTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetTakeOverResult> asyncResult = null;
yield return client.GetTakeOver(
    new Gs2.Gs2Account.Request.GetTakeOverRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getTakeOver(
        new Gs2Account.GetTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_take_over(
        account.GetTakeOverRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_take_over({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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('account')

api_result_handler = client.get_take_over_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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;

getTakeOverByUserId

사용자ID를 지정하여 인계 정보를 취득

지정된 게임 플레이어 계정에 등록된, 지정된 타입의 인계 정보를 취득합니다.
취득되는 정보에는 타입 슬롯, 사용자 식별자, 생성 일시 등이 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemTakeOver인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetTakeOverByUserId(
    &account.GetTakeOverByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetTakeOverByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getTakeOverByUserId(
        (new GetTakeOverByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetTakeOverByUserIdRequest;
import io.gs2.account.result.GetTakeOverByUserIdResult;

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

try {
    GetTakeOverByUserIdResult result = client.getTakeOverByUserId(
        new GetTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetTakeOverByUserIdResult> asyncResult = null;
yield return client.GetTakeOverByUserId(
    new Gs2.Gs2Account.Request.GetTakeOverByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getTakeOverByUserId(
        new Gs2Account.GetTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_take_over_by_user_id(
        account.GetTakeOverByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_take_over_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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('account')

api_result_handler = client.get_take_over_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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;

updateTakeOver

인계 정보를 갱신

현재 로그인 중인 게임 플레이어 계정의 지정된 타입의 인계 정보 비밀번호를 갱신합니다.
새로운 비밀번호를 설정하기 전에 이전 비밀번호의 검증이 필요합니다.
이전 비밀번호가 일치하지 않을 경우, PasswordIncorrect 오류가 반환됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
oldPasswordstring
~ 128자이전 비밀번호
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.

Result

타입설명
itemTakeOver갱신한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateTakeOver(
    &account.UpdateTakeOverRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        OldPassword: pointy.String("password-0001"),
        Password: pointy.String("password-1001"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateTakeOverRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateTakeOver(
        (new UpdateTakeOverRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withOldPassword("password-0001")
            ->withPassword("password-1001")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateTakeOverRequest;
import io.gs2.account.result.UpdateTakeOverResult;

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

try {
    UpdateTakeOverResult result = client.updateTakeOver(
        new UpdateTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withOldPassword("password-0001")
            .withPassword("password-1001")
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateTakeOverResult> asyncResult = null;
yield return client.UpdateTakeOver(
    new Gs2.Gs2Account.Request.UpdateTakeOverRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithOldPassword("password-0001")
        .WithPassword("password-1001"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateTakeOver(
        new Gs2Account.UpdateTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withOldPassword("password-0001")
            .withPassword("password-1001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_take_over(
        account.UpdateTakeOverRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_old_password('password-0001')
            .with_password('password-1001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_take_over({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    oldPassword="password-0001",
    password="password-1001",
})

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('account')

api_result_handler = client.update_take_over_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    oldPassword="password-0001",
    password="password-1001",
})

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;

updateTakeOverByUserId

사용자ID를 지정하여 인계 정보를 갱신

지정된 게임 플레이어 계정의 지정된 타입의 인계 정보 비밀번호를 갱신합니다.
새로운 비밀번호를 설정하기 전에 이전 비밀번호의 검증이 필요합니다.
이전 비밀번호가 일치하지 않을 경우, PasswordIncorrect 오류가 반환됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
oldPasswordstring
~ 128자이전 비밀번호
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemTakeOver갱신한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateTakeOverByUserId(
    &account.UpdateTakeOverByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(0),
        OldPassword: pointy.String("password-0001"),
        Password: pointy.String("password-0002"),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateTakeOverByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateTakeOverByUserId(
        (new UpdateTakeOverByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(0)
            ->withOldPassword("password-0001")
            ->withPassword("password-0002")
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateTakeOverByUserIdRequest;
import io.gs2.account.result.UpdateTakeOverByUserIdResult;

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

try {
    UpdateTakeOverByUserIdResult result = client.updateTakeOverByUserId(
        new UpdateTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withOldPassword("password-0001")
            .withPassword("password-0002")
            .withTimeOffsetToken(null)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateTakeOverByUserIdResult> asyncResult = null;
yield return client.UpdateTakeOverByUserId(
    new Gs2.Gs2Account.Request.UpdateTakeOverByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .WithOldPassword("password-0001")
        .WithPassword("password-0002")
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateTakeOverByUserId(
        new Gs2Account.UpdateTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withOldPassword("password-0001")
            .withPassword("password-0002")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_take_over_by_user_id(
        account.UpdateTakeOverByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_old_password('password-0001')
            .with_password('password-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_take_over_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    oldPassword="password-0001",
    password="password-0002",
    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('account')

api_result_handler = client.update_take_over_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    oldPassword="password-0001",
    password="password-0002",
    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;

deleteTakeOver

인계 정보를 삭제

현재 로그인 중인 게임 플레이어 계정에서 지정된 타입의 인계 정보를 삭제합니다.
삭제 후에는, 삭제된 인계 정보의 사용자 식별자와 비밀번호를 사용한 계정 복구가 불가능합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
itemTakeOver삭제한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteTakeOver(
    &account.DeleteTakeOverRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteTakeOverRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteTakeOver(
        (new DeleteTakeOverRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteTakeOverRequest;
import io.gs2.account.result.DeleteTakeOverResult;

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

try {
    DeleteTakeOverResult result = client.deleteTakeOver(
        new DeleteTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteTakeOverResult> asyncResult = null;
yield return client.DeleteTakeOver(
    new Gs2.Gs2Account.Request.DeleteTakeOverRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteTakeOver(
        new Gs2Account.DeleteTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_take_over(
        account.DeleteTakeOverRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_take_over({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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('account')

api_result_handler = client.delete_take_over_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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;

deleteTakeOverByUserIdentifier

인계용 사용자ID를 지정하여 인계 정보를 삭제

GS2 의 사용자ID가 아니라, 플랫폼 측의 사용자 식별자를 사용하여 인계 정보를 검색하여 삭제합니다.
내부 GS2 사용자ID를 모르더라도, 외부 사용자 식별자(이메일 주소 등)로 삭제할 수 있습니다.
삭제 후에는, 삭제된 인계 정보의 사용자 식별자와 비밀번호를 사용한 계정 복구가 불가능합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
userIdentifierstring~ 1024자인계용 사용자ID

Result

타입설명
itemTakeOver삭제한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteTakeOverByUserIdentifier(
    &account.DeleteTakeOverByUserIdentifierRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("user-0001@gs2.io"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteTakeOverByUserIdentifierRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteTakeOverByUserIdentifier(
        (new DeleteTakeOverByUserIdentifierRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
            ->withUserIdentifier("user-0001@gs2.io")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteTakeOverByUserIdentifierRequest;
import io.gs2.account.result.DeleteTakeOverByUserIdentifierResult;

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

try {
    DeleteTakeOverByUserIdentifierResult result = client.deleteTakeOverByUserIdentifier(
        new DeleteTakeOverByUserIdentifierRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteTakeOverByUserIdentifierResult> asyncResult = null;
yield return client.DeleteTakeOverByUserIdentifier(
    new Gs2.Gs2Account.Request.DeleteTakeOverByUserIdentifierRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0)
        .WithUserIdentifier("user-0001@gs2.io"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteTakeOverByUserIdentifier(
        new Gs2Account.DeleteTakeOverByUserIdentifierRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_take_over_by_user_identifier(
        account.DeleteTakeOverByUserIdentifierRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
            .with_user_identifier('user-0001@gs2.io')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_take_over_by_user_identifier({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
})

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('account')

api_result_handler = client.delete_take_over_by_user_identifier_async({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
})

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;

deleteTakeOverByUserId

사용자ID를 지정하여 인계 정보를 삭제

GS2 사용자ID를 사용하여, 지정된 게임 플레이어 계정에서 지정된 타입의 인계 정보를 삭제합니다.
삭제 후에는, 삭제된 인계 정보의 사용자 식별자와 비밀번호를 사용한 계정 복구가 불가능합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemTakeOver삭제한 인계 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteTakeOverByUserId(
    &account.DeleteTakeOverByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteTakeOverByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteTakeOverByUserId(
        (new DeleteTakeOverByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteTakeOverByUserIdRequest;
import io.gs2.account.result.DeleteTakeOverByUserIdResult;

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

try {
    DeleteTakeOverByUserIdResult result = client.deleteTakeOverByUserId(
        new DeleteTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    TakeOver 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteTakeOverByUserIdResult> asyncResult = null;
yield return client.DeleteTakeOverByUserId(
    new Gs2.Gs2Account.Request.DeleteTakeOverByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteTakeOverByUserId(
        new Gs2Account.DeleteTakeOverByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_take_over_by_user_id(
        account.DeleteTakeOverByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_take_over_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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('account')

api_result_handler = client.delete_take_over_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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;

doTakeOver

인계를 실행

사용자 식별자와 비밀번호를 사용하여 계정 인계(복구) 처리를 실행합니다.
기기 변경이나 게임 재설치 후에 계정을 복구하고자 할 때 사용합니다.
사용자 식별자와 비밀번호가 등록된 인계 정보와 일치하는 경우, 연결된 게임 플레이어 계정이 반환됩니다.
비밀번호가 일치하지 않는 경우, PasswordIncorrect 오류가 반환됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
userIdentifierstring
~ 1024자인계용 사용자 ID
계정을 인계할 때 사용되는 개인을 식별하기 위한 고유 키입니다.
서로 다른 계정에서 동일한 userIdentifier를 지정한 경우, 나중에 설정한 값이 우선됩니다.
passwordstring
~ 128자비밀번호
보안을 고려하여 이 비밀번호는 기밀 정보로 취급되며, 해시 값만 저장되어 API 응답에는 값이 포함되지 않습니다.

Result

타입설명
itemAccount게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DoTakeOver(
    &account.DoTakeOverRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("user-0001@gs2.io"),
        Password: pointy.String("password-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DoTakeOverRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->doTakeOver(
        (new DoTakeOverRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
            ->withUserIdentifier("user-0001@gs2.io")
            ->withPassword("password-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DoTakeOverRequest;
import io.gs2.account.result.DoTakeOverResult;

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

try {
    DoTakeOverResult result = client.doTakeOver(
        new DoTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DoTakeOverResult> asyncResult = null;
yield return client.DoTakeOver(
    new Gs2.Gs2Account.Request.DoTakeOverRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0)
        .WithUserIdentifier("user-0001@gs2.io")
        .WithPassword("password-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.doTakeOver(
        new Gs2Account.DoTakeOverRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("user-0001@gs2.io")
            .withPassword("password-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.do_take_over(
        account.DoTakeOverRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
            .with_user_identifier('user-0001@gs2.io')
            .with_password('password-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.do_take_over({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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('account')

api_result_handler = client.do_take_over_async({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="user-0001@gs2.io",
    password="password-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;

doTakeOverOpenIdConnect

OpenID Connect 를 사용하여 인계를 실행

OpenID Connect 의 ID Token 을 사용하여 계정 인계(복구) 처리를 실행합니다.
비밀번호 대신, ID 제공자(Google, Apple 등)로부터 취득한 ID Token 을 사용하는 인계 실행의 OIDC 변형입니다.
ID Token 이 검증되고, subject 를 사용하여 연결된 게임 플레이어 계정이 검색됩니다.
대응하는 인계 타입 모델에 OpenID Connect 설정이 사전에 구성되어 있어야 합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
idTokenstring
~ 10240자OpenID Connect ID Token

Result

타입설명
itemAccount게임 플레이어 계정

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DoTakeOverOpenIdConnect(
    &account.DoTakeOverOpenIdConnectRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: nil,
        IdToken: pointy.String("0123456789"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DoTakeOverOpenIdConnectRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->doTakeOverOpenIdConnect(
        (new DoTakeOverOpenIdConnectRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(null)
            ->withIdToken("0123456789")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DoTakeOverOpenIdConnectRequest;
import io.gs2.account.result.DoTakeOverOpenIdConnectResult;

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

try {
    DoTakeOverOpenIdConnectResult result = client.doTakeOverOpenIdConnect(
        new DoTakeOverOpenIdConnectRequest()
            .withNamespaceName("namespace-0001")
            .withType(null)
            .withIdToken("0123456789")
    );
    Account 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DoTakeOverOpenIdConnectResult> asyncResult = null;
yield return client.DoTakeOverOpenIdConnect(
    new Gs2.Gs2Account.Request.DoTakeOverOpenIdConnectRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(null)
        .WithIdToken("0123456789"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.doTakeOverOpenIdConnect(
        new Gs2Account.DoTakeOverOpenIdConnectRequest()
            .withNamespaceName("namespace-0001")
            .withType(null)
            .withIdToken("0123456789")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.do_take_over_open_id_connect(
        account.DoTakeOverOpenIdConnectRequest()
            .with_namespace_name('namespace-0001')
            .with_type(None)
            .with_id_token('0123456789')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.do_take_over_open_id_connect({
    namespaceName="namespace-0001",
    type=nil,
    idToken="0123456789",
})

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('account')

api_result_handler = client.do_take_over_open_id_connect_async({
    namespaceName="namespace-0001",
    type=nil,
    idToken="0123456789",
})

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;

getAuthorizationUrl

인증URL을 취득

지정된 인계 타입의 OpenID Connect 흐름의 인증URL을 반환합니다.
클라이언트는 이 URL을 사용하여 사용자를 ID 제공자의 인증 페이지로 리다이렉트할 수 있습니다.
이는 계정 인계를 위한 OAuth/OIDC 인증 흐름을 시작하기 위한 진입점입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
authorizationUrlstring인증URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetAuthorizationUrl(
    &account.GetAuthorizationUrlRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
    }
)
if err != nil {
    panic("error occurred")
}
authorizationUrl := result.AuthorizationUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetAuthorizationUrlRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getAuthorizationUrl(
        (new GetAuthorizationUrlRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
    );
    $authorizationUrl = $result->getAuthorizationUrl();
} 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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetAuthorizationUrlRequest;
import io.gs2.account.result.GetAuthorizationUrlResult;

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

try {
    GetAuthorizationUrlResult result = client.getAuthorizationUrl(
        new GetAuthorizationUrlRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    String authorizationUrl = result.getAuthorizationUrl();
} 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetAuthorizationUrlResult> asyncResult = null;
yield return client.GetAuthorizationUrl(
    new Gs2.Gs2Account.Request.GetAuthorizationUrlRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var authorizationUrl = result.AuthorizationUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getAuthorizationUrl(
        new Gs2Account.GetAuthorizationUrlRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    const authorizationUrl = result.getAuthorizationUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_authorization_url(
        account.GetAuthorizationUrlRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
    )
    authorization_url = result.authorization_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_authorization_url({
    namespaceName="namespace-0001",
    type=0,
})

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

result = api_result.result
authorizationUrl = result.authorizationUrl;
client = gs2('account')

api_result_handler = client.get_authorization_url_async({
    namespaceName="namespace-0001",
    type=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
authorizationUrl = result.authorizationUrl;

describePlatformIds

외부 플랫폼 계정 ID 목록을 가져오기

상세

Request

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

Result

타입설명
itemsList<PlatformId>외부 플랫폼 계정ID 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribePlatformIds(
    &account.DescribePlatformIdsRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribePlatformIdsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describePlatformIds(
        (new DescribePlatformIdsRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribePlatformIdsRequest;
import io.gs2.account.result.DescribePlatformIdsResult;

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

try {
    DescribePlatformIdsResult result = client.describePlatformIds(
        new DescribePlatformIdsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<PlatformId> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribePlatformIdsResult> asyncResult = null;
yield return client.DescribePlatformIds(
    new Gs2.Gs2Account.Request.DescribePlatformIdsRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describePlatformIds(
        new Gs2Account.DescribePlatformIdsRequest()
            .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 account

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

try:
    result = client.describe_platform_ids(
        account.DescribePlatformIdsRequest()
            .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('account')

api_result = client.describe_platform_ids({
    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('account')

api_result_handler = client.describe_platform_ids_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;

describePlatformIdsByUserId

GS2-Account 사용자ID를 지정하여 외부 플랫폼의 계정ID 목록을 취득

상세

Request

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

Result

타입설명
itemsList<PlatformId>외부 플랫폼 계정ID 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribePlatformIdsByUserId(
    &account.DescribePlatformIdsByUserIdRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribePlatformIdsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describePlatformIdsByUserId(
        (new DescribePlatformIdsByUserIdRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribePlatformIdsByUserIdRequest;
import io.gs2.account.result.DescribePlatformIdsByUserIdResult;

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

try {
    DescribePlatformIdsByUserIdResult result = client.describePlatformIdsByUserId(
        new DescribePlatformIdsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<PlatformId> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribePlatformIdsByUserIdResult> asyncResult = null;
yield return client.DescribePlatformIdsByUserId(
    new Gs2.Gs2Account.Request.DescribePlatformIdsByUserIdRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describePlatformIdsByUserId(
        new Gs2Account.DescribePlatformIdsByUserIdRequest()
            .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 account

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

try:
    result = client.describe_platform_ids_by_user_id(
        account.DescribePlatformIdsByUserIdRequest()
            .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('account')

api_result = client.describe_platform_ids_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('account')

api_result_handler = client.describe_platform_ids_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;

createPlatformId

외부 플랫폼의 계정ID를 신규 생성

외부 플랫폼의 계정ID란, X, Instagram, Facebook 등의 외부 플랫폼에서의 ID를 보유하기 위한 정보입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.

Result

타입설명
itemPlatformId생성한 외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreatePlatformId(
    &account.CreatePlatformIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreatePlatformIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createPlatformId(
        (new CreatePlatformIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withUserIdentifier("123456")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreatePlatformIdRequest;
import io.gs2.account.result.CreatePlatformIdResult;

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

try {
    CreatePlatformIdResult result = client.createPlatformId(
        new CreatePlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreatePlatformIdResult> asyncResult = null;
yield return client.CreatePlatformId(
    new Gs2.Gs2Account.Request.CreatePlatformIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithUserIdentifier("123456"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createPlatformId(
        new Gs2Account.CreatePlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_platform_id(
        account.CreatePlatformIdRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_user_identifier('123456')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_platform_id({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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('account')

api_result_handler = client.create_platform_id_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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;

createPlatformIdByUserId

GS2-Account 사용자ID를 지정하여 외부 플랫폼의 계정ID를 신규 생성

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자GS2-Account 사용자 ID
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPlatformId생성한 외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreatePlatformIdByUserId(
    &account.CreatePlatformIdByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456789"),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreatePlatformIdByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createPlatformIdByUserId(
        (new CreatePlatformIdByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(0)
            ->withUserIdentifier("123456789")
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreatePlatformIdByUserIdRequest;
import io.gs2.account.result.CreatePlatformIdByUserIdResult;

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

try {
    CreatePlatformIdByUserIdResult result = client.createPlatformIdByUserId(
        new CreatePlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withUserIdentifier("123456789")
            .withTimeOffsetToken(null)
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreatePlatformIdByUserIdResult> asyncResult = null;
yield return client.CreatePlatformIdByUserId(
    new Gs2.Gs2Account.Request.CreatePlatformIdByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .WithUserIdentifier("123456789")
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createPlatformIdByUserId(
        new Gs2Account.CreatePlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withUserIdentifier("123456789")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_platform_id_by_user_id(
        account.CreatePlatformIdByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_user_identifier('123456789')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_platform_id_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    userIdentifier="123456789",
    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('account')

api_result_handler = client.create_platform_id_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=0,
    userIdentifier="123456789",
    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;

getPlatformId

외부 플랫폼의 계정ID를 취득

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.

Result

타입설명
itemPlatformId외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetPlatformId(
    &account.GetPlatformIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetPlatformIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getPlatformId(
        (new GetPlatformIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetPlatformIdRequest;
import io.gs2.account.result.GetPlatformIdResult;

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

try {
    GetPlatformIdResult result = client.getPlatformId(
        new GetPlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetPlatformIdResult> asyncResult = null;
yield return client.GetPlatformId(
    new Gs2.Gs2Account.Request.GetPlatformIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getPlatformId(
        new Gs2Account.GetPlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_platform_id(
        account.GetPlatformIdRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_platform_id({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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('account')

api_result_handler = client.get_platform_id_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=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;

getPlatformIdByUserId

사용자ID를 지정하여 외부 플랫폼의 계정ID를 취득

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자GS2-Account 사용자 ID
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPlatformId외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetPlatformIdByUserId(
    &account.GetPlatformIdByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetPlatformIdByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getPlatformIdByUserId(
        (new GetPlatformIdByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetPlatformIdByUserIdRequest;
import io.gs2.account.result.GetPlatformIdByUserIdResult;

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

try {
    GetPlatformIdByUserIdResult result = client.getPlatformIdByUserId(
        new GetPlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetPlatformIdByUserIdResult> asyncResult = null;
yield return client.GetPlatformIdByUserId(
    new Gs2.Gs2Account.Request.GetPlatformIdByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithType(0)
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getPlatformIdByUserId(
        new Gs2Account.GetPlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_platform_id_by_user_id(
        account.GetPlatformIdByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_type(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_platform_id_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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('account')

api_result_handler = client.get_platform_id_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    type=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;

findPlatformId

외부 플랫폼의 계정ID를 지정하여 GS2-Account의 사용자ID를 취득

네임스페이스 설정에서 “로그인에 사용하는 사용자ID와 데이터 보유에 사용하는 사용자ID를 다르게 설정"을 활성화한 경우에는 데이터 오너ID를 취득할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.

Result

타입설명
itemPlatformUser외부 플랫폼의 사용자 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.FindPlatformId(
    &account.FindPlatformIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\FindPlatformIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->findPlatformId(
        (new FindPlatformIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withUserIdentifier("123456")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.FindPlatformIdRequest;
import io.gs2.account.result.FindPlatformIdResult;

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

try {
    FindPlatformIdResult result = client.findPlatformId(
        new FindPlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    PlatformUser 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.FindPlatformIdResult> asyncResult = null;
yield return client.FindPlatformId(
    new Gs2.Gs2Account.Request.FindPlatformIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithUserIdentifier("123456"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.findPlatformId(
        new Gs2Account.FindPlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.find_platform_id(
        account.FindPlatformIdRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_user_identifier('123456')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.find_platform_id({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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('account')

api_result_handler = client.find_platform_id_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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;

findPlatformIdByUserId

GS2-Account 사용자ID를 지정하여 외부 플랫폼의 계정ID를 취득

네임스페이스 설정에서 “로그인에 사용하는 사용자ID와 데이터 보유에 사용하는 사용자ID를 다르게 설정"을 활성화한 경우에는 데이터 오너ID를 취득할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자GS2-Account 사용자 ID
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring
~ 1024자외부 플랫폼 사용자 ID
외부 플랫폼에서의 사용자 고유 식별자(예: 소셜 미디어의 사용자 ID나 이메일 주소)입니다. type(슬롯 번호)과 조합하여 특정 플랫폼 계정을 식별하는 데 사용됩니다.
dontResolveDataOwnerbool?false로그인용과 데이터 보유용 사용자ID를 분리하는 경우 데이터 오너ID 해결을 비활성화
네임스페이스 설정에서 “로그인에 사용하는 사용자ID와 데이터 보유에 사용하는 사용자ID를 다르게 설정"을 활성화한 경우에도 데이터 오너ID를 해결하지 않도록 하려면 true를 설정합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPlatformUser외부 플랫폼의 사용자 정보

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.FindPlatformIdByUserId(
    &account.FindPlatformIdByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456"),
        DontResolveDataOwner: 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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\FindPlatformIdByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->findPlatformIdByUserId(
        (new FindPlatformIdByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withType(0)
            ->withUserIdentifier("123456")
            ->withDontResolveDataOwner(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.FindPlatformIdByUserIdRequest;
import io.gs2.account.result.FindPlatformIdByUserIdResult;

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

try {
    FindPlatformIdByUserIdResult result = client.findPlatformIdByUserId(
        new FindPlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withType(0)
            .withUserIdentifier("123456")
            .withDontResolveDataOwner(null)
            .withTimeOffsetToken(null)
    );
    PlatformUser 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.FindPlatformIdByUserIdResult> asyncResult = null;
yield return client.FindPlatformIdByUserId(
    new Gs2.Gs2Account.Request.FindPlatformIdByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithType(0)
        .WithUserIdentifier("123456")
        .WithDontResolveDataOwner(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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.findPlatformIdByUserId(
        new Gs2Account.FindPlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withType(0)
            .withUserIdentifier("123456")
            .withDontResolveDataOwner(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.find_platform_id_by_user_id(
        account.FindPlatformIdByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_type(0)
            .with_user_identifier('123456')
            .with_dont_resolve_data_owner(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.find_platform_id_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    type=0,
    userIdentifier="123456",
    dontResolveDataOwner=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('account')

api_result_handler = client.find_platform_id_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    type=0,
    userIdentifier="123456",
    dontResolveDataOwner=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;

deletePlatformId

외부 플랫폼의 계정ID를 삭제

현재 로그인 중인 게임 플레이어 계정에서, 지정된 타입의 외부 플랫폼 계정ID를 삭제합니다.
삭제 후, GS2 계정과 플랫폼상의 ID 간의 연결이 해제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring~ 1024자외부 플랫폼의 사용자ID

Result

타입설명
itemPlatformId삭제한 외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeletePlatformId(
    &account.DeletePlatformIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeletePlatformIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deletePlatformId(
        (new DeletePlatformIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withType(0)
            ->withUserIdentifier("123456")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeletePlatformIdRequest;
import io.gs2.account.result.DeletePlatformIdResult;

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

try {
    DeletePlatformIdResult result = client.deletePlatformId(
        new DeletePlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeletePlatformIdResult> asyncResult = null;
yield return client.DeletePlatformId(
    new Gs2.Gs2Account.Request.DeletePlatformIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithType(0)
        .WithUserIdentifier("123456"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deletePlatformId(
        new Gs2Account.DeletePlatformIdRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withType(0)
            .withUserIdentifier("123456")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_platform_id(
        account.DeletePlatformIdRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_type(0)
            .with_user_identifier('123456')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_platform_id({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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('account')

api_result_handler = client.delete_platform_id_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    type=0,
    userIdentifier="123456",
})

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;

deletePlatformIdByUserIdentifier

외부 플랫폼의 사용자ID를 지정하여 외부 플랫폼의 계정ID를 삭제

GS2의 사용자ID가 아닌, 플랫폼 측의 사용자 식별자를 사용하여 외부 플랫폼의 계정ID를 검색하여 삭제합니다.
내부의 GS2 사용자ID를 모르는 경우에도, 외부 플랫폼상의 사용자 식별자로 삭제할 수 있습니다.
삭제 후, GS2 계정과 외부 플랫폼상의 사용자ID 간의 연결이 해제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
userIdentifierstring~ 1024자외부 플랫폼의 사용자ID

Result

타입설명
itemPlatformId삭제한 외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeletePlatformIdByUserIdentifier(
    &account.DeletePlatformIdByUserIdentifierRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
        UserIdentifier: pointy.String("123456789"),
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeletePlatformIdByUserIdentifierRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deletePlatformIdByUserIdentifier(
        (new DeletePlatformIdByUserIdentifierRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
            ->withUserIdentifier("123456789")
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeletePlatformIdByUserIdentifierRequest;
import io.gs2.account.result.DeletePlatformIdByUserIdentifierResult;

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

try {
    DeletePlatformIdByUserIdentifierResult result = client.deletePlatformIdByUserIdentifier(
        new DeletePlatformIdByUserIdentifierRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("123456789")
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeletePlatformIdByUserIdentifierResult> asyncResult = null;
yield return client.DeletePlatformIdByUserIdentifier(
    new Gs2.Gs2Account.Request.DeletePlatformIdByUserIdentifierRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0)
        .WithUserIdentifier("123456789"),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deletePlatformIdByUserIdentifier(
        new Gs2Account.DeletePlatformIdByUserIdentifierRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withUserIdentifier("123456789")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_platform_id_by_user_identifier(
        account.DeletePlatformIdByUserIdentifierRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
            .with_user_identifier('123456789')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_platform_id_by_user_identifier({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="123456789",
})

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('account')

api_result_handler = client.delete_platform_id_by_user_identifier_async({
    namespaceName="namespace-0001",
    type=0,
    userIdentifier="123456789",
})

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;

deletePlatformIdByUserId

GS2-Account 사용자ID를 지정하여 외부 플랫폼의 계정ID를 삭제

GS2 사용자ID를 사용하여, 지정된 게임 플레이어 계정에서 지정된 타입의 외부 플랫폼 계정ID를 삭제합니다.
삭제 후, GS2 계정과 플랫폼상의 ID 간의 연결이 해제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자GS2-Account 사용자 ID
이 외부 플랫폼 계정 ID에 연결된 GS2-Account의 사용자 ID입니다. 외부 플랫폼의 ID와 GS2-Account의 익명 계정을 대응시키는 데 사용됩니다.
typeint
0 ~ 1024슬롯 번호
0에서 1024까지의 범위로 지정되며, 외부 플랫폼의 종류를 식별하는 데 사용합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPlatformId삭제한 외부 플랫폼의 계정ID

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeletePlatformIdByUserId(
    &account.DeletePlatformIdByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeletePlatformIdByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deletePlatformIdByUserId(
        (new DeletePlatformIdByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeletePlatformIdByUserIdRequest;
import io.gs2.account.result.DeletePlatformIdByUserIdResult;

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

try {
    DeletePlatformIdByUserIdResult result = client.deletePlatformIdByUserId(
        new DeletePlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    PlatformId 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeletePlatformIdByUserIdResult> asyncResult = null;
yield return client.DeletePlatformIdByUserId(
    new Gs2.Gs2Account.Request.DeletePlatformIdByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithType(0)
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deletePlatformIdByUserId(
        new Gs2Account.DeletePlatformIdByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withType(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_platform_id_by_user_id(
        account.DeletePlatformIdByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_type(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_platform_id_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    type=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('account')

api_result_handler = client.delete_platform_id_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    type=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;

getDataOwnerByUserId

데이터 오너를 취득

지정된 사용자ID에 연결된 데이터 오너의 정보를 취득하기 위해 사용됩니다.
이 액션은 지정된 네임스페이스 내 특정 계정에 연결된 데이터 오너의 상세 정보를 반환합니다.
데이터 오너 정보에는 데이터 오너ID, 연결된 사용자ID, 그 외 관련 정보가 포함됩니다.

상세

Request

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

Result

타입설명
itemDataOwner데이터 오너

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetDataOwnerByUserId(
    &account.GetDataOwnerByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetDataOwnerByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getDataOwnerByUserId(
        (new GetDataOwnerByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetDataOwnerByUserIdRequest;
import io.gs2.account.result.GetDataOwnerByUserIdResult;

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

try {
    GetDataOwnerByUserIdResult result = client.getDataOwnerByUserId(
        new GetDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    DataOwner 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetDataOwnerByUserIdResult> asyncResult = null;
yield return client.GetDataOwnerByUserId(
    new Gs2.Gs2Account.Request.GetDataOwnerByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getDataOwnerByUserId(
        new Gs2Account.GetDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_data_owner_by_user_id(
        account.GetDataOwnerByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_data_owner_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-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('account')

api_result_handler = client.get_data_owner_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-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;

updateDataOwnerByUserId

데이터 오너ID를 임의의 값으로 갱신

지정된 사용자ID에 연결된 데이터 오너 이름을 갱신합니다.
데이터 오너는, 네임스페이스 설정에서 「로그인에 사용하는 사용자ID와 데이터 보존에 사용하는 사용자ID를 다르게 지정」이 활성화되어 있는 경우, 로그인용 사용자ID와 데이터 보존용 사용자ID의 매핑을 관리하기 위해 사용됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
UUID~ 128자사용자ID
dataOwnerNamestring
UUID~ 36자데이터 오너 ID
데이터 오너의 고유 식별자로서 기능합니다.
데이터 오너 ID는 데이터의 실제 소유자를 나타내며, 사용자 ID와는 다를 수 있습니다.
이 ID는 시스템에 의해 자동으로 생성되며, 각 데이터 오너에 대해 고유합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemDataOwner데이터 오너

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateDataOwnerByUserId(
    &account.UpdateDataOwnerByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-0001"),
        DataOwnerName: pointy.String("data-owner-1001"),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateDataOwnerByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateDataOwnerByUserId(
        (new UpdateDataOwnerByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-0001")
            ->withDataOwnerName("data-owner-1001")
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateDataOwnerByUserIdRequest;
import io.gs2.account.result.UpdateDataOwnerByUserIdResult;

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

try {
    UpdateDataOwnerByUserIdResult result = client.updateDataOwnerByUserId(
        new UpdateDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withDataOwnerName("data-owner-1001")
            .withTimeOffsetToken(null)
    );
    DataOwner 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateDataOwnerByUserIdResult> asyncResult = null;
yield return client.UpdateDataOwnerByUserId(
    new Gs2.Gs2Account.Request.UpdateDataOwnerByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-0001")
        .WithDataOwnerName("data-owner-1001")
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateDataOwnerByUserId(
        new Gs2Account.UpdateDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withDataOwnerName("data-owner-1001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_data_owner_by_user_id(
        account.UpdateDataOwnerByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_data_owner_name('data-owner-1001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_data_owner_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-0001",
    dataOwnerName="data-owner-1001",
    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('account')

api_result_handler = client.update_data_owner_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-0001",
    dataOwnerName="data-owner-1001",
    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;

deleteDataOwnerByUserId

데이터 오너를 삭제

특정 사용자ID에 연결된 데이터 오너의 정보를 삭제하기 위해 사용됩니다.
이 액션은 지정된 네임스페이스 내 계정에 연결된 데이터 오너를 시스템에서 완전히 삭제합니다.
사용자ID와 데이터 오너ID의 연결이 사라지며, GS2 가 관리하는 사용자 데이터에 사용자ID가 포함되어 있지 않은 한 누구의 데이터인지 알 수 없는 상태가 됩니다.

상세

Request

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

Result

타입설명
itemDataOwner삭제한 데이터 오너

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteDataOwnerByUserId(
    &account.DeleteDataOwnerByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("userId-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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteDataOwnerByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteDataOwnerByUserId(
        (new DeleteDataOwnerByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("userId-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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteDataOwnerByUserIdRequest;
import io.gs2.account.result.DeleteDataOwnerByUserIdResult;

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

try {
    DeleteDataOwnerByUserIdResult result = client.deleteDataOwnerByUserId(
        new DeleteDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    DataOwner 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteDataOwnerByUserIdResult> asyncResult = null;
yield return client.DeleteDataOwnerByUserId(
    new Gs2.Gs2Account.Request.DeleteDataOwnerByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("userId-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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteDataOwnerByUserId(
        new Gs2Account.DeleteDataOwnerByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("userId-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_data_owner_by_user_id(
        account.DeleteDataOwnerByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('userId-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_data_owner_by_user_id({
    namespaceName="namespace-0001",
    userId="userId-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('account')

api_result_handler = client.delete_data_owner_by_user_id_async({
    namespaceName="namespace-0001",
    userId="userId-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;

describeTakeOverTypeModels

인계 정보 타입 모델의 목록을 취득

지정된 네임스페이스에서 현재 활성화되어 있는 모든 인계 정보 타입 모델을 취득합니다.
인계 정보 타입 모델은 이메일/비밀번호 기반이나 OpenID Connect 기반의 인계 등, 이용 가능한 계정 인계 방법의 종류를 정의합니다.
각 타입 모델에는 ID 프로바이더의 OpenID Connect 설정 등이 포함됩니다.
마스터 버전과는 달리, 활성화(공개)된 모델만을 반환하며 페이지네이션은 없습니다.

상세

Request

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

Result

타입설명
itemsList<TakeOverTypeModel>인계 정보 타입 모델의 목록

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeTakeOverTypeModels(
    &account.DescribeTakeOverTypeModelsRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeTakeOverTypeModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeTakeOverTypeModels(
        (new DescribeTakeOverTypeModelsRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeTakeOverTypeModelsRequest;
import io.gs2.account.result.DescribeTakeOverTypeModelsResult;

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

try {
    DescribeTakeOverTypeModelsResult result = client.describeTakeOverTypeModels(
        new DescribeTakeOverTypeModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<TakeOverTypeModel> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeTakeOverTypeModelsResult> asyncResult = null;
yield return client.DescribeTakeOverTypeModels(
    new Gs2.Gs2Account.Request.DescribeTakeOverTypeModelsRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeTakeOverTypeModels(
        new Gs2Account.DescribeTakeOverTypeModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.describe_take_over_type_models(
        account.DescribeTakeOverTypeModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.describe_take_over_type_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('account')

api_result_handler = client.describe_take_over_type_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;

getTakeOverTypeModel

인계 정보 타입 모델을 취득

지정된 네임스페이스에서 지정된 타입의, 현재 유효한 인계 정보 타입 모델을 취득합니다.
타입 모델에는 이 인계 타입에 연결된 ID 프로바이더의 OpenID Connect 설정 및 기타 설정이 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
itemTakeOverTypeModel인계 정보 타입 모델

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetTakeOverTypeModel(
    &account.GetTakeOverTypeModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetTakeOverTypeModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getTakeOverTypeModel(
        (new GetTakeOverTypeModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetTakeOverTypeModelRequest;
import io.gs2.account.result.GetTakeOverTypeModelResult;

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

try {
    GetTakeOverTypeModelResult result = client.getTakeOverTypeModel(
        new GetTakeOverTypeModelRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    TakeOverTypeModel 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetTakeOverTypeModelResult> asyncResult = null;
yield return client.GetTakeOverTypeModel(
    new Gs2.Gs2Account.Request.GetTakeOverTypeModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getTakeOverTypeModel(
        new Gs2Account.GetTakeOverTypeModelRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_take_over_type_model(
        account.GetTakeOverTypeModelRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_take_over_type_model({
    namespaceName="namespace-0001",
    type=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('account')

api_result_handler = client.get_take_over_type_model_async({
    namespaceName="namespace-0001",
    type=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;

exportMaster

인계 정보 타입 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기

현재의 인계 정보 타입 모델 마스터 데이터를 활성화에 사용할 수 있는 형식으로 내보냅니다.
내보낸 데이터는 현재 마스터 구성의 백업이나 다른 네임스페이스로의 가져오기에 사용할 수 있습니다.

상세

Request

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

Result

타입설명
itemCurrentModelMaster활성화 가능한 인계 정보 타입 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\ExportMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.ExportMasterRequest;
import io.gs2.account.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.exportMaster(
        new Gs2Account.ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.export_master(
        account.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

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('account')

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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetCurrentModelMaster(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetCurrentModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetCurrentModelMasterRequest;
import io.gs2.account.result.GetCurrentModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetCurrentModelMasterResult> asyncResult = null;
yield return client.GetCurrentModelMaster(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getCurrentModelMaster(
        new Gs2Account.GetCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_current_model_master(
        account.GetCurrentModelMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

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('account')

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를 preUpload 모드로, 업로드에 사용한 토큰을 전달하여 실행하고 마스터 데이터를 반영합니다.
상세

Request

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

Result

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

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentModelMaster(
    &account.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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\PreUpdateCurrentModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.PreUpdateCurrentModelMasterRequest;
import io.gs2.account.result.PreUpdateCurrentModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2AccountRestClient client = new Gs2AccountRestClient(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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.PreUpdateCurrentModelMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentModelMaster(
    new Gs2.Gs2Account.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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.preUpdateCurrentModelMaster(
        new Gs2Account.PreUpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.pre_update_current_model_master(
        account.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('account')

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('account')

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

현재 활성화된 인계 정보 타입 모델의 마스터 데이터를 갱신

지정된 네임스페이스의 인계 정보 타입 모델의 마스터 데이터를 갱신하고 활성화(공개)합니다.
‘direct’ 모드(인라인 마스터 데이터용)와 ‘preUpload’ 모드(사전에 업로드된 마스터 데이터용)의 두 가지 모드를 지원합니다.
1MB를 초과하는 마스터 데이터의 경우에는 3단계의 갱신 흐름(PreUpdate -> 업로드 -> Update(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/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentModelMaster(
    &account.UpdateCurrentModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}"),
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateCurrentModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentModelMaster(
        (new UpdateCurrentModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}")
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateCurrentModelMasterRequest;
import io.gs2.account.result.UpdateCurrentModelMasterResult;

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

try {
    UpdateCurrentModelMasterResult result = client.updateCurrentModelMaster(
        new UpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}")
            .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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateCurrentModelMasterResult> asyncResult = null;
yield return client.UpdateCurrentModelMaster(
    new Gs2.Gs2Account.Request.UpdateCurrentModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}")
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateCurrentModelMaster(
        new Gs2Account.UpdateCurrentModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_current_model_master(
        account.UpdateCurrentModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{"version": "2024-07-30", "takeOverTypeModels": [{"type": 0, "metadata": "Google", "openIdConnectSetting": {"configurationPath": "https://accounts.google.com/.well-known/openid-configuration", "clientId": "695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com", "clientSecret": "secret"}}, {"type": 1, "metadata": "Apple", "openIdConnectSetting": {"configurationPath": "https://appleid.apple.com/.well-known/openid-configuration", "clientId": "io.gs2.sample.auth", "appleTeamId": "9LX9LA85H8", "appleKeyId": "P937MLY6Z7", "applePrivateKeyPem": "-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----"}}]}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_current_model_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}",
    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('account')

api_result_handler = client.update_current_model_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2024-07-30\", \"takeOverTypeModels\": [{\"type\": 0, \"metadata\": \"Google\", \"openIdConnectSetting\": {\"configurationPath\": \"https://accounts.google.com/.well-known/openid-configuration\", \"clientId\": \"695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com\", \"clientSecret\": \"secret\"}}, {\"type\": 1, \"metadata\": \"Apple\", \"openIdConnectSetting\": {\"configurationPath\": \"https://appleid.apple.com/.well-known/openid-configuration\", \"clientId\": \"io.gs2.sample.auth\", \"appleTeamId\": \"9LX9LA85H8\", \"appleKeyId\": \"P937MLY6Z7\", \"applePrivateKeyPem\": \"-----BEGIN PRIVATE KEY-----\\\\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\n-----END PRIVATE KEY-----\"}}]}",
    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 리포지토리에서 직접 마스터 데이터를 취득하여 갱신·활성화(공개)합니다.
체크아웃 설정에는 사용할 리포지토리, 브랜치/태그, 파일 경로를 지정합니다.
마스터 데이터를 버전 관리로 관리하고 직접 배포하는 경우에 유용합니다.

상세

Request

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

Result

타입설명
itemCurrentModelMaster갱신된 현재 활성화된 인계 정보 타입 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentModelMasterFromGitHub(
    &account.UpdateCurrentModelMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &account.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("apiKeyId-0001"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateCurrentModelMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentModelMasterFromGitHub(
        (new UpdateCurrentModelMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateCurrentModelMasterFromGitHubRequest;
import io.gs2.account.result.UpdateCurrentModelMasterFromGitHubResult;

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

try {
    UpdateCurrentModelMasterFromGitHubResult result = client.updateCurrentModelMasterFromGitHub(
        new UpdateCurrentModelMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateCurrentModelMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentModelMasterFromGitHub(
    new Gs2.Gs2Account.Request.UpdateCurrentModelMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Account.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateCurrentModelMasterFromGitHub(
        new Gs2Account.UpdateCurrentModelMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Account.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_current_model_master_from_git_hub(
        account.UpdateCurrentModelMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(account.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_current_model_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

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('account')

api_result_handler = client.update_current_model_master_from_git_hub_async({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

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;

describeTakeOverTypeModelMasters

인계 정보 타입 모델 마스터의 목록을 취득

지정된 네임스페이스의 인계 정보 타입 모델 마스터의 페이지네이션이 적용된 목록을 취득합니다.
인계 정보 타입 모델 마스터는 이용 가능한 계정 인계 방법의 종류를 정의하는 인계 정보 타입 모델의 편집 가능한 버전입니다.
마스터 데이터에 대한 변경은 현재 모델 마스터를 통해 활성화(공개)될 때까지 반영되지 않습니다.

상세

Request

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

Result

타입설명
itemsList<TakeOverTypeModelMaster>인계 정보 타입 모델 마스터의 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DescribeTakeOverTypeModelMasters(
    &account.DescribeTakeOverTypeModelMastersRequest {
        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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DescribeTakeOverTypeModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeTakeOverTypeModelMasters(
        (new DescribeTakeOverTypeModelMastersRequest())
            ->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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DescribeTakeOverTypeModelMastersRequest;
import io.gs2.account.result.DescribeTakeOverTypeModelMastersResult;

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

try {
    DescribeTakeOverTypeModelMastersResult result = client.describeTakeOverTypeModelMasters(
        new DescribeTakeOverTypeModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<TakeOverTypeModelMaster> 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DescribeTakeOverTypeModelMastersResult> asyncResult = null;
yield return client.DescribeTakeOverTypeModelMasters(
    new Gs2.Gs2Account.Request.DescribeTakeOverTypeModelMastersRequest()
        .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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.describeTakeOverTypeModelMasters(
        new Gs2Account.DescribeTakeOverTypeModelMastersRequest()
            .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 account

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

try:
    result = client.describe_take_over_type_model_masters(
        account.DescribeTakeOverTypeModelMastersRequest()
            .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('account')

api_result = client.describe_take_over_type_model_masters({
    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('account')

api_result_handler = client.describe_take_over_type_model_masters_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;

createTakeOverTypeModelMaster

인계 정보 타입 모델 마스터를 신규 생성

계정 인계 방법의 종류를 정의하는 새로운 인계 정보 타입 모델 마스터를 생성합니다.
타입 슬롯(숫자), 설명, 메타데이터, ID 프로바이더의 OpenID Connect 설정을 구성할 수 있습니다.
OpenID Connect 설정에는 ID 프로바이더 연동에 필요한 클라이언트ID, 클라이언트 시크릿, 이슈어, 기타 OIDC 설정이 포함됩니다.
변경 사항은 현재 모델 마스터를 통해 활성화(공개)될 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
openIdConnectSettingOpenIdConnectSetting
OpenID Connect 설정
OpenID Connect 준수 Identity Provider(IdP)와 연동하기 위한 설정입니다. 디스커버리 URL, 클라이언트 인증 정보, Apple Sign In 파라미터 등 플랫폼별 설정이 포함됩니다.

Result

타입설명
itemTakeOverTypeModelMaster생성한 인계 정보 타입 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.CreateTakeOverTypeModelMaster(
    &account.CreateTakeOverTypeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
        Description: nil,
        Metadata: pointy.String("Google"),
        OpenIdConnectSetting: &account.OpenIdConnectSetting{
            ConfigurationPath: pointy.String("https://accounts.google.com/.well-known/openid-configuration"),
            ClientId: pointy.String("695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com"),
            ClientSecret: pointy.String("secret"),
        },
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\CreateTakeOverTypeModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createTakeOverTypeModelMaster(
        (new CreateTakeOverTypeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
            ->withDescription(null)
            ->withMetadata("Google")
            ->withOpenIdConnectSetting((new \Gs2\Account\Model\OpenIdConnectSetting())
                ->withConfigurationPath("https://accounts.google.com/.well-known/openid-configuration")
                ->withClientId("695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com")
                ->withClientSecret("secret"))
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.CreateTakeOverTypeModelMasterRequest;
import io.gs2.account.result.CreateTakeOverTypeModelMasterResult;

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

try {
    CreateTakeOverTypeModelMasterResult result = client.createTakeOverTypeModelMaster(
        new CreateTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withDescription(null)
            .withMetadata("Google")
            .withOpenIdConnectSetting(new io.gs2.account.model.OpenIdConnectSetting()
                .withConfigurationPath("https://accounts.google.com/.well-known/openid-configuration")
                .withClientId("695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com")
                .withClientSecret("secret"))
    );
    TakeOverTypeModelMaster 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.CreateTakeOverTypeModelMasterResult> asyncResult = null;
yield return client.CreateTakeOverTypeModelMaster(
    new Gs2.Gs2Account.Request.CreateTakeOverTypeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0)
        .WithDescription(null)
        .WithMetadata("Google")
        .WithOpenIdConnectSetting(new Gs2.Gs2Account.Model.OpenIdConnectSetting()
            .WithConfigurationPath("https://accounts.google.com/.well-known/openid-configuration")
            .WithClientId("695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com")
            .WithClientSecret("secret")),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.createTakeOverTypeModelMaster(
        new Gs2Account.CreateTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withDescription(null)
            .withMetadata("Google")
            .withOpenIdConnectSetting(new Gs2Account.model.OpenIdConnectSetting()
                .withConfigurationPath("https://accounts.google.com/.well-known/openid-configuration")
                .withClientId("695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com")
                .withClientSecret("secret"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.create_take_over_type_model_master(
        account.CreateTakeOverTypeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
            .with_description(None)
            .with_metadata('Google')
            .with_open_id_connect_setting(
                account.OpenIdConnectSetting()
                    .with_configuration_path('https://accounts.google.com/.well-known/openid-configuration')
                    .with_client_id('695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com')
                    .with_client_secret('secret'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.create_take_over_type_model_master({
    namespaceName="namespace-0001",
    type=0,
    description=nil,
    metadata="Google",
    openIdConnectSetting={
        configurationPath="https://accounts.google.com/.well-known/openid-configuration",
        clientId="695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com",
        clientSecret="secret",
    },
})

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('account')

api_result_handler = client.create_take_over_type_model_master_async({
    namespaceName="namespace-0001",
    type=0,
    description=nil,
    metadata="Google",
    openIdConnectSetting={
        configurationPath="https://accounts.google.com/.well-known/openid-configuration",
        clientId="695893071400-qelt0dsu8tkotl13psnq5d1ko7kki4sl.apps.googleusercontent.com",
        clientSecret="secret",
    },
})

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;

getTakeOverTypeModelMaster

인계 정보 타입 모델 마스터를 취득

지정된 네임스페이스에서 타입을 지정하여 특정 인계 정보 타입 모델 마스터를 취득합니다.
취득되는 정보에는 타입 슬롯, 설명, 메타데이터, OpenID Connect 설정이 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
itemTakeOverTypeModelMaster인계 정보 타입 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.GetTakeOverTypeModelMaster(
    &account.GetTakeOverTypeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\GetTakeOverTypeModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getTakeOverTypeModelMaster(
        (new GetTakeOverTypeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.GetTakeOverTypeModelMasterRequest;
import io.gs2.account.result.GetTakeOverTypeModelMasterResult;

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

try {
    GetTakeOverTypeModelMasterResult result = client.getTakeOverTypeModelMaster(
        new GetTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    TakeOverTypeModelMaster 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.GetTakeOverTypeModelMasterResult> asyncResult = null;
yield return client.GetTakeOverTypeModelMaster(
    new Gs2.Gs2Account.Request.GetTakeOverTypeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.getTakeOverTypeModelMaster(
        new Gs2Account.GetTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.get_take_over_type_model_master(
        account.GetTakeOverTypeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.get_take_over_type_model_master({
    namespaceName="namespace-0001",
    type=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('account')

api_result_handler = client.get_take_over_type_model_master_async({
    namespaceName="namespace-0001",
    type=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;

updateTakeOverTypeModelMaster

인계 정보 타입 모델 마스터 데이터를 갱신

지정된 인계 정보 타입 모델 마스터를 갱신합니다.
설명, 메타데이터, ID 프로바이더의 OpenID Connect 설정을 변경할 수 있습니다.
변경 사항은 현재 모델 마스터를 통해 활성화(공개)될 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
openIdConnectSettingOpenIdConnectSetting
OpenID Connect 설정
OpenID Connect 준수 Identity Provider(IdP)와 연동하기 위한 설정입니다. 디스커버리 URL, 클라이언트 인증 정보, Apple Sign In 파라미터 등 플랫폼별 설정이 포함됩니다.

Result

타입설명
itemTakeOverTypeModelMaster갱신한 인계 정보 타입 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.UpdateTakeOverTypeModelMaster(
    &account.UpdateTakeOverTypeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(0),
        Description: pointy.String("description1"),
        Metadata: pointy.String("Microsoft"),
        OpenIdConnectSetting: &account.OpenIdConnectSetting{
            ConfigurationPath: pointy.String("https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration"),
            ClientId: pointy.String("io.gs2.sample.auth"),
            ClientSecret: pointy.String("secret"),
        },
    }
)
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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\UpdateTakeOverTypeModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateTakeOverTypeModelMaster(
        (new UpdateTakeOverTypeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(0)
            ->withDescription("description1")
            ->withMetadata("Microsoft")
            ->withOpenIdConnectSetting((new \Gs2\Account\Model\OpenIdConnectSetting())
                ->withConfigurationPath("https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration")
                ->withClientId("io.gs2.sample.auth")
                ->withClientSecret("secret"))
    );
    $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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.UpdateTakeOverTypeModelMasterRequest;
import io.gs2.account.result.UpdateTakeOverTypeModelMasterResult;

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

try {
    UpdateTakeOverTypeModelMasterResult result = client.updateTakeOverTypeModelMaster(
        new UpdateTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withDescription("description1")
            .withMetadata("Microsoft")
            .withOpenIdConnectSetting(new io.gs2.account.model.OpenIdConnectSetting()
                .withConfigurationPath("https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration")
                .withClientId("io.gs2.sample.auth")
                .withClientSecret("secret"))
    );
    TakeOverTypeModelMaster 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.UpdateTakeOverTypeModelMasterResult> asyncResult = null;
yield return client.UpdateTakeOverTypeModelMaster(
    new Gs2.Gs2Account.Request.UpdateTakeOverTypeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0)
        .WithDescription("description1")
        .WithMetadata("Microsoft")
        .WithOpenIdConnectSetting(new Gs2.Gs2Account.Model.OpenIdConnectSetting()
            .WithConfigurationPath("https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration")
            .WithClientId("io.gs2.sample.auth")
            .WithClientSecret("secret")),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.updateTakeOverTypeModelMaster(
        new Gs2Account.UpdateTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
            .withDescription("description1")
            .withMetadata("Microsoft")
            .withOpenIdConnectSetting(new Gs2Account.model.OpenIdConnectSetting()
                .withConfigurationPath("https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration")
                .withClientId("io.gs2.sample.auth")
                .withClientSecret("secret"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.update_take_over_type_model_master(
        account.UpdateTakeOverTypeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
            .with_description('description1')
            .with_metadata('Microsoft')
            .with_open_id_connect_setting(
                account.OpenIdConnectSetting()
                    .with_configuration_path('https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration')
                    .with_client_id('io.gs2.sample.auth')
                    .with_client_secret('secret'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.update_take_over_type_model_master({
    namespaceName="namespace-0001",
    type=0,
    description="description1",
    metadata="Microsoft",
    openIdConnectSetting={
        configurationPath="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
        clientId="io.gs2.sample.auth",
        clientSecret="secret",
    },
})

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('account')

api_result_handler = client.update_take_over_type_model_master_async({
    namespaceName="namespace-0001",
    type=0,
    description="description1",
    metadata="Microsoft",
    openIdConnectSetting={
        configurationPath="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
        clientId="io.gs2.sample.auth",
        clientSecret="secret",
    },
})

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;

deleteTakeOverTypeModelMaster

인계 정보 타입 모델 마스터 데이터를 삭제

지정된 네임스페이스에서 지정된 인계 정보 타입 모델 마스터를 삭제합니다.
삭제 후, 다음 마스터 데이터 활성화 이후부터 이 인계 타입은 이용할 수 없게 됩니다.
이 작업은 마스터 데이터에만 영향을 미치며, 마스터 데이터가 재활성화될 때까지 현재 유효한 모델은 변경되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
typeint
0 ~ 1024슬롯 번호
0부터 1024까지의 범위로 지정되며, 서로 다른 인계 정보를 구분합니다.

Result

타입설명
itemTakeOverTypeModelMaster삭제한 인계 정보 타입 모델 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/account"
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 := account.Gs2AccountRestClient{
    Session: &session,
}
result, err := client.DeleteTakeOverTypeModelMaster(
    &account.DeleteTakeOverTypeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Type: pointy.Int32(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\Account\Gs2AccountRestClient;
use Gs2\Account\Request\DeleteTakeOverTypeModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteTakeOverTypeModelMaster(
        (new DeleteTakeOverTypeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withType(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.account.rest.Gs2AccountRestClient;
import io.gs2.account.request.DeleteTakeOverTypeModelMasterRequest;
import io.gs2.account.result.DeleteTakeOverTypeModelMasterResult;

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

try {
    DeleteTakeOverTypeModelMasterResult result = client.deleteTakeOverTypeModelMaster(
        new DeleteTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    TakeOverTypeModelMaster 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 Gs2AccountRestClient(session);

AsyncResult<Gs2.Gs2Account.Result.DeleteTakeOverTypeModelMasterResult> asyncResult = null;
yield return client.DeleteTakeOverTypeModelMaster(
    new Gs2.Gs2Account.Request.DeleteTakeOverTypeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithType(0),
    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 Gs2Account from '@/gs2/account';

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

try {
    const result = await client.deleteTakeOverTypeModelMaster(
        new Gs2Account.DeleteTakeOverTypeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withType(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import account

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

try:
    result = client.delete_take_over_type_model_master(
        account.DeleteTakeOverTypeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_type(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('account')

api_result = client.delete_take_over_type_model_master({
    namespaceName="namespace-0001",
    type=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('account')

api_result_handler = client.delete_take_over_type_model_master_async({
    namespaceName="namespace-0001",
    type=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;