GS2-Guild SDK API 레퍼런스
모델
Namespace
네임스페이스
네임스페이스는 하나의 프로젝트 내에서 동일한 서비스를 서로 다른 용도로 여러 개 이용하기 위한 엔티티입니다.
GS2의 각 서비스는 네임스페이스 단위로 관리됩니다. 네임스페이스가 다르면 동일한 서비스라도 완전히 독립된 데이터 공간으로 취급됩니다.
따라서 각 서비스의 이용을 시작하려면 먼저 네임스페이스를 생성해야 합니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceId | string | ※ | ~ 1024자 | 네임스페이스 GRN
※ 서버가 자동으로 설정 | ||
| name | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| transactionSetting | TransactionSetting | 트랜잭션 설정 길드 조작 시 분산 트랜잭션의 실행 방식을 제어하는 설정입니다. 자동 실행, 원자적 커밋, 비동기 처리 등의 옵션을 지원합니다. | ||||
| changeNotification | NotificationSetting | 길드 변경 통지 길드 정보(표시 이름, 속성, 가입 정책 등)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 멤버가 길드의 변경 사항에 대해 실시간으로 알림을 받을 수 있습니다. | ||||
| joinNotification | NotificationSetting | 멤버 가입 통지 새로운 멤버가 길드에 가입했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자유 가입 및 참가 신청 승인 양쪽 모두에 대응합니다. 기존 멤버가 신규 가입을 통지받을 수 있게 됩니다. | ||||
| leaveNotification | NotificationSetting | 멤버 탈퇴 통지 멤버가 길드에서 탈퇴하거나 제명되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자발적인 탈퇴와 길드 마스터에 의한 추방 양쪽 모두에 대응합니다. | ||||
| changeMemberNotification | NotificationSetting | 멤버 변경 통지 길드 멤버의 정보(롤, 메타데이터)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 메타데이터 변경으로 이 통지가 발생할지 여부는 changeMemberNotificationIgnoreChangeMetadata로 제어할 수 있습니다. | ||||
| changeMemberNotificationIgnoreChangeMetadata | bool? | false | 멤버의 정보가 갱신되었을 때 통지를 발행할 때 메타데이터 변경을 무시할지 여부 | |||
| receiveRequestNotification | NotificationSetting | 신청 수신 통지 길드가 사용자로부터 새로운 참가 신청을 수신했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 마스터 및 권한을 가진 멤버가 승인이 필요한 보류 신청을 통지받을 수 있게 됩니다. | ||||
| removeRequestNotification | NotificationSetting | 신청 삭제 통지 길드 참가 신청이 삭제되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 발신자에 의한 취소, 길드에 의한 거부, 또는 승인(신청 삭제 및 멤버 추가) 중 하나에 대응합니다. | ||||
| createGuildScript | ScriptSetting | 길드를 생성할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - createGuild | ||||
| updateGuildScript | ScriptSetting | 길드를 갱신할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - updateGuild | ||||
| joinGuildScript | ScriptSetting | 길드에 가입할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - joinGuild | ||||
| receiveJoinRequestScript | ScriptSetting | 길드에 참가 신청을 접수했을 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - receiveJoinRequest | ||||
| leaveGuildScript | ScriptSetting | 길드를 탈퇴할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - leaveGuild | ||||
| changeRoleScript | ScriptSetting | 멤버에게 할당된 롤을 변경할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - changeRole | ||||
| deleteGuildScript | ScriptSetting | 길드를 삭제할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - deleteGuild | ||||
| logSetting | LogSetting | 로그 출력 설정 길드 조작의 로그 데이터를 GS2-Log 로 출력하기 위한 설정입니다. GS2-Log 의 네임스페이스를 지정하면 길드 생성, 참가, 탈퇴, 역할 변경의 API 요청·응답 로그를 수집할 수 있습니다. | ||||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||
| updatedAt | long | ※ | 현재 시각 | 최종 갱신일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | 리비전 |
TransactionSetting
트랜잭션 설정
트랜잭션 설정은 트랜잭션의 실행 방법·정합성·비동기 처리·충돌 회피 메커니즘을 제어하는 설정입니다.
자동 실행(AutoRun), 원자적 실행(AtomicCommit), GS2-Distributor를 이용한 비동기 실행, 스크립트 결과의 일괄 적용, GS2-JobQueue를 통한 입수 액션의 비동기화 등을 조합하여 게임 로직에 맞는 견고한 트랜잭션 관리를 가능하게 합니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| enableAutoRun | bool | false | 발행한 트랜잭션을 서버 사이드에서 자동으로 실행할지 여부 | |||
| enableAtomicCommit | bool | {enableAutoRun} == true | false | 트랜잭션의 실행을 원자적으로 커밋할지 여부 ※ enableAutoRun이(가) true 이면 활성화 | ||
| transactionUseDistributor | bool | {enableAtomicCommit} == true | false | 트랜잭션을 비동기 처리로 실행할지 여부 ※ enableAtomicCommit이(가) true 이면 활성화 | ||
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true | false | 스크립트의 결과 커밋 처리를 비동기 처리로 실행할지 여부 ※ transactionUseDistributor이(가) true 이면 활성화 | ||
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true | false | 입수 액션을 실행할 때 GS2-JobQueue를 사용할지 여부 ※ enableAtomicCommit이(가) true 이면 활성화 | ||
| distributorNamespaceId | string | “grn:gs2:{region}:{ownerId}:distributor:default” | ~ 1024자 | 트랜잭션 실행에 사용하는 GS2-Distributor 네임스페이스 GRN | ||
| queueNamespaceId | string | “grn:gs2:{region}:{ownerId}:queue:default” | ~ 1024자 | 트랜잭션 실행에 사용하는 GS2-JobQueue의 네임스페이스 GRN |
ScriptSetting
스크립트 설정
GS2에서는 마이크로서비스의 이벤트에 연결하여 커스텀 스크립트를 실행할 수 있습니다.
이 모델은 스크립트 실행을 트리거하기 위한 설정을 보유합니다.
스크립트 실행 방식은 크게 두 가지로, 바로 “동기 실행"과 “비동기 실행"입니다.
동기 실행은 스크립트 실행이 완료될 때까지 처리가 블록됩니다.
대신 스크립트 실행 결과를 이용하여 API 실행을 중단시키거나 API 응답 내용을 제어할 수 있습니다.
한편, 비동기 실행에서는 스크립트 완료를 기다리기 위해 처리가 블록되는 일이 없습니다.
다만 스크립트 실행 결과를 이용하여 API 실행을 중단하거나 API 응답 내용을 변경할 수는 없습니다.
비동기 실행은 API의 응답 흐름에 영향을 주지 않으므로 원칙적으로 비동기 실행을 권장합니다.
비동기 실행에는 실행 방식이 두 가지 있으며, GS2-Script와 Amazon EventBridge가 있습니다.
Amazon EventBridge를 사용함으로써 Lua 이외의 언어로 처리를 작성할 수 있습니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| triggerScriptId | string | ~ 1024자 | API 실행 시 동기적으로 실행되는 GS2-Script의 스크립트
GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다. | |||||||||||
| doneTriggerTargetType | 문자열 열거형 enum { “none”, “gs2_script”, “aws” } | “none” | 비동기 스크립트의 실행 방법 비동기 실행에서 사용할 스크립트의 종류를 지정합니다. “비동기 실행의 스크립트를 사용하지 않음(none)”, “GS2-Script를 사용함(gs2_script)”, “Amazon EventBridge를 사용함(aws)” 중에서 선택할 수 있습니다.
| |||||||||||
| doneTriggerScriptId | string | {doneTriggerTargetType} == “gs2_script” | ~ 1024자 | 비동기 실행할 GS2-Script 스크립트
GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다. ※ doneTriggerTargetType이(가) “gs2_script” 이면 활성화 | ||||||||||
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == “gs2_script” | ~ 1024자 | 비동기 실행 스크립트를 실행하는 GS2-JobQueue 네임스페이스
GRN
비동기 실행 스크립트를 직접 실행하지 않고 GS2-JobQueue를 경유하는 경우 GS2-JobQueue의 네임스페이스GRN을 지정합니다. GS2-JobQueue를 이용해야 할 이유는 많지 않으므로, 특별한 이유가 없다면 지정할 필요는 없습니다. ※ doneTriggerTargetType이(가) “gs2_script” 이면 활성화 |
NotificationSetting
푸시 통지에 관한 설정
GS2의 마이크로서비스 내에서 어떠한 이벤트가 발생했을 때, 푸시 통지를 전송하기 위한 설정입니다.
여기서 말하는 푸시 통지란 GS2-Gateway가 제공하는 WebSocket 인터페이스를 경유하는 처리이며, 스마트폰의 푸시 통지와는 성질이 다릅니다.
예를 들어 매치메이킹이 완료되었을 때나 친구 요청이 도착했을 때 등, 게임 클라이언트의 조작과는 관계없이 상태가 변화했을 때 GS2-Gateway를 경유하여 푸시 통지를 함으로써, 게임 클라이언트는 상태 변화를 감지할 수 있습니다.
GS2-Gateway의 푸시 통지는 통지 대상 디바이스가 오프라인이었을 때 추가 처리로 모바일 푸시 통지를 전송할 수 있습니다.
모바일 푸시 통지를 잘 활용하면, 매치메이킹 중에 게임을 종료하더라도 모바일 푸시 통지를 사용하여 플레이어에게 알리고, 게임으로 복귀하도록 하는 흐름을 구현할 수 있을 가능성이 있습니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gatewayNamespaceId | string | “grn:gs2:{region}:{ownerId}:gateway:default” | ~ 1024자 | 푸시 통지에 사용할 GS2-Gateway의 네임스페이스 “grn:gs2:“로 시작하는 GRN 형식으로 GS2-Gateway의 네임스페이스 ID를 지정합니다. | ||||||||
| enableTransferMobileNotification | bool? | false | 모바일 푸시 통지로 전달할지 여부 이 통지를 전송하려 할 때, 통지 대상 디바이스가 오프라인일 경우 모바일 푸시 통지로 전달할지 여부를 지정합니다. | |||||||||
| sound | string | {enableTransferMobileNotification} == true | ~ 1024자 | 모바일 푸시 통지에서 사용할 사운드 파일명 여기서 지정한 사운드 파일명은 모바일 푸시 통지를 전송할 때 사용되며, 특별한 사운드로 통지를 출력할 수 있습니다. ※ enableTransferMobileNotification이(가) true 이면 활성화 | ||||||||
| enable | 문자열 열거형 enum { “Enabled”, “Disabled” } | “Enabled” | 푸시 통지를 활성화할지 여부
|
LogSetting
로그 출력 설정
로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 출력하기 위해 사용되는 GS2-Log 네임스페이스의 식별자(Namespace ID)를 보관합니다.
로그 네임스페이스ID(loggingNamespaceId)에는 로그 데이터를 수집하여 저장하는 GS2-Log의 네임스페이스를 GRN 형식으로 지정합니다.
이 설정을 하면 설정된 네임스페이스 내에서 발생한 API 요청·응답 로그 데이터가 대상 GS2-Log 네임스페이스 쪽으로 출력됩니다.
GS2-Log에서는 실시간으로 로그가 제공되어 시스템 모니터링, 분석, 디버깅 등에 활용할 수 있습니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| loggingNamespaceId | string | ✓ | ~ 1024자 | 로그를 출력할 GS2-Log의 네임스페이스
GRN
“grn:gs2:“로 시작하는 GRN 형식의 ID로 지정해야 합니다. |
GitHubCheckoutSetting
GitHub에서 마스터 데이터를 체크아웃하는 설정
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apiKeyId | string | ✓ | ~ 1024자 | GitHub API 키의 GRN | ||||||||||
| repositoryName | string | ✓ | ~ 1024자 | 리포지토리 이름 | ||||||||||
| sourcePath | string | ✓ | ~ 1024자 | 마스터 데이터(JSON) 파일 경로 | ||||||||||
| referenceType | 문자열 열거형 enum { “commit_hash”, “branch”, “tag” } | ✓ | 코드 출처
| |||||||||||
| commitHash | string | {referenceType} == “commit_hash” | ✓※ | ~ 1024자 | 커밋 해시 ※ referenceType이(가) “commit_hash” 이면 필수 | |||||||||
| branchName | string | {referenceType} == “branch” | ✓※ | ~ 1024자 | 브랜치 이름 ※ referenceType이(가) “branch” 이면 필수 | |||||||||
| tagName | string | {referenceType} == “tag” | ✓※ | ~ 1024자 | 태그 이름 ※ referenceType이(가) “tag” 이면 필수 |
Guild
길드
길드는 최대 5개의 속성을 가질 수 있으며, 길드 검색이나 길드 목록 표시 시 이용할 수 있습니다.
길드에는 참가 정책을 설정할 수 있으며, 자유 참가와 승인제를 선택할 수 있습니다.
자유 참가를 선택한 경우, 길드에 참가 요청을 하면 즉시 길드 멤버가 됩니다.
승인제를 선택한 경우, 길드에 참가 요청을 하면 길드 마스터 또는 길드 멤버가 승인할 때까지 길드 멤버가 되지 않습니다.
길드 멤버에게는 역할을 설정할 수 있으며, 길드 마스터, 길드 멤버에 더해 길드가 독자적으로 정의한 최대 10개의 커스텀 역할을 설정할 수 있습니다.
길드 멤버는 길드에 참가했을 때 기본으로 부여되는 역할을 설정할 수 있습니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| guildId | string | ※ | ~ 1024자 | 길드 GRN
※ 서버가 자동으로 설정 | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| name | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |||||||
| displayName | string | ✓ | ~ 64자 | 표시 이름 UI에서 플레이어에게 표시되는, 사람이 읽을 수 있는 길드 이름입니다. 길드명(시스템에서 생성되는 UUID)과 달리, 표시 이름은 길드 생성자가 설정하며 갱신도 가능합니다. 길드 검색 결과, 멤버 목록, 기타 플레이어 대상 화면에 사용됩니다. | ||||||||
| attribute1 | int | 0 ~ 2147483645 | 속성1 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 레벨, 지역, 플레이 스타일, 활동 요건 등의 커스텀 길드 속성을 정의하기 위해, 최대 5개의 속성을 개발자가 이용할 수 있습니다. | |||||||||
| attribute2 | int | 0 ~ 2147483645 | 속성2 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute3 | int | 0 ~ 2147483645 | 속성3 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute4 | int | 0 ~ 2147483645 | 속성4 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute5 | int | 0 ~ 2147483645 | 속성5 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| metadata | string | ~ 1024자 | 길드 메타데이터 GS2 동작에 영향을 미치지 않는, 길드에 연결된 임의의 데이터입니다. 길드 엠블럼, 설명, 모집 메시지 등 게임 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| joinPolicy | 문자열 열거형 enum { “anybody”, “approval” } | ✓ | 참가 방침 사용자가 이 길드에 어떻게 참가할 수 있는지를 제어합니다. “anybody” 는 승인 없이 임의의 사용자가 즉시 참가할 수 있습니다. “approval” 은 사용자가 멤버가 되기 전에 길드 마스터 또는 권한을 가진 멤버가 참가 요청을 승인해야 합니다. 길드 마스터가 언제든지 변경할 수 있습니다.
| |||||||||
| customRoles | List<RoleModel> | [] | 0 ~ 10 items | 커스텀 역할 목록 모델 레벨의 역할을 오버라이드하거나 확장하는 길드 고유의 커스텀 역할 정의 목록입니다. 각 길드는 고유한 권한 집합을 가진 최대 10개의 커스텀 역할을 정의할 수 있습니다. 이 역할들은 모델 레벨의 역할에 더해 멤버에게 할당할 수 있습니다. | ||||||||
| guildMemberDefaultRole | string | ~ 128자 | 기본 커스텀 역할 이 특정 길드에 새 멤버가 참가했을 때 자동으로 할당되는 커스텀 역할입니다. 설정한 경우, 이 길드에 대해 길드 모델의 guildMemberDefaultRole 을 오버라이드합니다. customRoles 목록에 정의된 역할을 참조해야 합니다. | |||||||||
| currentMaximumMemberCount | int | ✓ | 1 ~ 2147483646 | 현재 최대 멤버 수 이 길드가 가질 수 있는 현재 최대 멤버 수입니다. 길드 생성 시 길드 모델의 defaultMaximumMemberCount 로 초기화되며, 길드 조작이나 획득 액션(예: 길드 확장 아이템)을 통해 maximumMemberCount 까지 늘릴 수 있습니다. | ||||||||
| members | List<Member> | [] | 0 ~ 100 items | 길드 멤버 목록 길드 마스터와 일반 멤버를 포함한, 이 길드의 모든 현재 멤버 목록입니다. 각 항목에는 멤버의 사용자 ID, 할당된 역할, 메타데이터, 참가 타임스탬프가 포함됩니다. 멤버 수는 currentMaximumMemberCount 를 초과할 수 없습니다. | ||||||||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||||||||
| updatedAt | long | ※ | 현재 시각 | 최종 갱신일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | 리비전 |
JoinedGuild
가입 중인 길드
특정 길드에 대한 사용자의 멤버십을 나타냅니다. 사용자가 길드에 가입할 때(직접 가입 또는 신청 승인) 생성되며, 사용자가 탈퇴 또는 추방될 때 삭제됩니다. 사용자가 현재 어느 길드에 소속되어 있는지를 추적하여 maxConcurrentJoinGuilds 제한의 적용을 가능하게 합니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| joinedGuildId | string | ※ | ~ 1024자 | 참가 중인 길드 GRN
※ 서버가 자동으로 설정 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 가입 중인 길드가 속한 길드 모델의 이름입니다. 멤버십 제한, 롤 설정, 기타 길드 타입 설정을 포함하는 길드 모델 정의를 참조합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드 이름 사용자가 가입한 길드의 고유한 이름(UUID)입니다. 길드 모델 내의 특정 길드 인스턴스를 식별하기 위해 사용됩니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 |
LastGuildMasterActivity
마지막 길드 마스터 활동
길드 내에서 길드 마스터가 마지막으로 활동을 수행한 일시를 추적합니다. 이 타임스탬프는 비활성 기반 계승 시스템에서 사용됩니다. 길드 모델에서 설정된 inactivityPeriodDays가 길드 마스터의 활동 없이 경과하면, 리더십을 다른 멤버에게 자동으로 이양할 수 있습니다. 각 길드는 길드 마스터가 길드 조작을 수행할 때마다 업데이트되는 하나의 활동 기록을 가집니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| updatedAt | long | ※ | 현재 시각 | 최종 갱신일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 |
ReceiveMemberRequest
받은 참가 요청
멤버 등록 신청을 접수한 상태임을 나타내는 엔티티입니다.
해당 길드가 받은 참가 요청입니다.
해당 길드가 승인하면 참가 요청은 삭제되고 멤버 목록에 등록됩니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자 ID 이 길드에 참가 요청을 보낸 플레이어의 GS2 사용자 ID입니다. 신청자를 식별하며, 승인 시 길드의 멤버 목록에 추가하거나 거부 시 통지하기 위해 사용됩니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드명 이 참가 요청을 수신한 길드의 고유한 이름(UUID)입니다. 이 보류 중인 요청을 수신함에 가지고 있는 특정 길드 인스턴스를 식별하며, 길드의 멤버 관리 조작과 요청을 대조하기 위해 사용됩니다. | ||
| metadata | string | ~ 512자 | 메타데이터 자기소개 메시지나 신청 사유 등, 신청자가 이 참가 요청에 첨부한 임의의 데이터입니다. 길드 마스터가 요청을 승인 또는 거부할지 판단할 때 이 데이터를 확인할 수 있습니다. 최대 512자입니다. | |||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 |
SendMemberRequest
송신한 참가 요청
멤버 등록을 신청 중인 상태를 나타내는 엔티티입니다.
해당 사용자가 길드에 대해 송신한 참가 요청입니다.
대상 길드가 승인하면 참가 요청은 삭제되고 멤버 목록에 등록됩니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자 ID 이 길드 참가 요청을 송신한 플레이어의 GS2 사용자 ID입니다. 요청을 보낸 사용자를 식별하며, 승인 시 길드의 멤버 목록에 추가하기 위해 사용됩니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드 이름 참가 요청이 송신된 길드의 고유한 이름(UUID)입니다. 사용자가 참가를 요청하고 있는 특정 길드 인스턴스를 식별하며, 요청 처리를 위해 길드의 수신함을 특정하는 데 사용됩니다. | ||
| metadata | string | ~ 512자 | 메타데이터 자기소개 메시지나 신청 사유 등, 이 참가 요청에 첨부되는 임의의 데이터입니다. 길드 마스터가 요청을 심사할 때 이 데이터가 표시되어 승인 판단의 참고 자료로 사용할 수 있습니다. 최대 512자입니다. | |||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 |
IgnoreUser
거부 사용자
특정 길드에 대한 가입이 차단된 사용자를 나타냅니다. 사용자가 거부 리스트에 추가되면 참가 신청이 자동으로 거부되며, 가입 정책이 자유 가입으로 설정되어 있어도 길드에 가입할 수 없습니다. 길드 마스터가 원치 않는 멤버를 관리하기 위해 사용합니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 |
GuildModel
길드 모델
길드 모델이란 길드에 가입 가능한 최대 인원수 설정 및 길드 내 직책별 권한 설정을 가지는 엔티티입니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| guildModelId | string | ※ | ~ 1024자 | 길드 모델 GRN
※ 서버가 자동으로 설정 | ||
| name | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| metadata | string | ~ 2048자 | 메타데이터 메타데이터에는 임의의 값을 설정할 수 있습니다. 이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. | |||
| defaultMaximumMemberCount | int | ✓ | 1 ~ 2147483646 | 기본 최대 멤버 수 새 길드가 생성될 때 허용되는 초기 최대 멤버 수입니다. 이 값은 신규 길드의 currentMaximumMemberCount 초기값으로 사용됩니다. 길드 조작이나 입수 액션을 통해 나중에 maximumMemberCount 상한까지 늘릴 수 있습니다. | ||
| maximumMemberCount | int | ✓ | 1 ~ 2147483646 | 최대 멤버 수 상한 길드가 가질 수 있는 멤버 수의 절대적인 상한입니다. 길드의 currentMaximumMemberCount는 이 값을 초과할 수 없습니다. 길드가 의도된 규모를 넘어 성장하는 것을 방지하는 하드 캡으로 작동합니다. | ||
| inactivityPeriodDays | int | 7 | 1 ~ 365 | 무활동 기간(일수) 길드 마스터의 무활동이 이 일수를 초과한 경우, 남은 길드 멤버 중에서 새로운 길드 마스터가 자동으로 선출됩니다. 길드 마스터가 플레이를 중단했을 때 길드가 관리 불능 상태가 되는 것을 방지합니다. | ||
| roles | List<RoleModel> | ✓ | 1 ~ 10 items | 롤 모델 리스트 이 타입의 길드 내에서 이용 가능한 롤 정의 리스트입니다. guildMasterRole 및 guildMemberDefaultRole에서 참조되는 롤을 최소한 포함해야 합니다. 각 롤은 정책 문서를 통해 고유한 권한 집합을 정의합니다. 최대 10개의 롤을 정의할 수 있습니다. | ||
| guildMasterRole | string | ✓ | ~ 128자 | 길드 마스터 롤 이름 길드 마스터에게 할당되는 롤의 이름입니다. roles 리스트에 정의된 롤을 참조해야 합니다. 길드 마스터는 일반적으로 참가 신청 승인, 멤버 추방, 롤 변경, 길드 설정 갱신 등 길드를 관리하는 모든 권한을 가집니다. | ||
| guildMemberDefaultRole | string | ✓ | ~ 128자 | 기본 멤버 롤 이름 새로운 길드 멤버가 가입할 때 자동으로 할당되는 롤의 이름입니다. roles 리스트에 정의된 롤을 참조해야 합니다. 이는 길드 마스터에 의한 롤 변경 이전, 일반 멤버의 기본 권한 집합입니다. | ||
| rejoinCoolTimeMinutes | int | 0 | 0 ~ 2147483646 | 재가입 쿨타임(분) 사용자가 길드를 탈퇴한 후 다시 길드에 가입할 수 있게 되기까지의 쿨다운 기간(분)입니다. 0으로 설정하면 즉시 재가입이 가능합니다. 사용자가 길드에 반복적으로 가입·탈퇴하는 악용 패턴을 방지합니다. | ||
| maxConcurrentJoinGuilds | int | 1 ~ 10 | 동시 가입 가능 길드 최대 수 사용자가 이 타입의 길드에 동시에 멤버로 가입할 수 있는 최대 수입니다. 플레이어가 여러 길드에 동시에 소속될 수 있는 디자인(예: 전투 길드와 소셜 길드)을 가능하게 합니다. 값은 1에서 10 사이입니다. | |||
| maxConcurrentGuildMasterCount | int | 1 ~ 100 | 동시 존재 가능 길드 마스터 최대 수 하나의 길드에 동시에 존재할 수 있는 길드 마스터의 최대 인원수입니다. 여러 플레이어가 길드 마스터의 책임과 권한을 공유하는 공동 리더십 디자인을 가능하게 합니다. 값은 1에서 100 사이입니다. |
RoleModel
롤 모델
롤 모델은 길드 내에서의 역할을 정의하고, 각 역할별로 실행할 수 있는 처리에 관한 권한을 설정합니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128자 | 롤 모델 이름 롤 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| metadata | string | ~ 2048자 | 메타데이터 메타데이터에는 임의의 값을 설정할 수 있습니다. 이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. | |||
| policyDocument | string | ✓ | ~ 10240자 | 정책 문서 이 역할의 권한을 정의하는 JSON 형식의 정책 문서입니다. 이 역할에 할당된 멤버에 대해 어떤 길드 조작(참가 요청 승인/거부, 멤버 추방, 길드 정보 업데이트, 멤버 역할 변경 등)이 허용되거나 거부되는지를 지정합니다. |
Member
멤버
길드 멤버 목록을 관리하는 엔티티
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| roleName | string | ✓ | ~ 128자 | 롤 모델 이름 롤 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| metadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||
| joinedAt | long | ※ | 현재 시각 | 참가 일시 UNIX 시간·밀리초 |
VerifyActionResult
검증 액션 실행 결과
상세
ConsumeActionResult
소비 액션 실행 결과
상세
AcquireActionResult
획득 액션 실행 결과
상세
TransactionResult
트랜잭션 실행 결과
서버 사이드에서 트랜잭션 자동 실행 기능을 이용하여 실행된 트랜잭션의 실행 결과
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| transactionId | string | ✓ | 36 ~ 36자 | 트랜잭션 ID | ||
| verifyResults | List<VerifyActionResult> | 0 ~ 10 items | 검증 액션의 실행 결과 목록 | |||
| consumeResults | List<ConsumeActionResult> | [] | 0 ~ 10 items | 소비 액션의 실행 결과 목록 | ||
| acquireResults | List<AcquireActionResult> | [] | 0 ~ 100 items | 획득 액션 실행 결과 리스트 | ||
| hasError | bool | false | 트랜잭션 실행 중 오류가 발생했는지 여부 |
CurrentGuildMaster
현재 활성화되어 있는 길드 모델의 마스터 데이터
현재 네임스페이스 내에서 유효한, 길드 모델의 정의를 기술한 마스터 데이터입니다.
GS2에서는 마스터 데이터 관리에 JSON 형식의 파일을 사용합니다.
파일을 업로드함으로써 실제로 서버에 설정을 반영할 수 있습니다.
JSON 파일을 작성하는 방법으로, 매니지먼트 콘솔 내에 마스터 데이터 에디터를 제공하고 있습니다.
또한 게임 운영에 더 적합한 도구를 직접 만들어 적절한 포맷의 JSON 파일을 출력함으로써도 서비스를 이용할 수 있습니다.
JSON 파일 형식에 대해서는 GS2-Guild 마스터 데이터 레퍼런스를 참조해 주세요.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceId | string | ※ | ~ 1024자 | 네임스페이스 GRN
※ 서버가 자동으로 설정 | ||
| settings | string | ✓ | ~ 5242880 바이트 (5MB) | 마스터 데이터 |
GuildModelMaster
길드 모델 마스터
길드 모델 마스터는 게임 내에서 사용되는 길드 모델의 편집·관리용 데이터로, 매니지먼트 콘솔의 마스터 데이터 에디터에서 일시적으로 보관됩니다.
임포트·갱신 처리를 수행함으로써 실제로 게임에서 참조되는 길드 모델로 반영됩니다.
길드 모델 마스터란 길드의 가입 가능 최대 인원수 설정과, 길드 내 직책별 권한 설정을 가진 엔티티입니다.
상세
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| guildModelId | string | ※ | ~ 1024자 | 길드 모델 마스터 GRN
※ 서버가 자동으로 설정 | ||
| name | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| metadata | string | ~ 1024자 | 메타데이터 메타데이터에는 임의의 값을 설정할 수 있습니다. 이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. | |||
| defaultMaximumMemberCount | int | ✓ | 0 ~ 2147483646 | 기본 최대 멤버 수 새 길드가 생성될 때 허용되는 초기 최대 멤버 수입니다. 이 값은 신규 길드의 currentMaximumMemberCount 초기값으로 사용됩니다. 길드 조작이나 입수 액션을 통해 나중에 maximumMemberCount 상한까지 늘릴 수 있습니다. | ||
| maximumMemberCount | int | ✓ | 0 ~ 2147483646 | 최대 멤버 수 상한 길드가 가질 수 있는 멤버 수의 절대적인 상한입니다. 길드의 currentMaximumMemberCount는 이 값을 초과할 수 없습니다. 길드가 의도된 규모를 넘어 성장하는 것을 방지하는 하드 캡으로 작동합니다. | ||
| inactivityPeriodDays | int | 7 | 1 ~ 365 | 무활동 기간(일수) 길드 마스터의 무활동이 이 일수를 초과한 경우, 남은 길드 멤버 중에서 새로운 길드 마스터가 자동으로 선출됩니다. 길드 마스터가 플레이를 중단했을 때 길드가 관리 불능 상태가 되는 것을 방지합니다. | ||
| roles | List<RoleModel> | ✓ | 1 ~ 10 items | 역할 모델 목록 이 길드 모델의 길드 내에서 이용할 수 있는 역할 정의 목록입니다. guildMasterRole 및 guildMemberDefaultRole 에서 참조되는 역할을 적어도 1개 포함해야 합니다. 최대 10개의 역할을 정의할 수 있습니다. | ||
| guildMasterRole | string | ✓ | ~ 128자 | 길드 마스터 역할명 길드 마스터에게 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. 길드 마스터는 일반적으로 길드를 관리하는 모든 권한을 가집니다. | ||
| guildMemberDefaultRole | string | ✓ | ~ 128자 | 기본 멤버 역할명 새로운 길드 멤버가 참가했을 때 자동으로 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. | ||
| rejoinCoolTimeMinutes | int | 0 | 0 ~ 2147483646 | 재가입 쿨타임(분) 사용자가 길드를 탈퇴한 후 다시 길드에 가입할 수 있게 되기까지의 쿨다운 기간(분)입니다. 0으로 설정하면 즉시 재가입이 가능합니다. 사용자가 길드에 반복적으로 가입·탈퇴하는 악용 패턴을 방지합니다. | ||
| maxConcurrentJoinGuilds | int | 1 ~ 10 | 동시 참가 가능 길드 최대 수 사용자가 이 타입의 길드에 동시에 멤버로 참가할 수 있는 최대 수입니다. 값은 1에서 10까지의 범위입니다. | |||
| maxConcurrentGuildMasterCount | int | 1 ~ 100 | 동시 존재 가능 길드 마스터 최대 수 하나의 길드에 동시에 존재할 수 있는 길드 마스터의 최대 인원수입니다. 공동 리더십 설계를 가능하게 합니다. 값은 1에서 100까지의 범위입니다. | |||
| createdAt | long | ※ | 현재 시각 | 생성일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||
| updatedAt | long | ※ | 현재 시각 | 최종 갱신일시 UNIX 시간·밀리초 ※ 서버가 자동으로 설정 | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | 리비전 |
메서드
describeNamespaces
네임스페이스 목록 조회
프로젝트 내에서 서비스 단위로 생성된 네임스페이스의 목록을 조회합니다.
옵션인 페이지 토큰을 사용하여 목록의 특정 위치부터 데이터 조회를 시작할 수 있습니다.
또한 조회할 네임스페이스의 수를 제한하는 것도 가능합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namePrefix | string | ~ 64자 | 네임스페이스 이름의 필터 접두사 | |||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<Namespace> | 네임스페이스 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeNamespaces(
&guild.DescribeNamespacesRequest {
NamePrefix: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeNamespacesRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeNamespacesRequest;
import io.gs2.guild.result.DescribeNamespacesResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeNamespaces(
new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_namespaces(
guild.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('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| transactionSetting | TransactionSetting | 트랜잭션 설정 길드 조작 시 분산 트랜잭션의 실행 방식을 제어하는 설정입니다. 자동 실행, 원자적 커밋, 비동기 처리 등의 옵션을 지원합니다. | ||||
| changeNotification | NotificationSetting | 길드 변경 통지 길드 정보(표시 이름, 속성, 가입 정책 등)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 멤버가 길드의 변경 사항에 대해 실시간으로 알림을 받을 수 있습니다. | ||||
| joinNotification | NotificationSetting | 멤버 가입 통지 새로운 멤버가 길드에 가입했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자유 가입 및 참가 신청 승인 양쪽 모두에 대응합니다. 기존 멤버가 신규 가입을 통지받을 수 있게 됩니다. | ||||
| leaveNotification | NotificationSetting | 멤버 탈퇴 통지 멤버가 길드에서 탈퇴하거나 제명되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자발적인 탈퇴와 길드 마스터에 의한 추방 양쪽 모두에 대응합니다. | ||||
| changeMemberNotification | NotificationSetting | 멤버 변경 통지 길드 멤버의 정보(롤, 메타데이터)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 메타데이터 변경으로 이 통지가 발생할지 여부는 changeMemberNotificationIgnoreChangeMetadata로 제어할 수 있습니다. | ||||
| changeMemberNotificationIgnoreChangeMetadata | bool? | false | 멤버의 정보가 갱신되었을 때 통지를 발행할 때 메타데이터 변경을 무시할지 여부 | |||
| receiveRequestNotification | NotificationSetting | 신청 수신 통지 길드가 사용자로부터 새로운 참가 신청을 수신했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 마스터 및 권한을 가진 멤버가 승인이 필요한 보류 신청을 통지받을 수 있게 됩니다. | ||||
| removeRequestNotification | NotificationSetting | 신청 삭제 통지 길드 참가 신청이 삭제되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 발신자에 의한 취소, 길드에 의한 거부, 또는 승인(신청 삭제 및 멤버 추가) 중 하나에 대응합니다. | ||||
| createGuildScript | ScriptSetting | 길드를 생성할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - createGuild | ||||
| updateGuildScript | ScriptSetting | 길드를 갱신할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - updateGuild | ||||
| joinGuildScript | ScriptSetting | 길드에 가입할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - joinGuild | ||||
| receiveJoinRequestScript | ScriptSetting | 길드에 참가 신청을 접수했을 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - receiveJoinRequest | ||||
| leaveGuildScript | ScriptSetting | 길드를 탈퇴할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - leaveGuild | ||||
| changeRoleScript | ScriptSetting | 멤버에게 할당된 롤을 변경할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - changeRole | ||||
| deleteGuildScript | ScriptSetting | 길드를 삭제할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - deleteGuild | ||||
| logSetting | LogSetting | 로그 출력 설정 길드 조작의 로그 데이터를 GS2-Log 로 출력하기 위한 설정입니다. GS2-Log 의 네임스페이스를 지정하면 길드 생성, 참가, 탈퇴, 역할 변경의 API 요청·응답 로그를 수집할 수 있습니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Namespace | 생성한 네임스페이스 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CreateNamespace(
&guild.CreateNamespaceRequest {
Name: pointy.String("namespace-0001"),
Description: nil,
TransactionSetting: &guild.TransactionSetting{
EnableAutoRun: pointy.Bool(false),
QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
},
ChangeNotification: nil,
JoinNotification: nil,
LeaveNotification: nil,
ChangeMemberNotification: nil,
ChangeMemberNotificationIgnoreChangeMetadata: nil,
ReceiveRequestNotification: nil,
RemoveRequestNotification: nil,
CreateGuildScript: nil,
UpdateGuildScript: nil,
JoinGuildScript: nil,
ReceiveJoinRequestScript: nil,
LeaveGuildScript: nil,
ChangeRoleScript: nil,
DeleteGuildScript: nil,
LogSetting: &guild.LogSetting{
LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CreateNamespaceRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->createNamespace(
(new CreateNamespaceRequest())
->withName("namespace-0001")
->withDescription(null)
->withTransactionSetting((new \Gs2\Guild\Model\TransactionSetting())
->withEnableAutoRun(false)
->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
->withChangeNotification(null)
->withJoinNotification(null)
->withLeaveNotification(null)
->withChangeMemberNotification(null)
->withChangeMemberNotificationIgnoreChangeMetadata(null)
->withReceiveRequestNotification(null)
->withRemoveRequestNotification(null)
->withCreateGuildScript(null)
->withUpdateGuildScript(null)
->withJoinGuildScript(null)
->withReceiveJoinRequestScript(null)
->withLeaveGuildScript(null)
->withChangeRoleScript(null)
->withDeleteGuildScript(null)
->withLogSetting((new \Gs2\Guild\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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CreateNamespaceRequest;
import io.gs2.guild.result.CreateNamespaceResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
CreateNamespaceResult result = client.createNamespace(
new CreateNamespaceRequest()
.withName("namespace-0001")
.withDescription(null)
.withTransactionSetting(new io.gs2.guild.model.TransactionSetting()
.withEnableAutoRun(false)
.withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
.withChangeNotification(null)
.withJoinNotification(null)
.withLeaveNotification(null)
.withChangeMemberNotification(null)
.withChangeMemberNotificationIgnoreChangeMetadata(null)
.withReceiveRequestNotification(null)
.withRemoveRequestNotification(null)
.withCreateGuildScript(null)
.withUpdateGuildScript(null)
.withJoinGuildScript(null)
.withReceiveJoinRequestScript(null)
.withLeaveGuildScript(null)
.withChangeRoleScript(null)
.withDeleteGuildScript(null)
.withLogSetting(new io.gs2.guild.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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
new Gs2.Gs2Guild.Request.CreateNamespaceRequest()
.WithName("namespace-0001")
.WithDescription(null)
.WithTransactionSetting(new Gs2.Gs2Guild.Model.TransactionSetting()
.WithEnableAutoRun(false)
.WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
.WithChangeNotification(null)
.WithJoinNotification(null)
.WithLeaveNotification(null)
.WithChangeMemberNotification(null)
.WithChangeMemberNotificationIgnoreChangeMetadata(null)
.WithReceiveRequestNotification(null)
.WithRemoveRequestNotification(null)
.WithCreateGuildScript(null)
.WithUpdateGuildScript(null)
.WithJoinGuildScript(null)
.WithReceiveJoinRequestScript(null)
.WithLeaveGuildScript(null)
.WithChangeRoleScript(null)
.WithDeleteGuildScript(null)
.WithLogSetting(new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.createNamespace(
new Gs2Guild.CreateNamespaceRequest()
.withName("namespace-0001")
.withDescription(null)
.withTransactionSetting(new Gs2Guild.model.TransactionSetting()
.withEnableAutoRun(false)
.withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
.withChangeNotification(null)
.withJoinNotification(null)
.withLeaveNotification(null)
.withChangeMemberNotification(null)
.withChangeMemberNotificationIgnoreChangeMetadata(null)
.withReceiveRequestNotification(null)
.withRemoveRequestNotification(null)
.withCreateGuildScript(null)
.withUpdateGuildScript(null)
.withJoinGuildScript(null)
.withReceiveJoinRequestScript(null)
.withLeaveGuildScript(null)
.withChangeRoleScript(null)
.withDeleteGuildScript(null)
.withLogSetting(new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.create_namespace(
guild.CreateNamespaceRequest()
.with_name('namespace-0001')
.with_description(None)
.with_transaction_setting(
guild.TransactionSetting()
.with_enable_auto_run(False)
.with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001'))
.with_change_notification(None)
.with_join_notification(None)
.with_leave_notification(None)
.with_change_member_notification(None)
.with_change_member_notification_ignore_change_metadata(None)
.with_receive_request_notification(None)
.with_remove_request_notification(None)
.with_create_guild_script(None)
.with_update_guild_script(None)
.with_join_guild_script(None)
.with_receive_join_request_script(None)
.with_leave_guild_script(None)
.with_change_role_script(None)
.with_delete_guild_script(None)
.with_log_setting(
guild.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('guild')
api_result = client.create_namespace({
name="namespace-0001",
description=nil,
transactionSetting={
enableAutoRun=false,
queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
},
changeNotification=nil,
joinNotification=nil,
leaveNotification=nil,
changeMemberNotification=nil,
changeMemberNotificationIgnoreChangeMetadata=nil,
receiveRequestNotification=nil,
removeRequestNotification=nil,
createGuildScript=nil,
updateGuildScript=nil,
joinGuildScript=nil,
receiveJoinRequestScript=nil,
leaveGuildScript=nil,
changeRoleScript=nil,
deleteGuildScript=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('guild')
api_result_handler = client.create_namespace_async({
name="namespace-0001",
description=nil,
transactionSetting={
enableAutoRun=false,
queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
},
changeNotification=nil,
joinNotification=nil,
leaveNotification=nil,
changeMemberNotification=nil,
changeMemberNotificationIgnoreChangeMetadata=nil,
receiveRequestNotification=nil,
removeRequestNotification=nil,
createGuildScript=nil,
updateGuildScript=nil,
joinGuildScript=nil,
receiveJoinRequestScript=nil,
leaveGuildScript=nil,
changeRoleScript=nil,
deleteGuildScript=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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|
| status | string | 네임스페이스의 상태
|
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetNamespaceStatus(
&guild.GetNamespaceStatusRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
status := result.Statususe Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetNamespaceStatusRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetNamespaceStatusRequest;
import io.gs2.guild.result.GetNamespaceStatusResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getNamespaceStatus(
new Gs2Guild.GetNamespaceStatusRequest()
.withNamespaceName("namespace-0001")
);
const status = result.getStatus();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_namespace_status(
guild.GetNamespaceStatusRequest()
.with_namespace_name('namespace-0001')
)
status = result.status
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Namespace | 네임스페이스 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetNamespace(
&guild.GetNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetNamespaceRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetNamespaceRequest;
import io.gs2.guild.result.GetNamespaceResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getNamespace(
new Gs2Guild.GetNamespaceRequest()
.withNamespaceName("namespace-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_namespace(
guild.GetNamespaceRequest()
.with_namespace_name('namespace-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| transactionSetting | TransactionSetting | 트랜잭션 설정 길드 조작 시 분산 트랜잭션의 실행 방식을 제어하는 설정입니다. 자동 실행, 원자적 커밋, 비동기 처리 등의 옵션을 지원합니다. | ||||
| changeNotification | NotificationSetting | 길드 변경 통지 길드 정보(표시 이름, 속성, 가입 정책 등)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 멤버가 길드의 변경 사항에 대해 실시간으로 알림을 받을 수 있습니다. | ||||
| joinNotification | NotificationSetting | 멤버 가입 통지 새로운 멤버가 길드에 가입했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자유 가입 및 참가 신청 승인 양쪽 모두에 대응합니다. 기존 멤버가 신규 가입을 통지받을 수 있게 됩니다. | ||||
| leaveNotification | NotificationSetting | 멤버 탈퇴 통지 멤버가 길드에서 탈퇴하거나 제명되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 자발적인 탈퇴와 길드 마스터에 의한 추방 양쪽 모두에 대응합니다. | ||||
| changeMemberNotification | NotificationSetting | 멤버 변경 통지 길드 멤버의 정보(롤, 메타데이터)가 갱신되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 메타데이터 변경으로 이 통지가 발생할지 여부는 changeMemberNotificationIgnoreChangeMetadata로 제어할 수 있습니다. | ||||
| changeMemberNotificationIgnoreChangeMetadata | bool? | false | 멤버의 정보가 갱신되었을 때 통지를 발행할 때 메타데이터 변경을 무시할지 여부 | |||
| receiveRequestNotification | NotificationSetting | 신청 수신 통지 길드가 사용자로부터 새로운 참가 신청을 수신했을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 길드 마스터 및 권한을 가진 멤버가 승인이 필요한 보류 신청을 통지받을 수 있게 됩니다. | ||||
| removeRequestNotification | NotificationSetting | 신청 삭제 통지 길드 참가 신청이 삭제되었을 때 GS2-Gateway를 통해 전송되는 푸시 통지입니다. 발신자에 의한 취소, 길드에 의한 거부, 또는 승인(신청 삭제 및 멤버 추가) 중 하나에 대응합니다. | ||||
| createGuildScript | ScriptSetting | 길드를 생성할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - createGuild | ||||
| updateGuildScript | ScriptSetting | 길드를 갱신할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - updateGuild | ||||
| joinGuildScript | ScriptSetting | 길드에 가입할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - joinGuild | ||||
| receiveJoinRequestScript | ScriptSetting | 길드에 참가 신청을 접수했을 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - receiveJoinRequest | ||||
| leaveGuildScript | ScriptSetting | 길드를 탈퇴할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - leaveGuild | ||||
| changeRoleScript | ScriptSetting | 멤버에게 할당된 롤을 변경할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - changeRole | ||||
| deleteGuildScript | ScriptSetting | 길드를 삭제할 때 실행할 스크립트 설정 Script 트리거 레퍼런스 - deleteGuild | ||||
| logSetting | LogSetting | 로그 출력 설정 길드 조작의 로그 데이터를 GS2-Log 로 출력하기 위한 설정입니다. GS2-Log 의 네임스페이스를 지정하면 길드 생성, 참가, 탈퇴, 역할 변경의 API 요청·응답 로그를 수집할 수 있습니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Namespace | 갱신한 네임스페이스 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateNamespace(
&guild.UpdateNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
Description: pointy.String("description1"),
TransactionSetting: &guild.TransactionSetting{
EnableAutoRun: pointy.Bool(false),
QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
},
ChangeNotification: nil,
JoinNotification: nil,
LeaveNotification: nil,
ChangeMemberNotification: nil,
ChangeMemberNotificationIgnoreChangeMetadata: nil,
ReceiveRequestNotification: nil,
RemoveRequestNotification: nil,
CreateGuildScript: nil,
UpdateGuildScript: nil,
JoinGuildScript: nil,
ReceiveJoinRequestScript: nil,
LeaveGuildScript: nil,
ChangeRoleScript: nil,
DeleteGuildScript: nil,
LogSetting: &guild.LogSetting{
LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateNamespaceRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateNamespace(
(new UpdateNamespaceRequest())
->withNamespaceName("namespace-0001")
->withDescription("description1")
->withTransactionSetting((new \Gs2\Guild\Model\TransactionSetting())
->withEnableAutoRun(false)
->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
->withChangeNotification(null)
->withJoinNotification(null)
->withLeaveNotification(null)
->withChangeMemberNotification(null)
->withChangeMemberNotificationIgnoreChangeMetadata(null)
->withReceiveRequestNotification(null)
->withRemoveRequestNotification(null)
->withCreateGuildScript(null)
->withUpdateGuildScript(null)
->withJoinGuildScript(null)
->withReceiveJoinRequestScript(null)
->withLeaveGuildScript(null)
->withChangeRoleScript(null)
->withDeleteGuildScript(null)
->withLogSetting((new \Gs2\Guild\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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateNamespaceRequest;
import io.gs2.guild.result.UpdateNamespaceResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateNamespaceResult result = client.updateNamespace(
new UpdateNamespaceRequest()
.withNamespaceName("namespace-0001")
.withDescription("description1")
.withTransactionSetting(new io.gs2.guild.model.TransactionSetting()
.withEnableAutoRun(false)
.withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
.withChangeNotification(null)
.withJoinNotification(null)
.withLeaveNotification(null)
.withChangeMemberNotification(null)
.withChangeMemberNotificationIgnoreChangeMetadata(null)
.withReceiveRequestNotification(null)
.withRemoveRequestNotification(null)
.withCreateGuildScript(null)
.withUpdateGuildScript(null)
.withJoinGuildScript(null)
.withReceiveJoinRequestScript(null)
.withLeaveGuildScript(null)
.withChangeRoleScript(null)
.withDeleteGuildScript(null)
.withLogSetting(new io.gs2.guild.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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
new Gs2.Gs2Guild.Request.UpdateNamespaceRequest()
.WithNamespaceName("namespace-0001")
.WithDescription("description1")
.WithTransactionSetting(new Gs2.Gs2Guild.Model.TransactionSetting()
.WithEnableAutoRun(false)
.WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
.WithChangeNotification(null)
.WithJoinNotification(null)
.WithLeaveNotification(null)
.WithChangeMemberNotification(null)
.WithChangeMemberNotificationIgnoreChangeMetadata(null)
.WithReceiveRequestNotification(null)
.WithRemoveRequestNotification(null)
.WithCreateGuildScript(null)
.WithUpdateGuildScript(null)
.WithJoinGuildScript(null)
.WithReceiveJoinRequestScript(null)
.WithLeaveGuildScript(null)
.WithChangeRoleScript(null)
.WithDeleteGuildScript(null)
.WithLogSetting(new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateNamespace(
new Gs2Guild.UpdateNamespaceRequest()
.withNamespaceName("namespace-0001")
.withDescription("description1")
.withTransactionSetting(new Gs2Guild.model.TransactionSetting()
.withEnableAutoRun(false)
.withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
.withChangeNotification(null)
.withJoinNotification(null)
.withLeaveNotification(null)
.withChangeMemberNotification(null)
.withChangeMemberNotificationIgnoreChangeMetadata(null)
.withReceiveRequestNotification(null)
.withRemoveRequestNotification(null)
.withCreateGuildScript(null)
.withUpdateGuildScript(null)
.withJoinGuildScript(null)
.withReceiveJoinRequestScript(null)
.withLeaveGuildScript(null)
.withChangeRoleScript(null)
.withDeleteGuildScript(null)
.withLogSetting(new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_namespace(
guild.UpdateNamespaceRequest()
.with_namespace_name('namespace-0001')
.with_description('description1')
.with_transaction_setting(
guild.TransactionSetting()
.with_enable_auto_run(False)
.with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002'))
.with_change_notification(None)
.with_join_notification(None)
.with_leave_notification(None)
.with_change_member_notification(None)
.with_change_member_notification_ignore_change_metadata(None)
.with_receive_request_notification(None)
.with_remove_request_notification(None)
.with_create_guild_script(None)
.with_update_guild_script(None)
.with_join_guild_script(None)
.with_receive_join_request_script(None)
.with_leave_guild_script(None)
.with_change_role_script(None)
.with_delete_guild_script(None)
.with_log_setting(
guild.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('guild')
api_result = client.update_namespace({
namespaceName="namespace-0001",
description="description1",
transactionSetting={
enableAutoRun=false,
queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
},
changeNotification=nil,
joinNotification=nil,
leaveNotification=nil,
changeMemberNotification=nil,
changeMemberNotificationIgnoreChangeMetadata=nil,
receiveRequestNotification=nil,
removeRequestNotification=nil,
createGuildScript=nil,
updateGuildScript=nil,
joinGuildScript=nil,
receiveJoinRequestScript=nil,
leaveGuildScript=nil,
changeRoleScript=nil,
deleteGuildScript=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('guild')
api_result_handler = client.update_namespace_async({
namespaceName="namespace-0001",
description="description1",
transactionSetting={
enableAutoRun=false,
queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
},
changeNotification=nil,
joinNotification=nil,
leaveNotification=nil,
changeMemberNotification=nil,
changeMemberNotificationIgnoreChangeMetadata=nil,
receiveRequestNotification=nil,
removeRequestNotification=nil,
createGuildScript=nil,
updateGuildScript=nil,
joinGuildScript=nil,
receiveJoinRequestScript=nil,
leaveGuildScript=nil,
changeRoleScript=nil,
deleteGuildScript=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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Namespace | 삭제한 네임스페이스 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteNamespace(
&guild.DeleteNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteNamespaceRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteNamespaceRequest;
import io.gs2.guild.result.DeleteNamespaceResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteNamespace(
new Gs2Guild.DeleteNamespaceRequest()
.withNamespaceName("namespace-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_namespace(
guild.DeleteNamespaceRequest()
.with_namespace_name('namespace-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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
| 타입 | 설명 | |
|---|---|---|
| item | string | 버전 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetServiceVersion(
&guild.GetServiceVersionRequest {
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetServiceVersionRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetServiceVersionRequest;
import io.gs2.guild.result.GetServiceVersionResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getServiceVersion(
new Gs2Guild.GetServiceVersionRequest()
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_service_version(
guild.GetServiceVersionRequest()
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
반환값: 없음
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DumpUserDataByUserId(
&guild.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\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DumpUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DumpUserDataByUserIdRequest;
import io.gs2.guild.result.DumpUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.dumpUserDataByUserId(
new Gs2Guild.DumpUserDataByUserIdRequest()
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.dump_user_data_by_user_id(
guild.DumpUserDataByUserIdRequest()
.with_user_id('user-0001')
.with_time_offset_token(None)
)
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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.resultclient = gs2('guild')
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.resultcheckDumpUserDataByUserId
지정한 사용자 ID에 연결된 데이터의 덤프가 완료되었는지 확인
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| url | string | 출력 데이터의 URL |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
&guild.CheckDumpUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
url := result.Urluse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CheckDumpUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.guild.result.CheckDumpUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.checkDumpUserDataByUserId(
new Gs2Guild.CheckDumpUserDataByUserIdRequest()
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
const url = result.getUrl();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.check_dump_user_data_by_user_id(
guild.CheckDumpUserDataByUserIdRequest()
.with_user_id('user-0001')
.with_time_offset_token(None)
)
url = result.url
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
반환값: 없음
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CleanUserDataByUserId(
&guild.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\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CleanUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CleanUserDataByUserIdRequest;
import io.gs2.guild.result.CleanUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.cleanUserDataByUserId(
new Gs2Guild.CleanUserDataByUserIdRequest()
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.clean_user_data_by_user_id(
guild.CleanUserDataByUserIdRequest()
.with_user_id('user-0001')
.with_time_offset_token(None)
)
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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.resultclient = gs2('guild')
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.resultcheckCleanUserDataByUserId
지정한 사용자 ID의 사용자 데이터 완전 삭제가 완료되었는지 확인
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
반환값: 없음
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
&guild.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\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CheckCleanUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.guild.result.CheckCleanUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.checkCleanUserDataByUserId(
new Gs2Guild.CheckCleanUserDataByUserIdRequest()
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.check_clean_user_data_by_user_id(
guild.CheckCleanUserDataByUserIdRequest()
.with_user_id('user-0001')
.with_time_offset_token(None)
)
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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.resultclient = gs2('guild')
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.resultprepareImportUserDataByUserId
지정한 사용자 ID에 연결된 데이터의 임포트 준비
임포트에 사용할 수 있는 데이터는 GS2 를 통해 익스포트하여 취득한 데이터로 한정되며, 오래된 데이터는 임포트에 실패할 수 있습니다.
익스포트한 사용자 ID와 다른 사용자 ID로 임포트할 수 있지만, 사용자 데이터의 페이로드 내에 사용자 ID가 포함되어 있는 경우에는 그렇지 않을 수 있습니다.
이 API의 반환값으로 응답된 URL에 익스포트한 zip 파일을 업로드하고 importUserDataByUserId 를 호출함으로써 실제 임포트 처리를 시작할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| uploadToken | string | 업로드 후 결과를 반영할 때 사용하는 토큰 |
| uploadUrl | string | 사용자 데이터 업로드 처리 실행에 사용하는 URL |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
&guild.PrepareImportUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrluse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\PrepareImportUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.guild.result.PrepareImportUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.prepareImportUserDataByUserId(
new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.prepare_import_user_data_by_user_id(
guild.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('guild')
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('guild')
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
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| uploadToken | string | ✓ | ~ 1024자 | 업로드 준비 시 수신한 토큰 | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
반환값: 없음
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.ImportUserDataByUserId(
&guild.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\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\ImportUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.ImportUserDataByUserIdRequest;
import io.gs2.guild.result.ImportUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.importUserDataByUserId(
new Gs2Guild.ImportUserDataByUserIdRequest()
.withUserId("user-0001")
.withUploadToken("upload-0001")
.withTimeOffsetToken(null)
);
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.import_user_data_by_user_id(
guild.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('guild')
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.resultclient = gs2('guild')
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.resultcheckImportUserDataByUserId
지정한 사용자 ID에 연결된 데이터의 임포트가 완료되었는지 확인
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| uploadToken | string | ✓ | ~ 1024자 | 업로드 준비 시 수신한 토큰 | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| url | string | 출력 로그의 URL |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
&guild.CheckImportUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
UploadToken: pointy.String("upload-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
url := result.Urluse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CheckImportUserDataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CheckImportUserDataByUserIdRequest;
import io.gs2.guild.result.CheckImportUserDataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.checkImportUserDataByUserId(
new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.check_import_user_data_by_user_id(
guild.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('guild')
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('guild')
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;searchGuilds
길드 검색
다양한 필터 조건을 사용하여 길드를 검색합니다.
displayName(부분 일치), 정수 속성(attributes1-5), 참가 정책에 의한 필터링을 지원합니다.
결과는 플레이어 수, 속성 값(오름차순/내림차순), 마지막 업데이트 일시로 정렬할 수 있습니다.
기본적으로 멤버가 정원을 채운 길드는 제외됩니다. includeFullMembersGuild를 true로 설정하면 포함할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||||||||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||||||||||||||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||||||||||||||||||||||||||||
| displayName | string | ~ 64자 | 검색할 길드 표시 이름 | |||||||||||||||||||||||||||||
| attributes1 | List<int> | 0 ~ 10 items | 검색할 속성1 | |||||||||||||||||||||||||||||
| attributes2 | List<int> | 0 ~ 10 items | 검색할 속성2 | |||||||||||||||||||||||||||||
| attributes3 | List<int> | 0 ~ 10 items | 검색할 속성3 | |||||||||||||||||||||||||||||
| attributes4 | List<int> | 0 ~ 10 items | 검색할 속성4 | |||||||||||||||||||||||||||||
| attributes5 | List<int> | 0 ~ 10 items | 검색할 속성5 | |||||||||||||||||||||||||||||
| joinPolicies | List<string> | 0 ~ 10 items | 검색할 길드 참가 방법 목록 | |||||||||||||||||||||||||||||
| includeFullMembersGuild | bool? | false | 길드 멤버가 정원을 채운 길드를 검색 결과에 포함할지 여부 | |||||||||||||||||||||||||||||
| orderBy | 문자열 열거형 enum { “number_of_players”, “attribute1_asc”, “attribute1_desc”, “attribute2_asc”, “attribute2_desc”, “attribute3_asc”, “attribute3_desc”, “attribute4_asc”, “attribute4_desc”, “attribute5_asc”, “attribute5_desc”, “last_updated” } | “number_of_players” | 정렬 순서
| |||||||||||||||||||||||||||||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||||||||||||||||||||||||||||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<Guild> | 길드 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.SearchGuilds(
&guild.SearchGuildsRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
DisplayName: nil,
Attributes1: nil,
Attributes2: nil,
Attributes3: nil,
Attributes4: nil,
Attributes5: nil,
JoinPolicies: nil,
IncludeFullMembersGuild: nil,
OrderBy: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\SearchGuildsRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->searchGuilds(
(new SearchGuildsRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withDisplayName(null)
->withAttributes1(null)
->withAttributes2(null)
->withAttributes3(null)
->withAttributes4(null)
->withAttributes5(null)
->withJoinPolicies(null)
->withIncludeFullMembersGuild(null)
->withOrderBy(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.SearchGuildsRequest;
import io.gs2.guild.result.SearchGuildsResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
SearchGuildsResult result = client.searchGuilds(
new SearchGuildsRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withDisplayName(null)
.withAttributes1(null)
.withAttributes2(null)
.withAttributes3(null)
.withAttributes4(null)
.withAttributes5(null)
.withJoinPolicies(null)
.withIncludeFullMembersGuild(null)
.withOrderBy(null)
.withPageToken(null)
.withLimit(null)
);
List<Guild> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.SearchGuildsResult> asyncResult = null;
yield return client.SearchGuilds(
new Gs2.Gs2Guild.Request.SearchGuildsRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithDisplayName(null)
.WithAttributes1(null)
.WithAttributes2(null)
.WithAttributes3(null)
.WithAttributes4(null)
.WithAttributes5(null)
.WithJoinPolicies(null)
.WithIncludeFullMembersGuild(null)
.WithOrderBy(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.searchGuilds(
new Gs2Guild.SearchGuildsRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withDisplayName(null)
.withAttributes1(null)
.withAttributes2(null)
.withAttributes3(null)
.withAttributes4(null)
.withAttributes5(null)
.withJoinPolicies(null)
.withIncludeFullMembersGuild(null)
.withOrderBy(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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.search_guilds(
guild.SearchGuildsRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_display_name(None)
.with_attributes1(None)
.with_attributes2(None)
.with_attributes3(None)
.with_attributes4(None)
.with_attributes5(None)
.with_join_policies(None)
.with_include_full_members_guild(None)
.with_order_by(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('guild')
api_result = client.search_guilds({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
displayName=nil,
attributes1=nil,
attributes2=nil,
attributes3=nil,
attributes4=nil,
attributes5=nil,
joinPolicies=nil,
includeFullMembersGuild=nil,
orderBy=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('guild')
api_result_handler = client.search_guilds_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
displayName=nil,
attributes1=nil,
attributes2=nil,
attributes3=nil,
attributes4=nil,
attributes5=nil,
joinPolicies=nil,
includeFullMembersGuild=nil,
orderBy=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;searchGuildsByUserId
사용자 ID를 지정하여 길드 검색
다양한 필터 조건을 사용하여 길드를 검색합니다(서버 사이드 조작).
사용자용 버전과 동일한 필터링, 정렬, 정원 초과 길드 제외 옵션이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||||||||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||||||||||||||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||||||||||||||||||||||||||||
| displayName | string | ~ 64자 | 검색할 길드 표시 이름 | |||||||||||||||||||||||||||||
| attributes1 | List<int> | 0 ~ 10 items | 검색할 속성1 | |||||||||||||||||||||||||||||
| attributes2 | List<int> | 0 ~ 10 items | 검색할 속성2 | |||||||||||||||||||||||||||||
| attributes3 | List<int> | 0 ~ 10 items | 검색할 속성3 | |||||||||||||||||||||||||||||
| attributes4 | List<int> | 0 ~ 10 items | 검색할 속성4 | |||||||||||||||||||||||||||||
| attributes5 | List<int> | 0 ~ 10 items | 검색할 속성5 | |||||||||||||||||||||||||||||
| joinPolicies | List<string> | 0 ~ 10 items | 검색할 길드 참가 방법 목록 | |||||||||||||||||||||||||||||
| includeFullMembersGuild | bool? | false | 길드 멤버가 정원을 채운 길드를 검색 결과에 포함할지 여부 | |||||||||||||||||||||||||||||
| orderBy | 문자열 열거형 enum { “number_of_players”, “attribute1_asc”, “attribute1_desc”, “attribute2_asc”, “attribute2_desc”, “attribute3_asc”, “attribute3_desc”, “attribute4_asc”, “attribute4_desc”, “attribute5_asc”, “attribute5_desc”, “last_updated” } | “number_of_players” | 정렬 순서
| |||||||||||||||||||||||||||||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||||||||||||||||||||||||||||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 | ||||||||||||||||||||||||||||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<Guild> | 길드 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.SearchGuildsByUserId(
&guild.SearchGuildsByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
UserId: pointy.String("user-0001"),
DisplayName: nil,
Attributes1: nil,
Attributes2: nil,
Attributes3: nil,
Attributes4: nil,
Attributes5: nil,
JoinPolicies: nil,
IncludeFullMembersGuild: nil,
OrderBy: nil,
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\SearchGuildsByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->searchGuildsByUserId(
(new SearchGuildsByUserIdRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withUserId("user-0001")
->withDisplayName(null)
->withAttributes1(null)
->withAttributes2(null)
->withAttributes3(null)
->withAttributes4(null)
->withAttributes5(null)
->withJoinPolicies(null)
->withIncludeFullMembersGuild(null)
->withOrderBy(null)
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.SearchGuildsByUserIdRequest;
import io.gs2.guild.result.SearchGuildsByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
SearchGuildsByUserIdResult result = client.searchGuildsByUserId(
new SearchGuildsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withUserId("user-0001")
.withDisplayName(null)
.withAttributes1(null)
.withAttributes2(null)
.withAttributes3(null)
.withAttributes4(null)
.withAttributes5(null)
.withJoinPolicies(null)
.withIncludeFullMembersGuild(null)
.withOrderBy(null)
.withPageToken(null)
.withLimit(null)
.withTimeOffsetToken(null)
);
List<Guild> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.SearchGuildsByUserIdResult> asyncResult = null;
yield return client.SearchGuildsByUserId(
new Gs2.Gs2Guild.Request.SearchGuildsByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithUserId("user-0001")
.WithDisplayName(null)
.WithAttributes1(null)
.WithAttributes2(null)
.WithAttributes3(null)
.WithAttributes4(null)
.WithAttributes5(null)
.WithJoinPolicies(null)
.WithIncludeFullMembersGuild(null)
.WithOrderBy(null)
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.searchGuildsByUserId(
new Gs2Guild.SearchGuildsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withUserId("user-0001")
.withDisplayName(null)
.withAttributes1(null)
.withAttributes2(null)
.withAttributes3(null)
.withAttributes4(null)
.withAttributes5(null)
.withJoinPolicies(null)
.withIncludeFullMembersGuild(null)
.withOrderBy(null)
.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.search_guilds_by_user_id(
guild.SearchGuildsByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_user_id('user-0001')
.with_display_name(None)
.with_attributes1(None)
.with_attributes2(None)
.with_attributes3(None)
.with_attributes4(None)
.with_attributes5(None)
.with_join_policies(None)
.with_include_full_members_guild(None)
.with_order_by(None)
.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('guild')
api_result = client.search_guilds_by_user_id({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
userId="user-0001",
displayName=nil,
attributes1=nil,
attributes2=nil,
attributes3=nil,
attributes4=nil,
attributes5=nil,
joinPolicies=nil,
includeFullMembersGuild=nil,
orderBy=nil,
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('guild')
api_result_handler = client.search_guilds_by_user_id_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
userId="user-0001",
displayName=nil,
attributes1=nil,
attributes2=nil,
attributes3=nil,
attributes4=nil,
attributes5=nil,
joinPolicies=nil,
includeFullMembersGuild=nil,
orderBy=nil,
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;createGuild
길드 신규 생성
새로운 길드를 생성하고, 요청한 사용자를 길드 마스터로 자동 등록합니다.
생성 전에 사용자의 maxConcurrentJoinGuilds 제한을 초과하지 않았는지 검증됩니다.
길드에는 표시 이름, 커스텀 속성(attribute1-5), 참가 정책, 커스텀 역할, 기본 멤버 역할을 설정할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| displayName | string | ✓ | ~ 64자 | 표시 이름 UI에서 플레이어에게 표시되는, 사람이 읽을 수 있는 길드 이름입니다. 길드명(시스템에서 생성되는 UUID)과 달리, 표시 이름은 길드 생성자가 설정하며 갱신도 가능합니다. 길드 검색 결과, 멤버 목록, 기타 플레이어 대상 화면에 사용됩니다. | ||||||||
| attribute1 | int | 0 ~ 2147483645 | 속성1 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 레벨, 지역, 플레이 스타일, 활동 요건 등의 커스텀 길드 속성을 정의하기 위해, 최대 5개의 속성을 개발자가 이용할 수 있습니다. | |||||||||
| attribute2 | int | 0 ~ 2147483645 | 속성2 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute3 | int | 0 ~ 2147483645 | 속성3 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute4 | int | 0 ~ 2147483645 | 속성4 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute5 | int | 0 ~ 2147483645 | 속성5 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| metadata | string | ~ 1024자 | 길드 메타데이터 GS2 동작에 영향을 미치지 않는, 길드에 연결된 임의의 데이터입니다. 길드 엠블럼, 설명, 모집 메시지 등 게임 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| memberMetadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| joinPolicy | 문자열 열거형 enum { “anybody”, “approval” } | ✓ | 참가 방침 사용자가 이 길드에 어떻게 참가할 수 있는지를 제어합니다. “anybody” 는 승인 없이 임의의 사용자가 즉시 참가할 수 있습니다. “approval” 은 사용자가 멤버가 되기 전에 길드 마스터 또는 권한을 가진 멤버가 참가 요청을 승인해야 합니다. 길드 마스터가 언제든지 변경할 수 있습니다.
| |||||||||
| customRoles | List<RoleModel> | [] | 0 ~ 10 items | 커스텀 역할 목록 모델 레벨의 역할을 오버라이드하거나 확장하는 길드 고유의 커스텀 역할 정의 목록입니다. 각 길드는 고유한 권한 집합을 가진 최대 10개의 커스텀 역할을 정의할 수 있습니다. 이 역할들은 모델 레벨의 역할에 더해 멤버에게 할당할 수 있습니다. | ||||||||
| guildMemberDefaultRole | string | ~ 128자 | 기본 커스텀 역할 이 특정 길드에 새 멤버가 참가했을 때 자동으로 할당되는 커스텀 역할입니다. 설정한 경우, 이 길드에 대해 길드 모델의 guildMemberDefaultRole 을 오버라이드합니다. customRoles 목록에 정의된 역할을 참조해야 합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 생성한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CreateGuild(
&guild.CreateGuildRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
DisplayName: pointy.String("My Guild"),
Attribute1: pointy.Int32(1),
Attribute2: nil,
Attribute3: nil,
Attribute4: nil,
Attribute5: nil,
Metadata: nil,
MemberMetadata: nil,
JoinPolicy: pointy.String("anybody"),
CustomRoles: nil,
GuildMemberDefaultRole: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CreateGuildRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->createGuild(
(new CreateGuildRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withDisplayName("My Guild")
->withAttribute1(1)
->withAttribute2(null)
->withAttribute3(null)
->withAttribute4(null)
->withAttribute5(null)
->withMetadata(null)
->withMemberMetadata(null)
->withJoinPolicy("anybody")
->withCustomRoles(null)
->withGuildMemberDefaultRole(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CreateGuildRequest;
import io.gs2.guild.result.CreateGuildResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
CreateGuildResult result = client.createGuild(
new CreateGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withMemberMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CreateGuildResult> asyncResult = null;
yield return client.CreateGuild(
new Gs2.Gs2Guild.Request.CreateGuildRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithDisplayName("My Guild")
.WithAttribute1(1)
.WithAttribute2(null)
.WithAttribute3(null)
.WithAttribute4(null)
.WithAttribute5(null)
.WithMetadata(null)
.WithMemberMetadata(null)
.WithJoinPolicy("anybody")
.WithCustomRoles(null)
.WithGuildMemberDefaultRole(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.createGuild(
new Gs2Guild.CreateGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withMemberMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.create_guild(
guild.CreateGuildRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_display_name('My Guild')
.with_attribute1(1)
.with_attribute2(None)
.with_attribute3(None)
.with_attribute4(None)
.with_attribute5(None)
.with_metadata(None)
.with_member_metadata(None)
.with_join_policy('anybody')
.with_custom_roles(None)
.with_guild_member_default_role(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.create_guild({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
memberMetadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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('guild')
api_result_handler = client.create_guild_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
memberMetadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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;createGuildByUserId
사용자 ID를 지정하여 길드 신규 생성
지정된 사용자를 길드 마스터로 하여 새로운 길드를 생성합니다(서버 사이드 조작).
사용자용 버전과 동일한 maxConcurrentJoinGuilds 검증이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| displayName | string | ✓ | ~ 64자 | 표시 이름 UI에서 플레이어에게 표시되는, 사람이 읽을 수 있는 길드 이름입니다. 길드명(시스템에서 생성되는 UUID)과 달리, 표시 이름은 길드 생성자가 설정하며 갱신도 가능합니다. 길드 검색 결과, 멤버 목록, 기타 플레이어 대상 화면에 사용됩니다. | ||||||||
| attribute1 | int | 0 ~ 2147483645 | 속성1 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 레벨, 지역, 플레이 스타일, 활동 요건 등의 커스텀 길드 속성을 정의하기 위해, 최대 5개의 속성을 개발자가 이용할 수 있습니다. | |||||||||
| attribute2 | int | 0 ~ 2147483645 | 속성2 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute3 | int | 0 ~ 2147483645 | 속성3 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute4 | int | 0 ~ 2147483645 | 속성4 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute5 | int | 0 ~ 2147483645 | 속성5 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| metadata | string | ~ 1024자 | 길드 메타데이터 GS2 동작에 영향을 미치지 않는, 길드에 연결된 임의의 데이터입니다. 길드 엠블럼, 설명, 모집 메시지 등 게임 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| memberMetadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| joinPolicy | 문자열 열거형 enum { “anybody”, “approval” } | ✓ | 참가 방침 사용자가 이 길드에 어떻게 참가할 수 있는지를 제어합니다. “anybody” 는 승인 없이 임의의 사용자가 즉시 참가할 수 있습니다. “approval” 은 사용자가 멤버가 되기 전에 길드 마스터 또는 권한을 가진 멤버가 참가 요청을 승인해야 합니다. 길드 마스터가 언제든지 변경할 수 있습니다.
| |||||||||
| customRoles | List<RoleModel> | [] | 0 ~ 10 items | 커스텀 역할 목록 모델 레벨의 역할을 오버라이드하거나 확장하는 길드 고유의 커스텀 역할 정의 목록입니다. 각 길드는 고유한 권한 집합을 가진 최대 10개의 커스텀 역할을 정의할 수 있습니다. 이 역할들은 모델 레벨의 역할에 더해 멤버에게 할당할 수 있습니다. | ||||||||
| guildMemberDefaultRole | string | ~ 128자 | 기본 커스텀 역할 이 특정 길드에 새 멤버가 참가했을 때 자동으로 할당되는 커스텀 역할입니다. 설정한 경우, 이 길드에 대해 길드 모델의 guildMemberDefaultRole 을 오버라이드합니다. customRoles 목록에 정의된 역할을 참조해야 합니다. | |||||||||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 생성한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CreateGuildByUserId(
&guild.CreateGuildByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
DisplayName: pointy.String("My Guild"),
Attribute1: pointy.Int32(1),
Attribute2: nil,
Attribute3: nil,
Attribute4: nil,
Attribute5: nil,
Metadata: nil,
MemberMetadata: nil,
JoinPolicy: pointy.String("anybody"),
CustomRoles: nil,
GuildMemberDefaultRole: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CreateGuildByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->createGuildByUserId(
(new CreateGuildByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-0001")
->withDisplayName("My Guild")
->withAttribute1(1)
->withAttribute2(null)
->withAttribute3(null)
->withAttribute4(null)
->withAttribute5(null)
->withMetadata(null)
->withMemberMetadata(null)
->withJoinPolicy("anybody")
->withCustomRoles(null)
->withGuildMemberDefaultRole(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CreateGuildByUserIdRequest;
import io.gs2.guild.result.CreateGuildByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
CreateGuildByUserIdResult result = client.createGuildByUserId(
new CreateGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withMemberMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
.withTimeOffsetToken(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CreateGuildByUserIdResult> asyncResult = null;
yield return client.CreateGuildByUserId(
new Gs2.Gs2Guild.Request.CreateGuildByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-0001")
.WithDisplayName("My Guild")
.WithAttribute1(1)
.WithAttribute2(null)
.WithAttribute3(null)
.WithAttribute4(null)
.WithAttribute5(null)
.WithMetadata(null)
.WithMemberMetadata(null)
.WithJoinPolicy("anybody")
.WithCustomRoles(null)
.WithGuildMemberDefaultRole(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.createGuildByUserId(
new Gs2Guild.CreateGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withMemberMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.create_guild_by_user_id(
guild.CreateGuildByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-0001')
.with_display_name('My Guild')
.with_attribute1(1)
.with_attribute2(None)
.with_attribute3(None)
.with_attribute4(None)
.with_attribute5(None)
.with_metadata(None)
.with_member_metadata(None)
.with_join_policy('anybody')
.with_custom_roles(None)
.with_guild_member_default_role(None)
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.create_guild_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
memberMetadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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('guild')
api_result_handler = client.create_guild_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
memberMetadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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;getGuild
길드 취득
멤버, 커스텀 속성, 참가 정책, 역할을 포함한 특정 길드의 상세 정보를 취득합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetGuild(
&guild.GetGuildRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetGuildRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getGuild(
(new GetGuildRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetGuildRequest;
import io.gs2.guild.result.GetGuildResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetGuildResult result = client.getGuild(
new GetGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetGuildResult> asyncResult = null;
yield return client.GetGuild(
new Gs2.Gs2Guild.Request.GetGuildRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getGuild(
new Gs2Guild.GetGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_guild(
guild.GetGuildRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_guild({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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('guild')
api_result_handler = client.get_guild_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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;getGuildByUserId
사용자 ID를 지정하여 길드 취득
멤버, 커스텀 속성, 참가 정책, 역할을 포함한 특정 길드의 상세 정보를 취득합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetGuildByUserId(
&guild.GetGuildByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetGuildByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getGuildByUserId(
(new GetGuildByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetGuildByUserIdRequest;
import io.gs2.guild.result.GetGuildByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetGuildByUserIdResult result = client.getGuildByUserId(
new GetGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetGuildByUserIdResult> asyncResult = null;
yield return client.GetGuildByUserId(
new Gs2.Gs2Guild.Request.GetGuildByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getGuildByUserId(
new Gs2Guild.GetGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_guild_by_user_id(
guild.GetGuildByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_guild_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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('guild')
api_result_handler = client.get_guild_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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;updateGuild
길드 업데이트
표시 이름, 커스텀 속성(attribute1-5), 메타데이터, 참가 정책, 커스텀 역할, 기본 멤버 역할을 포함한 길드의 설정을 업데이트합니다.
이전 길드 데이터와 새로운 길드 데이터를 모두 사용하여 UpdateGuildScript 콜백을 실행합니다.
모든 길드 멤버에게 업데이트를 알리는 변경 알림을 전송합니다.
액세스 토큰에는 길드 사용자로 Assume한 액세스 토큰을 지정해 주세요.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.길드를 갱신하려면 해당 역할의 PolicyDocument에 Gs2Guild:UpdateGuild 권한이 필요합니다. | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| displayName | string | ✓ | ~ 64자 | 표시 이름 UI에서 플레이어에게 표시되는, 사람이 읽을 수 있는 길드 이름입니다. 길드명(시스템에서 생성되는 UUID)과 달리, 표시 이름은 길드 생성자가 설정하며 갱신도 가능합니다. 길드 검색 결과, 멤버 목록, 기타 플레이어 대상 화면에 사용됩니다. | ||||||||
| attribute1 | int | 0 ~ 2147483645 | 속성1 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 레벨, 지역, 플레이 스타일, 활동 요건 등의 커스텀 길드 속성을 정의하기 위해, 최대 5개의 속성을 개발자가 이용할 수 있습니다. | |||||||||
| attribute2 | int | 0 ~ 2147483645 | 속성2 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute3 | int | 0 ~ 2147483645 | 속성3 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute4 | int | 0 ~ 2147483645 | 속성4 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute5 | int | 0 ~ 2147483645 | 속성5 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| metadata | string | ~ 1024자 | 길드 메타데이터 GS2 동작에 영향을 미치지 않는, 길드에 연결된 임의의 데이터입니다. 길드 엠블럼, 설명, 모집 메시지 등 게임 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| joinPolicy | 문자열 열거형 enum { “anybody”, “approval” } | ✓ | 참가 방침 사용자가 이 길드에 어떻게 참가할 수 있는지를 제어합니다. “anybody” 는 승인 없이 임의의 사용자가 즉시 참가할 수 있습니다. “approval” 은 사용자가 멤버가 되기 전에 길드 마스터 또는 권한을 가진 멤버가 참가 요청을 승인해야 합니다. 길드 마스터가 언제든지 변경할 수 있습니다.
| |||||||||
| customRoles | List<RoleModel> | [] | 0 ~ 10 items | 커스텀 역할 목록 모델 레벨의 역할을 오버라이드하거나 확장하는 길드 고유의 커스텀 역할 정의 목록입니다. 각 길드는 고유한 권한 집합을 가진 최대 10개의 커스텀 역할을 정의할 수 있습니다. 이 역할들은 모델 레벨의 역할에 더해 멤버에게 할당할 수 있습니다. | ||||||||
| guildMemberDefaultRole | string | ~ 128자 | 기본 커스텀 역할 이 특정 길드에 새 멤버가 참가했을 때 자동으로 할당되는 커스텀 역할입니다. 설정한 경우, 이 길드에 대해 길드 모델의 guildMemberDefaultRole 을 오버라이드합니다. customRoles 목록에 정의된 역할을 참조해야 합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateGuild(
&guild.UpdateGuildRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
DisplayName: pointy.String("My Guild"),
Attribute1: pointy.Int32(1),
Attribute2: nil,
Attribute3: nil,
Attribute4: nil,
Attribute5: nil,
Metadata: nil,
JoinPolicy: pointy.String("anybody"),
CustomRoles: nil,
GuildMemberDefaultRole: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateGuildRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateGuild(
(new UpdateGuildRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withDisplayName("My Guild")
->withAttribute1(1)
->withAttribute2(null)
->withAttribute3(null)
->withAttribute4(null)
->withAttribute5(null)
->withMetadata(null)
->withJoinPolicy("anybody")
->withCustomRoles(null)
->withGuildMemberDefaultRole(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateGuildRequest;
import io.gs2.guild.result.UpdateGuildResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateGuildResult result = client.updateGuild(
new UpdateGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildResult> asyncResult = null;
yield return client.UpdateGuild(
new Gs2.Gs2Guild.Request.UpdateGuildRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithDisplayName("My Guild")
.WithAttribute1(1)
.WithAttribute2(null)
.WithAttribute3(null)
.WithAttribute4(null)
.WithAttribute5(null)
.WithMetadata(null)
.WithJoinPolicy("anybody")
.WithCustomRoles(null)
.WithGuildMemberDefaultRole(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateGuild(
new Gs2Guild.UpdateGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_guild(
guild.UpdateGuildRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_display_name('My Guild')
.with_attribute1(1)
.with_attribute2(None)
.with_attribute3(None)
.with_attribute4(None)
.with_attribute5(None)
.with_metadata(None)
.with_join_policy('anybody')
.with_custom_roles(None)
.with_guild_member_default_role(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_guild({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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('guild')
api_result_handler = client.update_guild_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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;updateGuildByGuildName
길드 이름을 지정하여 길드 업데이트
지정된 길드의 설정을 업데이트합니다(서버 사이드 조작).
길드 사용자용 버전과 동일한 UpdateGuildScript 콜백, 멤버 변경 알림이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| displayName | string | ✓ | ~ 64자 | 표시 이름 UI에서 플레이어에게 표시되는, 사람이 읽을 수 있는 길드 이름입니다. 길드명(시스템에서 생성되는 UUID)과 달리, 표시 이름은 길드 생성자가 설정하며 갱신도 가능합니다. 길드 검색 결과, 멤버 목록, 기타 플레이어 대상 화면에 사용됩니다. | ||||||||
| attribute1 | int | 0 ~ 2147483645 | 속성1 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 레벨, 지역, 플레이 스타일, 활동 요건 등의 커스텀 길드 속성을 정의하기 위해, 최대 5개의 속성을 개발자가 이용할 수 있습니다. | |||||||||
| attribute2 | int | 0 ~ 2147483645 | 속성2 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute3 | int | 0 ~ 2147483645 | 속성3 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute4 | int | 0 ~ 2147483645 | 속성4 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| attribute5 | int | 0 ~ 2147483645 | 속성5 길드 검색에서 필터링이나 정렬에 사용할 수 있는 길드의 숫자 속성입니다. 자세한 내용은 attribute1 을 참조하십시오. | |||||||||
| metadata | string | ~ 1024자 | 길드 메타데이터 GS2 동작에 영향을 미치지 않는, 길드에 연결된 임의의 데이터입니다. 길드 엠블럼, 설명, 모집 메시지 등 게임 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||||||||
| joinPolicy | 문자열 열거형 enum { “anybody”, “approval” } | ✓ | 참가 방침 사용자가 이 길드에 어떻게 참가할 수 있는지를 제어합니다. “anybody” 는 승인 없이 임의의 사용자가 즉시 참가할 수 있습니다. “approval” 은 사용자가 멤버가 되기 전에 길드 마스터 또는 권한을 가진 멤버가 참가 요청을 승인해야 합니다. 길드 마스터가 언제든지 변경할 수 있습니다.
| |||||||||
| customRoles | List<RoleModel> | [] | 0 ~ 10 items | 커스텀 역할 목록 모델 레벨의 역할을 오버라이드하거나 확장하는 길드 고유의 커스텀 역할 정의 목록입니다. 각 길드는 고유한 권한 집합을 가진 최대 10개의 커스텀 역할을 정의할 수 있습니다. 이 역할들은 모델 레벨의 역할에 더해 멤버에게 할당할 수 있습니다. | ||||||||
| guildMemberDefaultRole | string | ~ 128자 | 기본 커스텀 역할 이 특정 길드에 새 멤버가 참가했을 때 자동으로 할당되는 커스텀 역할입니다. 설정한 경우, 이 길드에 대해 길드 모델의 guildMemberDefaultRole 을 오버라이드합니다. customRoles 목록에 정의된 역할을 참조해야 합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateGuildByGuildName(
&guild.UpdateGuildByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildName: pointy.String("guild-0001"),
GuildModelName: pointy.String("guild-model-0001"),
DisplayName: pointy.String("My Guild"),
Attribute1: pointy.Int32(1),
Attribute2: nil,
Attribute3: nil,
Attribute4: nil,
Attribute5: nil,
Metadata: nil,
JoinPolicy: pointy.String("anybody"),
CustomRoles: nil,
GuildMemberDefaultRole: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateGuildByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateGuildByGuildName(
(new UpdateGuildByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildName("guild-0001")
->withGuildModelName("guild-model-0001")
->withDisplayName("My Guild")
->withAttribute1(1)
->withAttribute2(null)
->withAttribute3(null)
->withAttribute4(null)
->withAttribute5(null)
->withMetadata(null)
->withJoinPolicy("anybody")
->withCustomRoles(null)
->withGuildMemberDefaultRole(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateGuildByGuildNameRequest;
import io.gs2.guild.result.UpdateGuildByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateGuildByGuildNameResult result = client.updateGuildByGuildName(
new UpdateGuildByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildName("guild-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildByGuildNameResult> asyncResult = null;
yield return client.UpdateGuildByGuildName(
new Gs2.Gs2Guild.Request.UpdateGuildByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildName("guild-0001")
.WithGuildModelName("guild-model-0001")
.WithDisplayName("My Guild")
.WithAttribute1(1)
.WithAttribute2(null)
.WithAttribute3(null)
.WithAttribute4(null)
.WithAttribute5(null)
.WithMetadata(null)
.WithJoinPolicy("anybody")
.WithCustomRoles(null)
.WithGuildMemberDefaultRole(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateGuildByGuildName(
new Gs2Guild.UpdateGuildByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildName("guild-0001")
.withGuildModelName("guild-model-0001")
.withDisplayName("My Guild")
.withAttribute1(1)
.withAttribute2(null)
.withAttribute3(null)
.withAttribute4(null)
.withAttribute5(null)
.withMetadata(null)
.withJoinPolicy("anybody")
.withCustomRoles(null)
.withGuildMemberDefaultRole(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_guild_by_guild_name(
guild.UpdateGuildByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_name('guild-0001')
.with_guild_model_name('guild-model-0001')
.with_display_name('My Guild')
.with_attribute1(1)
.with_attribute2(None)
.with_attribute3(None)
.with_attribute4(None)
.with_attribute5(None)
.with_metadata(None)
.with_join_policy('anybody')
.with_custom_roles(None)
.with_guild_member_default_role(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_guild_by_guild_name({
namespaceName="namespace-0001",
guildName="guild-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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('guild')
api_result_handler = client.update_guild_by_guild_name_async({
namespaceName="namespace-0001",
guildName="guild-0001",
guildModelName="guild-model-0001",
displayName="My Guild",
attribute1=1,
attribute2=nil,
attribute3=nil,
attribute4=nil,
attribute5=nil,
metadata=nil,
joinPolicy="anybody",
customRoles=nil,
guildMemberDefaultRole=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;deleteMember
멤버 제명
지정된 사용자를 길드의 멤버 목록에서 삭제합니다.
삭제 전에 제명 후에도 길드에 최소 1명의 길드 마스터가 남아 있는지 검증합니다. 대상 사용자가 마지막 길드 마스터인 경우, GuildMasterRequired 오류로 작업이 거부됩니다.
액세스 토큰에는 길드 사용자로 Assume한 액세스 토큰을 지정해 주세요.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.멤버를 제명하려면 해당 역할의 PolicyDocument에 Gs2Guild:DeleteMember 권한이 필요합니다. | ||
| targetUserId | string | ✓ | ~ 128자 | 제명할 사용자 ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteMember(
&guild.DeleteMemberRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
TargetUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteMemberRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteMember(
(new DeleteMemberRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withTargetUserId("user-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteMemberRequest;
import io.gs2.guild.result.DeleteMemberResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteMemberResult result = client.deleteMember(
new DeleteMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withTargetUserId("user-0002")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteMemberResult> asyncResult = null;
yield return client.DeleteMember(
new Gs2.Gs2Guild.Request.DeleteMemberRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithTargetUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteMember(
new Gs2Guild.DeleteMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withTargetUserId("user-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_member(
guild.DeleteMemberRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_target_user_id('user-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_member({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
targetUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.delete_member_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
targetUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;deleteMemberByGuildName
길드 이름을 지정하여 멤버 제명
지정된 길드의 멤버 목록에서 지정된 사용자를 삭제합니다(서버 사이드 조작).
길드 사용자용 버전과 동일한 길드 마스터 수 검증(GuildMasterRequired)이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| targetUserId | string | ✓ | ~ 128자 | 제명할 사용자 ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteMemberByGuildName(
&guild.DeleteMemberByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TargetUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteMemberByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteMemberByGuildName(
(new DeleteMemberByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withTargetUserId("user-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteMemberByGuildNameRequest;
import io.gs2.guild.result.DeleteMemberByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteMemberByGuildNameResult result = client.deleteMemberByGuildName(
new DeleteMemberByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTargetUserId("user-0002")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteMemberByGuildNameResult> asyncResult = null;
yield return client.DeleteMemberByGuildName(
new Gs2.Gs2Guild.Request.DeleteMemberByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithTargetUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteMemberByGuildName(
new Gs2Guild.DeleteMemberByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTargetUserId("user-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_member_by_guild_name(
guild.DeleteMemberByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_target_user_id('user-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_member_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
targetUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.delete_member_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
targetUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;updateMemberRole
멤버 역할 업데이트
특정 길드 멤버의 역할을 지정된 역할 이름으로 변경합니다.
업데이트 전에 대상 사용자가 길드의 멤버인지 검증합니다.
멤버의 역할 업데이트 타임스탬프도 갱신됩니다.
액세스 토큰에는 길드 사용자로 Assume한 액세스 토큰을 지정해 주세요.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.멤버의 역할을 갱신하려면 해당 역할의 PolicyDocument에 Gs2Guild:UpdateMemberRole 권한이 필요합니다. | ||
| targetUserId | string | ✓ | ~ 128자 | 업데이트할 사용자 ID | ||
| roleName | string | ✓ | ~ 128자 | 롤 모델 이름 롤 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateMemberRole(
&guild.UpdateMemberRoleRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
TargetUserId: pointy.String("user-0002"),
RoleName: pointy.String("role-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateMemberRoleRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateMemberRole(
(new UpdateMemberRoleRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withTargetUserId("user-0002")
->withRoleName("role-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateMemberRoleRequest;
import io.gs2.guild.result.UpdateMemberRoleResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateMemberRoleResult result = client.updateMemberRole(
new UpdateMemberRoleRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withTargetUserId("user-0002")
.withRoleName("role-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberRoleResult> asyncResult = null;
yield return client.UpdateMemberRole(
new Gs2.Gs2Guild.Request.UpdateMemberRoleRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithTargetUserId("user-0002")
.WithRoleName("role-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateMemberRole(
new Gs2Guild.UpdateMemberRoleRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withTargetUserId("user-0002")
.withRoleName("role-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_member_role(
guild.UpdateMemberRoleRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_target_user_id('user-0002')
.with_role_name('role-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_member_role({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
targetUserId="user-0002",
roleName="role-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('guild')
api_result_handler = client.update_member_role_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
targetUserId="user-0002",
roleName="role-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;updateMemberRoleByGuildName
길드 이름을 지정하여 멤버 역할 업데이트
지정된 길드의 특정 멤버의 역할을 변경합니다(서버 사이드 조작).
길드 사용자용 버전과 동일한 멤버 검증, 타임스탬프 업데이트가 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| targetUserId | string | ✓ | ~ 128자 | 업데이트할 사용자 ID | ||
| roleName | string | ✓ | ~ 128자 | 롤 모델 이름 롤 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateMemberRoleByGuildName(
&guild.UpdateMemberRoleByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TargetUserId: pointy.String("user-0002"),
RoleName: pointy.String("role-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateMemberRoleByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateMemberRoleByGuildName(
(new UpdateMemberRoleByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withTargetUserId("user-0002")
->withRoleName("role-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateMemberRoleByGuildNameRequest;
import io.gs2.guild.result.UpdateMemberRoleByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateMemberRoleByGuildNameResult result = client.updateMemberRoleByGuildName(
new UpdateMemberRoleByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTargetUserId("user-0002")
.withRoleName("role-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberRoleByGuildNameResult> asyncResult = null;
yield return client.UpdateMemberRoleByGuildName(
new Gs2.Gs2Guild.Request.UpdateMemberRoleByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithTargetUserId("user-0002")
.WithRoleName("role-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateMemberRoleByGuildName(
new Gs2Guild.UpdateMemberRoleByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTargetUserId("user-0002")
.withRoleName("role-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_member_role_by_guild_name(
guild.UpdateMemberRoleByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_target_user_id('user-0002')
.with_role_name('role-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_member_role_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
targetUserId="user-0002",
roleName="role-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('guild')
api_result_handler = client.update_member_role_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
targetUserId="user-0002",
roleName="role-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;batchUpdateMemberRole
멤버 역할 일괄 업데이트
단일 작업으로 여러 길드 멤버의 역할을 업데이트합니다.
요청에서 지정된 멤버만 업데이트되며, 목록에 포함되지 않은 멤버는 현재 역할을 유지합니다.
액세스 토큰에는 길드 사용자로 Assume한 액세스 토큰을 지정해 주세요.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.변경을 수행하려면 해당 역할의 PolicyDocument에 Gs2Guild:BatchUpdateMemberRole 권한이 필요합니다. | ||
| members | List<Member> | ✓ | 1 ~ 100 items | 업데이트할 멤버 목록 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.BatchUpdateMemberRole(
&guild.BatchUpdateMemberRoleRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
Members: []guild.Member{
guild.Member{
UserId: pointy.String("user-0002"),
RoleName: pointy.String("role-0001"),
},
guild.Member{
UserId: pointy.String("user-0003"),
RoleName: pointy.String("role-0002"),
},
},
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\BatchUpdateMemberRoleRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->batchUpdateMemberRole(
(new BatchUpdateMemberRoleRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withMembers([
(new Member())
->withUserId("user-0002")
->withRoleName("role-0001"),
(new Member())
->withUserId("user-0003")
->withRoleName("role-0002"),
])
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.BatchUpdateMemberRoleRequest;
import io.gs2.guild.result.BatchUpdateMemberRoleResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
BatchUpdateMemberRoleResult result = client.batchUpdateMemberRole(
new BatchUpdateMemberRoleRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withMembers(Arrays.asList(
new Member()
.withUserId("user-0002")
.withRoleName("role-0001"),
new Member()
.withUserId("user-0003")
.withRoleName("role-0002")
))
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.BatchUpdateMemberRoleResult> asyncResult = null;
yield return client.BatchUpdateMemberRole(
new Gs2.Gs2Guild.Request.BatchUpdateMemberRoleRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithMembers(new Gs2.Gs2Guild.Model.Member[] {
new Gs2.Gs2Guild.Model.Member()
.WithUserId("user-0002")
.WithRoleName("role-0001"),
new Gs2.Gs2Guild.Model.Member()
.WithUserId("user-0003")
.WithRoleName("role-0002"),
}),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.batchUpdateMemberRole(
new Gs2Guild.BatchUpdateMemberRoleRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withMembers([
new Gs2Guild.model.Member()
.withUserId("user-0002")
.withRoleName("role-0001"),
new Gs2Guild.model.Member()
.withUserId("user-0003")
.withRoleName("role-0002"),
])
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.batch_update_member_role(
guild.BatchUpdateMemberRoleRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_members([
guild.Member()
.with_user_id('user-0002')
.with_role_name('role-0001'),
guild.Member()
.with_user_id('user-0003')
.with_role_name('role-0002'),
])
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.batch_update_member_role({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
members={
{
user_id="user-0002",
role_name="role-0001",
},
{
user_id="user-0003",
role_name="role-0002",
}
},
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.batch_update_member_role_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
members={
{
user_id="user-0002",
role_name="role-0001",
},
{
user_id="user-0003",
role_name="role-0002",
}
},
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;batchUpdateMemberRoleByGuildName
길드 이름을 지정하여 멤버 역할 일괄 업데이트
지정된 길드의 여러 멤버의 역할을 단일 작업으로 업데이트합니다(서버 사이드 조작).
요청에서 지정된 멤버만 업데이트되며, 포함되지 않은 멤버는 현재 역할을 유지합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| members | List<Member> | ✓ | 1 ~ 100 items | 업데이트할 멤버 목록 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.BatchUpdateMemberRoleByGuildName(
&guild.BatchUpdateMemberRoleByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
Members: []guild.Member{
guild.Member{
UserId: pointy.String("user-0002"),
RoleName: pointy.String("role-0001"),
},
guild.Member{
UserId: pointy.String("user-0003"),
RoleName: pointy.String("role-0002"),
},
},
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\BatchUpdateMemberRoleByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->batchUpdateMemberRoleByGuildName(
(new BatchUpdateMemberRoleByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withMembers([
(new Member())
->withUserId("user-0002")
->withRoleName("role-0001"),
(new Member())
->withUserId("user-0003")
->withRoleName("role-0002"),
])
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.BatchUpdateMemberRoleByGuildNameRequest;
import io.gs2.guild.result.BatchUpdateMemberRoleByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
BatchUpdateMemberRoleByGuildNameResult result = client.batchUpdateMemberRoleByGuildName(
new BatchUpdateMemberRoleByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withMembers(Arrays.asList(
new Member()
.withUserId("user-0002")
.withRoleName("role-0001"),
new Member()
.withUserId("user-0003")
.withRoleName("role-0002")
))
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.BatchUpdateMemberRoleByGuildNameResult> asyncResult = null;
yield return client.BatchUpdateMemberRoleByGuildName(
new Gs2.Gs2Guild.Request.BatchUpdateMemberRoleByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithMembers(new Gs2.Gs2Guild.Model.Member[] {
new Gs2.Gs2Guild.Model.Member()
.WithUserId("user-0002")
.WithRoleName("role-0001"),
new Gs2.Gs2Guild.Model.Member()
.WithUserId("user-0003")
.WithRoleName("role-0002"),
}),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.batchUpdateMemberRoleByGuildName(
new Gs2Guild.BatchUpdateMemberRoleByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withMembers([
new Gs2Guild.model.Member()
.withUserId("user-0002")
.withRoleName("role-0001"),
new Gs2Guild.model.Member()
.withUserId("user-0003")
.withRoleName("role-0002"),
])
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.batch_update_member_role_by_guild_name(
guild.BatchUpdateMemberRoleByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_members([
guild.Member()
.with_user_id('user-0002')
.with_role_name('role-0001'),
guild.Member()
.with_user_id('user-0003')
.with_role_name('role-0002'),
])
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.batch_update_member_role_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
members={
{
user_id="user-0002",
role_name="role-0001",
},
{
user_id="user-0003",
role_name="role-0002",
}
},
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.batch_update_member_role_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
members={
{
user_id="user-0002",
role_name="role-0001",
},
{
user_id="user-0003",
role_name="role-0002",
}
},
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;deleteGuild
길드 삭제
길드 및 관련된 모든 데이터를 삭제합니다.
모든 길드 멤버가 삭제되며, 각 멤버의 LeaveGuildScript 콜백이 실행되고, LeaveNotification이 전송됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.길드를 삭제하려면 해당 역할의 PolicyDocument에 Gs2Guild:DeleteGuild 권한이 필요합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 삭제한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteGuild(
&guild.DeleteGuildRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteGuildRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteGuild(
(new DeleteGuildRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteGuildRequest;
import io.gs2.guild.result.DeleteGuildResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteGuildResult result = client.deleteGuild(
new DeleteGuildRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildResult> asyncResult = null;
yield return client.DeleteGuild(
new Gs2.Gs2Guild.Request.DeleteGuildRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteGuild(
new Gs2Guild.DeleteGuildRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_guild(
guild.DeleteGuildRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_guild({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.delete_guild_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;deleteGuildByGuildName
길드 이름을 지정하여 길드 삭제
지정된 길드 및 관련된 모든 데이터를 삭제합니다(서버 사이드 조작).
길드 사용자용 버전과 동일한 LeaveGuildScript 콜백, LeaveNotification이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 삭제한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteGuildByGuildName(
&guild.DeleteGuildByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteGuildByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteGuildByGuildName(
(new DeleteGuildByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteGuildByGuildNameRequest;
import io.gs2.guild.result.DeleteGuildByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteGuildByGuildNameResult result = client.deleteGuildByGuildName(
new DeleteGuildByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildByGuildNameResult> asyncResult = null;
yield return client.DeleteGuildByGuildName(
new Gs2.Gs2Guild.Request.DeleteGuildByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteGuildByGuildName(
new Gs2Guild.DeleteGuildByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_guild_by_guild_name(
guild.DeleteGuildByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_guild_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-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('guild')
api_result_handler = client.delete_guild_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-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;increaseMaximumCurrentMaximumMemberCountByGuildName
길드 이름을 지정하여 최대 참가 가능 인원 추가
길드의 currentMaximumMemberCount를 지정된 값만큼 증가시킵니다.
결과 값은 길드 모델에서 정의된 maximumMemberCount를 초과할 수 없습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| value | int | 1 ~ 2147483646 | 최대 인원수의 증가량 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.IncreaseMaximumCurrentMaximumMemberCountByGuildName(
&guild.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
Value: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->increaseMaximumCurrentMaximumMemberCountByGuildName(
(new IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withValue(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
import io.gs2.guild.result.IncreaseMaximumCurrentMaximumMemberCountByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
IncreaseMaximumCurrentMaximumMemberCountByGuildNameResult result = client.increaseMaximumCurrentMaximumMemberCountByGuildName(
new IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withValue(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.IncreaseMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.IncreaseMaximumCurrentMaximumMemberCountByGuildName(
new Gs2.Gs2Guild.Request.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithValue(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.increaseMaximumCurrentMaximumMemberCountByGuildName(
new Gs2Guild.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withValue(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.increase_maximum_current_maximum_member_count_by_guild_name(
guild.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_value(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.increase_maximum_current_maximum_member_count_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
value=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('guild')
api_result_handler = client.increase_maximum_current_maximum_member_count_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
value=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;decreaseMaximumCurrentMaximumMemberCount
최대 참가 가능 인원 감소
길드의 currentMaximumMemberCount를 지정된 값만큼 감소시킵니다.
결과 값은 0 미만이 될 수 없습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.감산을 수행하려면 해당 역할의 PolicyDocument에 Gs2Guild:DecreaseCurrentMaximumMemberCount 권한이 필요합니다. | ||
| value | int | 1 ~ 2147483646 | 최대 인원수의 감소량 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DecreaseMaximumCurrentMaximumMemberCount(
&guild.DecreaseMaximumCurrentMaximumMemberCountRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
Value: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DecreaseMaximumCurrentMaximumMemberCountRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->decreaseMaximumCurrentMaximumMemberCount(
(new DecreaseMaximumCurrentMaximumMemberCountRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withValue(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DecreaseMaximumCurrentMaximumMemberCountRequest;
import io.gs2.guild.result.DecreaseMaximumCurrentMaximumMemberCountResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DecreaseMaximumCurrentMaximumMemberCountResult result = client.decreaseMaximumCurrentMaximumMemberCount(
new DecreaseMaximumCurrentMaximumMemberCountRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withValue(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountResult> asyncResult = null;
yield return client.DecreaseMaximumCurrentMaximumMemberCount(
new Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithValue(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.decreaseMaximumCurrentMaximumMemberCount(
new Gs2Guild.DecreaseMaximumCurrentMaximumMemberCountRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withValue(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.decrease_maximum_current_maximum_member_count(
guild.DecreaseMaximumCurrentMaximumMemberCountRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_value(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.decrease_maximum_current_maximum_member_count({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
value=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('guild')
api_result_handler = client.decrease_maximum_current_maximum_member_count_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
value=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;decreaseMaximumCurrentMaximumMemberCountByGuildName
길드 이름을 지정하여 최대 참가 가능 인원 감소
지정된 길드의 currentMaximumMemberCount를 지정된 값만큼 감소시킵니다(서버 사이드 조작).
결과 값은 0 미만이 될 수 없습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| value | int | 1 ~ 2147483646 | 최대 인원수의 감소량 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DecreaseMaximumCurrentMaximumMemberCountByGuildName(
&guild.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
Value: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->decreaseMaximumCurrentMaximumMemberCountByGuildName(
(new DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withValue(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
import io.gs2.guild.result.DecreaseMaximumCurrentMaximumMemberCountByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DecreaseMaximumCurrentMaximumMemberCountByGuildNameResult result = client.decreaseMaximumCurrentMaximumMemberCountByGuildName(
new DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withValue(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.DecreaseMaximumCurrentMaximumMemberCountByGuildName(
new Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithValue(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.decreaseMaximumCurrentMaximumMemberCountByGuildName(
new Gs2Guild.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withValue(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.decrease_maximum_current_maximum_member_count_by_guild_name(
guild.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_value(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.decrease_maximum_current_maximum_member_count_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
value=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('guild')
api_result_handler = client.decrease_maximum_current_maximum_member_count_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
value=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;verifyCurrentMaximumMemberCount
최대 참가 가능 인원수 검증
선택된 비교 연산자를 사용하여 길드의 currentMaximumMemberCount를 지정된 값과 비교 검증합니다.
지원되는 연산자: less, lessEqual, greater, greaterEqual, equal, notEqual.
검증에 실패하면 오류가 반환됩니다. 트랜잭션의 조건부 로직에 사용할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.검증을 수행하려면 해당 역할의 PolicyDocument에 Gs2Guild:VerifyCurrentMaximumMemberCount 권한이 필요합니다. | ||||||||||||||||
| verifyType | 문자열 열거형 enum { “less”, “lessEqual”, “greater”, “greaterEqual”, “equal”, “notEqual” } | ✓ | 검증 종류
| |||||||||||||||||
| value | int | 1 ~ 2147483646 | 최대 참가 가능 인원수 | |||||||||||||||||
| multiplyValueSpecifyingQuantity | bool | false | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.VerifyCurrentMaximumMemberCount(
&guild.VerifyCurrentMaximumMemberCountRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: ,
VerifyType: pointy.String("less"),
Value: pointy.Int32(10),
MultiplyValueSpecifyingQuantity: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\VerifyCurrentMaximumMemberCountRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->verifyCurrentMaximumMemberCount(
(new VerifyCurrentMaximumMemberCountRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken()
->withVerifyType("less")
->withValue(10)
->withMultiplyValueSpecifyingQuantity(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.VerifyCurrentMaximumMemberCountRequest;
import io.gs2.guild.result.VerifyCurrentMaximumMemberCountResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
VerifyCurrentMaximumMemberCountResult result = client.verifyCurrentMaximumMemberCount(
new VerifyCurrentMaximumMemberCountRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
.withVerifyType("less")
.withValue(10)
.withMultiplyValueSpecifyingQuantity(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountResult> asyncResult = null;
yield return client.VerifyCurrentMaximumMemberCount(
new Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken()
.WithVerifyType("less")
.WithValue(10)
.WithMultiplyValueSpecifyingQuantity(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.verifyCurrentMaximumMemberCount(
new Gs2Guild.VerifyCurrentMaximumMemberCountRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
.withVerifyType("less")
.withValue(10)
.withMultiplyValueSpecifyingQuantity(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.verify_current_maximum_member_count(
guild.VerifyCurrentMaximumMemberCountRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token()
.with_verify_type('less')
.with_value(10)
.with_multiply_value_specifying_quantity(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.verify_current_maximum_member_count({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
verifyType="less",
value=10,
multiplyValueSpecifyingQuantity=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('guild')
api_result_handler = client.verify_current_maximum_member_count_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
verifyType="less",
value=10,
multiplyValueSpecifyingQuantity=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;verifyCurrentMaximumMemberCountByGuildName
길드 이름을 지정하여 최대 참가 가능 인원수 검증
선택된 비교 연산자를 사용하여 지정된 길드의 currentMaximumMemberCount를 지정된 값과 비교 검증합니다(서버 사이드 조작).
지원되는 연산자: less, lessEqual, greater, greaterEqual, equal, notEqual.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||||||||||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||||||||||||||||
| verifyType | 문자열 열거형 enum { “less”, “lessEqual”, “greater”, “greaterEqual”, “equal”, “notEqual” } | ✓ | 검증 종류
| |||||||||||||||||
| value | int | 1 ~ 2147483646 | 최대 참가 가능 인원수 | |||||||||||||||||
| multiplyValueSpecifyingQuantity | bool | false | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.VerifyCurrentMaximumMemberCountByGuildName(
&guild.VerifyCurrentMaximumMemberCountByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
VerifyType: pointy.String("less"),
Value: pointy.Int32(10),
MultiplyValueSpecifyingQuantity: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\VerifyCurrentMaximumMemberCountByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->verifyCurrentMaximumMemberCountByGuildName(
(new VerifyCurrentMaximumMemberCountByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withVerifyType("less")
->withValue(10)
->withMultiplyValueSpecifyingQuantity(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.VerifyCurrentMaximumMemberCountByGuildNameRequest;
import io.gs2.guild.result.VerifyCurrentMaximumMemberCountByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
VerifyCurrentMaximumMemberCountByGuildNameResult result = client.verifyCurrentMaximumMemberCountByGuildName(
new VerifyCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withVerifyType("less")
.withValue(10)
.withMultiplyValueSpecifyingQuantity(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.VerifyCurrentMaximumMemberCountByGuildName(
new Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithVerifyType("less")
.WithValue(10)
.WithMultiplyValueSpecifyingQuantity(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.verifyCurrentMaximumMemberCountByGuildName(
new Gs2Guild.VerifyCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withVerifyType("less")
.withValue(10)
.withMultiplyValueSpecifyingQuantity(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.verify_current_maximum_member_count_by_guild_name(
guild.VerifyCurrentMaximumMemberCountByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_verify_type('less')
.with_value(10)
.with_multiply_value_specifying_quantity(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.verify_current_maximum_member_count_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
verifyType="less",
value=10,
multiplyValueSpecifyingQuantity=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('guild')
api_result_handler = client.verify_current_maximum_member_count_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
verifyType="less",
value=10,
multiplyValueSpecifyingQuantity=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;verifyIncludeMember
길드 멤버에 사용자 ID가 포함되어 있는지 검증
지정된 사용자가 길드의 멤버인지 여부를 검증합니다.
2가지 검증 유형을 지원합니다: ‘include’는 사용자가 길드 멤버임을 확인하고, ’notInclude’는 사용자가 길드 멤버가 아님을 확인합니다.
검증에 실패하면 오류가 반환됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |||||||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||||||||
| verifyType | 문자열 열거형 enum { “include”, “notInclude” } | ✓ | 검증 종류
|
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.VerifyIncludeMember(
&guild.VerifyIncludeMemberRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
AccessToken: pointy.String("accessToken-0001"),
VerifyType: pointy.String("include"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\VerifyIncludeMemberRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->verifyIncludeMember(
(new VerifyIncludeMemberRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withAccessToken("accessToken-0001")
->withVerifyType("include")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.VerifyIncludeMemberRequest;
import io.gs2.guild.result.VerifyIncludeMemberResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
VerifyIncludeMemberResult result = client.verifyIncludeMember(
new VerifyIncludeMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withAccessToken("accessToken-0001")
.withVerifyType("include")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.VerifyIncludeMemberResult> asyncResult = null;
yield return client.VerifyIncludeMember(
new Gs2.Gs2Guild.Request.VerifyIncludeMemberRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithAccessToken("accessToken-0001")
.WithVerifyType("include"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.verifyIncludeMember(
new Gs2Guild.VerifyIncludeMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withAccessToken("accessToken-0001")
.withVerifyType("include")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.verify_include_member(
guild.VerifyIncludeMemberRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_access_token('accessToken-0001')
.with_verify_type('include')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.verify_include_member({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
accessToken="accessToken-0001",
verifyType="include",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.verify_include_member_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
accessToken="accessToken-0001",
verifyType="include",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;verifyIncludeMemberByUserId
사용자 ID를 지정하여 길드 멤버에 사용자 ID가 포함되어 있는지 검증
지정된 사용자가 길드의 멤버인지 여부를 검증합니다(서버 사이드 조작).
2가지 검증 유형을 지원합니다: ‘include’와 ’notInclude’.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |||||||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||||||||
| verifyType | 문자열 열거형 enum { “include”, “notInclude” } | ✓ | 검증 종류
| |||||||||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.VerifyIncludeMemberByUserId(
&guild.VerifyIncludeMemberByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
UserId: pointy.String("user-0001"),
VerifyType: pointy.String("include"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\VerifyIncludeMemberByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->verifyIncludeMemberByUserId(
(new VerifyIncludeMemberByUserIdRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withUserId("user-0001")
->withVerifyType("include")
->withTimeOffsetToken(null)
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.VerifyIncludeMemberByUserIdRequest;
import io.gs2.guild.result.VerifyIncludeMemberByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
VerifyIncludeMemberByUserIdResult result = client.verifyIncludeMemberByUserId(
new VerifyIncludeMemberByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withUserId("user-0001")
.withVerifyType("include")
.withTimeOffsetToken(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.VerifyIncludeMemberByUserIdResult> asyncResult = null;
yield return client.VerifyIncludeMemberByUserId(
new Gs2.Gs2Guild.Request.VerifyIncludeMemberByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithUserId("user-0001")
.WithVerifyType("include")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.verifyIncludeMemberByUserId(
new Gs2Guild.VerifyIncludeMemberByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withUserId("user-0001")
.withVerifyType("include")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.verify_include_member_by_user_id(
guild.VerifyIncludeMemberByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_user_id('user-0001')
.with_verify_type('include')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.verify_include_member_by_user_id({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
userId="user-0001",
verifyType="include",
timeOffsetToken=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.verify_include_member_by_user_id_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
userId="user-0001",
verifyType="include",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;setMaximumCurrentMaximumMemberCountByGuildName
길드 이름을 지정하여 최대 참가 가능 인원수 설정
길드의 currentMaximumMemberCount를 지정된 절대값으로 설정합니다.
증감 조작과 달리 차분을 적용하는 것이 아니라 값을 직접 설정합니다.
업데이트 후 길드와 업데이트 전 길드 상태를 모두 반환하여 호출자가 변경 사항을 추적할 수 있도록 합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| value | int | 1 ~ 2147483646 | 설정할 최대 인원수 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
| old | Guild | 갱신 전 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.SetMaximumCurrentMaximumMemberCountByGuildName(
&guild.SetMaximumCurrentMaximumMemberCountByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildName: pointy.String("guild-0001"),
GuildModelName: pointy.String("guild-model-0001"),
Value: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
old := result.Olduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\SetMaximumCurrentMaximumMemberCountByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->setMaximumCurrentMaximumMemberCountByGuildName(
(new SetMaximumCurrentMaximumMemberCountByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildName("guild-0001")
->withGuildModelName("guild-model-0001")
->withValue(null)
);
$item = $result->getItem();
$old = $result->getOld();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.SetMaximumCurrentMaximumMemberCountByGuildNameRequest;
import io.gs2.guild.result.SetMaximumCurrentMaximumMemberCountByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
SetMaximumCurrentMaximumMemberCountByGuildNameResult result = client.setMaximumCurrentMaximumMemberCountByGuildName(
new SetMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildName("guild-0001")
.withGuildModelName("guild-model-0001")
.withValue(null)
);
Guild item = result.getItem();
Guild old = result.getOld();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.SetMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.SetMaximumCurrentMaximumMemberCountByGuildName(
new Gs2.Gs2Guild.Request.SetMaximumCurrentMaximumMemberCountByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildName("guild-0001")
.WithGuildModelName("guild-model-0001")
.WithValue(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var old = result.Old;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.setMaximumCurrentMaximumMemberCountByGuildName(
new Gs2Guild.SetMaximumCurrentMaximumMemberCountByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildName("guild-0001")
.withGuildModelName("guild-model-0001")
.withValue(null)
);
const item = result.getItem();
const old = result.getOld();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.set_maximum_current_maximum_member_count_by_guild_name(
guild.SetMaximumCurrentMaximumMemberCountByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_name('guild-0001')
.with_guild_model_name('guild-model-0001')
.with_value(None)
)
item = result.item
old = result.old
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.set_maximum_current_maximum_member_count_by_guild_name({
namespaceName="namespace-0001",
guildName="guild-0001",
guildModelName="guild-model-0001",
value=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
old = result.old;client = gs2('guild')
api_result_handler = client.set_maximum_current_maximum_member_count_by_guild_name_async({
namespaceName="namespace-0001",
guildName="guild-0001",
guildModelName="guild-model-0001",
value=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;
old = result.old;assume
길드 유저로서 행동하기 위한 액세스 토큰 취득
요청한 유저가 길드 엔티티로서 조작을 실행할 수 있는 액세스 토큰을 발급합니다.
이 토큰은 길드 설정 갱신, 멤버 관리, 참가 요청의 승낙/거부, 차단 목록 관리 등의 길드 관리 조작에 필요합니다.
요청한 유저는 길드의 멤버여야 합니다. 그렇지 않은 경우 NotIncludedGuildMember 오류가 반환됩니다.
응답에는 액세스 토큰, 길드의 유저ID, 토큰의 유효 기간 타임스탬프가 포함됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| token | string | 길드용 액세스 토큰 |
| userId | string | 사용자ID |
| expire | long | 유효기간 토큰의 유효기간을 나타내는 타임스탬프입니다. 이 시각에 도달하면 토큰이 무효가 됩니다. UNIX 시간(밀리초) |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.Assume(
&guild.AssumeRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
token := result.Token
userId := result.UserId
expire := result.Expireuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AssumeRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->assume(
(new AssumeRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
);
$token = $result->getToken();
$userId = $result->getUserId();
$expire = $result->getExpire();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AssumeRequest;
import io.gs2.guild.result.AssumeResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AssumeResult result = client.assume(
new AssumeRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
String token = result.getToken();
String userId = result.getUserId();
long expire = result.getExpire();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AssumeResult> asyncResult = null;
yield return client.Assume(
new Gs2.Gs2Guild.Request.AssumeRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var token = result.Token;
var userId = result.UserId;
var expire = result.Expire;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.assume(
new Gs2Guild.AssumeRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const token = result.getToken();
const userId = result.getUserId();
const expire = result.getExpire();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.assume(
guild.AssumeRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
token = result.token
user_id = result.user_id
expire = result.expire
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.assume({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
token = result.token;
userId = result.userId;
expire = result.expire;client = gs2('guild')
api_result_handler = client.assume_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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
token = result.token;
userId = result.userId;
expire = result.expire;assumeByUserId
유저ID를 지정하여 길드 유저로서 행동하기 위한 액세스 토큰 취득
지정된 유저가 길드 엔티티로서 조작을 실행할 수 있는 액세스 토큰을 발급합니다(서버 사이드 조작).
지정된 유저는 길드의 멤버여야 합니다. 그렇지 않은 경우 NotIncludedGuildMember 오류가 반환됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| token | string | 길드용 액세스 토큰 |
| userId | string | 사용자ID |
| expire | long | 유효기간 토큰의 유효기간을 나타내는 타임스탬프입니다. 이 시각에 도달하면 토큰이 무효가 됩니다. UNIX 시간(밀리초) |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.AssumeByUserId(
&guild.AssumeByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
token := result.Token
userId := result.UserId
expire := result.Expireuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AssumeByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->assumeByUserId(
(new AssumeByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withTimeOffsetToken(null)
);
$token = $result->getToken();
$userId = $result->getUserId();
$expire = $result->getExpire();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AssumeByUserIdRequest;
import io.gs2.guild.result.AssumeByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AssumeByUserIdResult result = client.assumeByUserId(
new AssumeByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
String token = result.getToken();
String userId = result.getUserId();
long expire = result.getExpire();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AssumeByUserIdResult> asyncResult = null;
yield return client.AssumeByUserId(
new Gs2.Gs2Guild.Request.AssumeByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var token = result.Token;
var userId = result.UserId;
var expire = result.Expire;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.assumeByUserId(
new Gs2Guild.AssumeByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
const token = result.getToken();
const userId = result.getUserId();
const expire = result.getExpire();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.assume_by_user_id(
guild.AssumeByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_time_offset_token(None)
)
token = result.token
user_id = result.user_id
expire = result.expire
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.assume_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
timeOffsetToken=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
token = result.token;
userId = result.userId;
expire = result.expire;client = gs2('guild')
api_result_handler = client.assume_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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
token = result.token;
userId = result.userId;
expire = result.expire;describeJoinedGuilds
참가 중인 길드 목록 조회
요청한 사용자가 현재 멤버로 참가하고 있는 길드의 페이지네이션 리스트를 조회합니다.
옵션으로 길드 모델 이름 필터를 지정하여 특정 길드 모델에 참가한 길드만 조회할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | |||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<JoinedGuild> | 참가 중인 길드 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeJoinedGuilds(
&guild.DescribeJoinedGuildsRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeJoinedGuildsRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeJoinedGuilds(
(new DescribeJoinedGuildsRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeJoinedGuildsRequest;
import io.gs2.guild.result.DescribeJoinedGuildsResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeJoinedGuildsResult result = client.describeJoinedGuilds(
new DescribeJoinedGuildsRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withPageToken(null)
.withLimit(null)
);
List<JoinedGuild> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeJoinedGuildsResult> asyncResult = null;
yield return client.DescribeJoinedGuilds(
new Gs2.Gs2Guild.Request.DescribeJoinedGuildsRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeJoinedGuilds(
new Gs2Guild.DescribeJoinedGuildsRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_joined_guilds(
guild.DescribeJoinedGuildsRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-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('guild')
api_result = client.describe_joined_guilds({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-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('guild')
api_result_handler = client.describe_joined_guilds_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-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;describeJoinedGuildsByUserId
사용자 ID를 지정하여 참가 중인 길드 목록 조회
지정된 사용자가 현재 멤버로 참가하고 있는 길드의 페이지네이션 리스트를 조회합니다(서버 사이드 조작).
옵션으로 길드 모델 이름 필터를 지정하여 특정 길드 모델에 참가한 길드만 조회할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | |||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<JoinedGuild> | 참가 중인 길드 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeJoinedGuildsByUserId(
&guild.DescribeJoinedGuildsByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeJoinedGuildsByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeJoinedGuildsByUserId(
(new DescribeJoinedGuildsByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeJoinedGuildsByUserIdRequest;
import io.gs2.guild.result.DescribeJoinedGuildsByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeJoinedGuildsByUserIdResult result = client.describeJoinedGuildsByUserId(
new DescribeJoinedGuildsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withPageToken(null)
.withLimit(null)
.withTimeOffsetToken(null)
);
List<JoinedGuild> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeJoinedGuildsByUserIdResult> asyncResult = null;
yield return client.DescribeJoinedGuildsByUserId(
new Gs2.Gs2Guild.Request.DescribeJoinedGuildsByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeJoinedGuildsByUserId(
new Gs2Guild.DescribeJoinedGuildsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_joined_guilds_by_user_id(
guild.DescribeJoinedGuildsByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-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('guild')
api_result = client.describe_joined_guilds_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-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('guild')
api_result_handler = client.describe_joined_guilds_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-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;getJoinedGuild
참가 중인 길드 조회
길드 모델 이름과 길드 이름으로 식별되는, 요청한 사용자가 참가하고 있는 특정 길드의 멤버십 정보를 조회합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | JoinedGuild | 참가 중인 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetJoinedGuild(
&guild.GetJoinedGuildRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetJoinedGuildRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getJoinedGuild(
(new GetJoinedGuildRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetJoinedGuildRequest;
import io.gs2.guild.result.GetJoinedGuildResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetJoinedGuildResult result = client.getJoinedGuild(
new GetJoinedGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
JoinedGuild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetJoinedGuildResult> asyncResult = null;
yield return client.GetJoinedGuild(
new Gs2.Gs2Guild.Request.GetJoinedGuildRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getJoinedGuild(
new Gs2Guild.GetJoinedGuildRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_joined_guild(
guild.GetJoinedGuildRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_joined_guild({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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('guild')
api_result_handler = client.get_joined_guild_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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;getJoinedGuildByUserId
사용자 ID를 지정하여 참가 중인 길드 조회
지정된 사용자가 참가하고 있는 특정 길드의 멤버십 정보를 조회합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | JoinedGuild | 참가 중인 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetJoinedGuildByUserId(
&guild.GetJoinedGuildByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetJoinedGuildByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getJoinedGuildByUserId(
(new GetJoinedGuildByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetJoinedGuildByUserIdRequest;
import io.gs2.guild.result.GetJoinedGuildByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetJoinedGuildByUserIdResult result = client.getJoinedGuildByUserId(
new GetJoinedGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
JoinedGuild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetJoinedGuildByUserIdResult> asyncResult = null;
yield return client.GetJoinedGuildByUserId(
new Gs2.Gs2Guild.Request.GetJoinedGuildByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getJoinedGuildByUserId(
new Gs2Guild.GetJoinedGuildByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_joined_guild_by_user_id(
guild.GetJoinedGuildByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_joined_guild_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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('guild')
api_result_handler = client.get_joined_guild_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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;updateMemberMetadata
멤버의 메타데이터 업데이트
지정된 길드 내 요청한 사용자의 멤버십 메타데이터를 업데이트합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| metadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateMemberMetadata(
&guild.UpdateMemberMetadataRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
AccessToken: pointy.String("accessToken-0001"),
Metadata: pointy.String("metadata-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateMemberMetadataRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateMemberMetadata(
(new UpdateMemberMetadataRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withAccessToken("accessToken-0001")
->withMetadata("metadata-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateMemberMetadataRequest;
import io.gs2.guild.result.UpdateMemberMetadataResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateMemberMetadataResult result = client.updateMemberMetadata(
new UpdateMemberMetadataRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withAccessToken("accessToken-0001")
.withMetadata("metadata-0001")
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberMetadataResult> asyncResult = null;
yield return client.UpdateMemberMetadata(
new Gs2.Gs2Guild.Request.UpdateMemberMetadataRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithAccessToken("accessToken-0001")
.WithMetadata("metadata-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateMemberMetadata(
new Gs2Guild.UpdateMemberMetadataRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withAccessToken("accessToken-0001")
.withMetadata("metadata-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_member_metadata(
guild.UpdateMemberMetadataRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_access_token('accessToken-0001')
.with_metadata('metadata-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_member_metadata({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
accessToken="accessToken-0001",
metadata="metadata-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('guild')
api_result_handler = client.update_member_metadata_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
accessToken="accessToken-0001",
metadata="metadata-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;updateMemberMetadataByUserId
사용자 ID를 지정하여 멤버의 메타데이터 업데이트
지정된 길드 내 지정된 사용자의 멤버십 메타데이터를 업데이트합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| userId | string | ✓ | ~ 128자 | 업데이트할 사용자 ID | ||
| metadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 업데이트한 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateMemberMetadataByUserId(
&guild.UpdateMemberMetadataByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
UserId: pointy.String("user-0001"),
Metadata: pointy.String("metadata-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateMemberMetadataByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateMemberMetadataByUserId(
(new UpdateMemberMetadataByUserIdRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withUserId("user-0001")
->withMetadata("metadata-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateMemberMetadataByUserIdRequest;
import io.gs2.guild.result.UpdateMemberMetadataByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateMemberMetadataByUserIdResult result = client.updateMemberMetadataByUserId(
new UpdateMemberMetadataByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withUserId("user-0001")
.withMetadata("metadata-0001")
.withTimeOffsetToken(null)
);
Guild 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberMetadataByUserIdResult> asyncResult = null;
yield return client.UpdateMemberMetadataByUserId(
new Gs2.Gs2Guild.Request.UpdateMemberMetadataByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithUserId("user-0001")
.WithMetadata("metadata-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateMemberMetadataByUserId(
new Gs2Guild.UpdateMemberMetadataByUserIdRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withUserId("user-0001")
.withMetadata("metadata-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_member_metadata_by_user_id(
guild.UpdateMemberMetadataByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_user_id('user-0001')
.with_metadata('metadata-0001')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_member_metadata_by_user_id({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
userId="user-0001",
metadata="metadata-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('guild')
api_result_handler = client.update_member_metadata_by_user_id_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
userId="user-0001",
metadata="metadata-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;withdrawal
길드에서 탈퇴
요청한 사용자가 지정된 길드에서 탈퇴합니다.
길드 모델에 재가입 쿨다운(rejoinCoolTimeMinutes)이 설정되어 있는 경우, 쿨다운 기간이 경과할 때까지 같은 길드에 다시 가입할 수 없습니다.
사용자가 유일한 길드 마스터인 경우, 리더가 없는 길드가 되는 것을 방지하기 위해 GuildMasterRequired 오류로 탈퇴가 거부됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | JoinedGuild | 탈퇴한 길드 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.Withdrawal(
&guild.WithdrawalRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\WithdrawalRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->withdrawal(
(new WithdrawalRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.WithdrawalRequest;
import io.gs2.guild.result.WithdrawalResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
WithdrawalResult result = client.withdrawal(
new WithdrawalRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
JoinedGuild item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.WithdrawalResult> asyncResult = null;
yield return client.Withdrawal(
new Gs2.Gs2Guild.Request.WithdrawalRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.withdrawal(
new Gs2Guild.WithdrawalRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.withdrawal(
guild.WithdrawalRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.withdrawal({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.withdrawal_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-model-0001",
guildName="guild-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;
guild = result.guild;withdrawalByUserId
사용자 ID를 지정하여 길드에서 탈퇴
지정된 사용자가 지정된 길드에서 탈퇴합니다(서버 사이드 조작).
사용자용 버전과 동일한 재가입 쿨다운 및 길드 마스터 검증이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | UUID | ~ 36자 | 길드명 길드의 고유한 이름을 유지합니다. 이름은 UUID(Universally Unique Identifier) 형식으로 자동 생성되며, 각 길드를 식별하는 데 사용됩니다. | |
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | JoinedGuild | 탈퇴한 길드 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.WithdrawalByUserId(
&guild.WithdrawalByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\WithdrawalByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->withdrawalByUserId(
(new WithdrawalByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
->withTimeOffsetToken(null)
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.WithdrawalByUserIdRequest;
import io.gs2.guild.result.WithdrawalByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
WithdrawalByUserIdResult result = client.withdrawalByUserId(
new WithdrawalByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
JoinedGuild item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.WithdrawalByUserIdResult> asyncResult = null;
yield return client.WithdrawalByUserId(
new Gs2.Gs2Guild.Request.WithdrawalByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.withdrawalByUserId(
new Gs2Guild.WithdrawalByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.withdrawal_by_user_id(
guild.WithdrawalByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
.with_time_offset_token(None)
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.withdrawal_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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;
guild = result.guild;client = gs2('guild')
api_result_handler = client.withdrawal_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName="guild-model-0001",
guildName="guild-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;
guild = result.guild;getLastGuildMasterActivity
길드 마스터의 마지막 활동 일시 취득
길드 마스터가 마지막으로 활동을 수행한 일시의 타임스탬프를 취득합니다.
이 정보는 PromoteSeniorMember에 의한 자동 계승 대상이 될 만큼 길드 마스터가 비활성 상태인지 판정하는 데 사용됩니다.
비활성 임계값은 길드 모델의 inactivityPeriodDays 설정에 기반하여 계산됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.취득하려면 해당 역할의 PolicyDocument에 Gs2Guild:GetLastGuildMasterActivity 권한이 필요합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | LastGuildMasterActivity | 마지막 길드 마스터 활동 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetLastGuildMasterActivity(
&guild.GetLastGuildMasterActivityRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: ,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetLastGuildMasterActivityRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getLastGuildMasterActivity(
(new GetLastGuildMasterActivityRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken()
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetLastGuildMasterActivityRequest;
import io.gs2.guild.result.GetLastGuildMasterActivityResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetLastGuildMasterActivityResult result = client.getLastGuildMasterActivity(
new GetLastGuildMasterActivityRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
);
LastGuildMasterActivity item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetLastGuildMasterActivityResult> asyncResult = null;
yield return client.GetLastGuildMasterActivity(
new Gs2.Gs2Guild.Request.GetLastGuildMasterActivityRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken(),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getLastGuildMasterActivity(
new Gs2Guild.GetLastGuildMasterActivityRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_last_guild_master_activity(
guild.GetLastGuildMasterActivityRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token()
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_last_guild_master_activity({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.get_last_guild_master_activity_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
})
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;
guild = result.guild;getLastGuildMasterActivityByGuildName
길드 이름을 지정하여 길드 마스터의 마지막 활동 일시 취득
지정된 길드의 길드 마스터가 마지막으로 활동을 수행한 일시의 타임스탬프를 취득합니다(서버 사이드 조작).
이 정보는 길드 마스터가 자동 계승 대상이 될 만큼 비활성 상태인지 판정하는 데 사용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | LastGuildMasterActivity | 마지막 길드 마스터 활동 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetLastGuildMasterActivityByGuildName(
&guild.GetLastGuildMasterActivityByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetLastGuildMasterActivityByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getLastGuildMasterActivityByGuildName(
(new GetLastGuildMasterActivityByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetLastGuildMasterActivityByGuildNameRequest;
import io.gs2.guild.result.GetLastGuildMasterActivityByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetLastGuildMasterActivityByGuildNameResult result = client.getLastGuildMasterActivityByGuildName(
new GetLastGuildMasterActivityByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
LastGuildMasterActivity item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetLastGuildMasterActivityByGuildNameResult> asyncResult = null;
yield return client.GetLastGuildMasterActivityByGuildName(
new Gs2.Gs2Guild.Request.GetLastGuildMasterActivityByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getLastGuildMasterActivityByGuildName(
new Gs2Guild.GetLastGuildMasterActivityByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_last_guild_master_activity_by_guild_name(
guild.GetLastGuildMasterActivityByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_last_guild_master_activity_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.get_last_guild_master_activity_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-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;
guild = result.guild;promoteSeniorMember
길드 마스터가 일정 기간 로그인하지 않은 경우, 가장 오래된 길드 멤버를 길드 마스터로 승격
길드 마스터가 inactivityPeriodDays의 임계값(24시간 × inactivityPeriodDays로 계산)을 초과하여 비활성 상태인지 확인합니다.
조건을 충족하는 경우, 가장 오래 근속한 비마스터 멤버(JoinedAt 타임스탬프로 판정)가 길드 마스터 역할로 승격됩니다.
maxConcurrentGuildMasterCount가 1인 경우, 승격이 이루어지기 전에 비활성 상태인 길드 마스터가 기본 멤버 역할로 강등됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument에 따라 결정됩니다.승격을 수행하려면 해당 역할의 PolicyDocument에 Gs2Guild:PromoteSeniorMember 권한이 필요합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | LastGuildMasterActivity | 마지막 길드 마스터 활동 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.PromoteSeniorMember(
&guild.PromoteSeniorMemberRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: ,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\PromoteSeniorMemberRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->promoteSeniorMember(
(new PromoteSeniorMemberRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken()
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.PromoteSeniorMemberRequest;
import io.gs2.guild.result.PromoteSeniorMemberResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
PromoteSeniorMemberResult result = client.promoteSeniorMember(
new PromoteSeniorMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
);
LastGuildMasterActivity item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.PromoteSeniorMemberResult> asyncResult = null;
yield return client.PromoteSeniorMember(
new Gs2.Gs2Guild.Request.PromoteSeniorMemberRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken(),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.promoteSeniorMember(
new Gs2Guild.PromoteSeniorMemberRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.promote_senior_member(
guild.PromoteSeniorMemberRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token()
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.promote_senior_member({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.promote_senior_member_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
})
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;
guild = result.guild;promoteSeniorMemberByGuildName
길드 이름을 지정하여, 일정 기간 로그인하지 않은 길드 마스터를 최고참 멤버로 교체
지정된 길드의 길드 마스터가 inactivityPeriodDays의 임계값을 초과하여 비활성 상태인지 확인합니다(서버 사이드 조작).
조건을 충족하는 경우, 가장 오래 근속한 비마스터 멤버(JoinedAt 타임스탬프로 판정)가 길드 마스터 역할로 승격됩니다.
maxConcurrentGuildMasterCount가 1인 경우, 승격이 이루어지기 전에 비활성 상태인 길드 마스터가 기본 멤버 역할로 강등됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | LastGuildMasterActivity | 마지막 길드 마스터 활동 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.PromoteSeniorMemberByGuildName(
&guild.PromoteSeniorMemberByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
GuildName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\PromoteSeniorMemberByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->promoteSeniorMemberByGuildName(
(new PromoteSeniorMemberByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withGuildName("guild-0001")
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.PromoteSeniorMemberByGuildNameRequest;
import io.gs2.guild.result.PromoteSeniorMemberByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
PromoteSeniorMemberByGuildNameResult result = client.promoteSeniorMemberByGuildName(
new PromoteSeniorMemberByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
LastGuildMasterActivity item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.PromoteSeniorMemberByGuildNameResult> asyncResult = null;
yield return client.PromoteSeniorMemberByGuildName(
new Gs2.Gs2Guild.Request.PromoteSeniorMemberByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithGuildName("guild-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.promoteSeniorMemberByGuildName(
new Gs2Guild.PromoteSeniorMemberByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withGuildName("guild-0001")
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.promote_senior_member_by_guild_name(
guild.PromoteSeniorMemberByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_guild_name('guild-0001')
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.promote_senior_member_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.promote_senior_member_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
guildName="guild-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;
guild = result.guild;describeReceiveRequests
수신한 참가 요청 목록 조회
길드에 전송되어 승인 대기 중인 참가 요청의 페이지네이션 리스트를 조회합니다.
Assume한 길드 사용자의 액세스 토큰이 필요합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.목록을 조회하려면 해당 역할의 PolicyDocument에 Gs2Guild:DescribeReceiveRequests 권한이 필요합니다. | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<ReceiveMemberRequest> | 참가 요청 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeReceiveRequests(
&guild.DescribeReceiveRequestsRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
AccessToken: pointy.String("accessToken-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeReceiveRequestsRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeReceiveRequests(
(new DescribeReceiveRequestsRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeReceiveRequestsRequest;
import io.gs2.guild.result.DescribeReceiveRequestsResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeReceiveRequestsResult result = client.describeReceiveRequests(
new DescribeReceiveRequestsRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withAccessToken("accessToken-0001")
.withPageToken(null)
.withLimit(null)
);
List<ReceiveMemberRequest> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeReceiveRequestsResult> asyncResult = null;
yield return client.DescribeReceiveRequests(
new Gs2.Gs2Guild.Request.DescribeReceiveRequestsRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeReceiveRequests(
new Gs2Guild.DescribeReceiveRequestsRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_receive_requests(
guild.DescribeReceiveRequestsRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-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('guild')
api_result = client.describe_receive_requests({
namespaceName="namespace-0001",
guildModelName="guild-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('guild')
api_result_handler = client.describe_receive_requests_async({
namespaceName="namespace-0001",
guildModelName="guild-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;describeReceiveRequestsByGuildName
길드 이름을 지정하여 수신한 참가 요청 목록 조회
지정된 길드에 전송되어 승인 대기 중인 참가 요청의 페이지네이션 리스트를 조회합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<ReceiveMemberRequest> | 참가 요청 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeReceiveRequestsByGuildName(
&guild.DescribeReceiveRequestsByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: nil,
GuildName: pointy.String("guild-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeReceiveRequestsByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeReceiveRequestsByGuildName(
(new DescribeReceiveRequestsByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName(null)
->withGuildName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeReceiveRequestsByGuildNameRequest;
import io.gs2.guild.result.DescribeReceiveRequestsByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeReceiveRequestsByGuildNameResult result = client.describeReceiveRequestsByGuildName(
new DescribeReceiveRequestsByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withPageToken(null)
.withLimit(null)
);
List<ReceiveMemberRequest> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeReceiveRequestsByGuildNameResult> asyncResult = null;
yield return client.DescribeReceiveRequestsByGuildName(
new Gs2.Gs2Guild.Request.DescribeReceiveRequestsByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName(null)
.WithGuildName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeReceiveRequestsByGuildName(
new Gs2Guild.DescribeReceiveRequestsByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_receive_requests_by_guild_name(
guild.DescribeReceiveRequestsByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name(None)
.with_guild_name('guild-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('guild')
api_result = client.describe_receive_requests_by_guild_name({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-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('guild')
api_result_handler = client.describe_receive_requests_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-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;getReceiveRequest
수신한 참가 요청 조회
지정된 사용자로부터 길드가 수신한 특정 참가 요청을 조회합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.조회하려면 해당 역할의 PolicyDocument에 Gs2Guild:GetReceiveRequest 권한이 필요합니다. | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetReceiveRequest(
&guild.GetReceiveRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
AccessToken: pointy.String("accessToken-0001"),
FromUserId: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetReceiveRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getReceiveRequest(
(new GetReceiveRequestRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withAccessToken("accessToken-0001")
->withFromUserId(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetReceiveRequestRequest;
import io.gs2.guild.result.GetReceiveRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetReceiveRequestResult result = client.getReceiveRequest(
new GetReceiveRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withAccessToken("accessToken-0001")
.withFromUserId(null)
);
ReceiveMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetReceiveRequestResult> asyncResult = null;
yield return client.GetReceiveRequest(
new Gs2.Gs2Guild.Request.GetReceiveRequestRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithAccessToken("accessToken-0001")
.WithFromUserId(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getReceiveRequest(
new Gs2Guild.GetReceiveRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withAccessToken("accessToken-0001")
.withFromUserId(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_receive_request(
guild.GetReceiveRequestRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_access_token('accessToken-0001')
.with_from_user_id(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_receive_request({
namespaceName="namespace-0001",
guildModelName="guild-0001",
accessToken="accessToken-0001",
fromUserId=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('guild')
api_result_handler = client.get_receive_request_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
accessToken="accessToken-0001",
fromUserId=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;getReceiveRequestByGuildName
길드 이름을 지정하여 수신한 참가 요청 조회
지정된 사용자로부터 지정된 길드가 수신한 특정 참가 요청을 조회합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetReceiveRequestByGuildName(
&guild.GetReceiveRequestByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: nil,
GuildName: pointy.String("guild-0001"),
FromUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetReceiveRequestByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getReceiveRequestByGuildName(
(new GetReceiveRequestByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName(null)
->withGuildName("guild-0001")
->withFromUserId("user-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetReceiveRequestByGuildNameRequest;
import io.gs2.guild.result.GetReceiveRequestByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetReceiveRequestByGuildNameResult result = client.getReceiveRequestByGuildName(
new GetReceiveRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
ReceiveMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetReceiveRequestByGuildNameResult> asyncResult = null;
yield return client.GetReceiveRequestByGuildName(
new Gs2.Gs2Guild.Request.GetReceiveRequestByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName(null)
.WithGuildName("guild-0001")
.WithFromUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getReceiveRequestByGuildName(
new Gs2Guild.GetReceiveRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_receive_request_by_guild_name(
guild.GetReceiveRequestByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name(None)
.with_guild_name('guild-0001')
.with_from_user_id('user-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_receive_request_by_guild_name({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.get_receive_request_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;acceptRequest
참가 요청 수락
보류 중인 참가 요청을 수락하고, 요청한 사용자를 길드 멤버로 추가합니다.
사용자에게는 길드의 기본 멤버 역할이 할당되며, 원래 요청의 멤버 메타데이터가 유지됩니다.
요청은 길드의 수신함과 발신자의 발신함 양쪽에서 삭제됩니다.
사용자의 maxConcurrentJoinGuilds 제한을 초과하지 않았는지, 길드의 최대 멤버 수에 도달하지 않았는지 검증됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.승인하려면 해당 역할의 PolicyDocument에 Gs2Guild:AcceptRequest 권한이 필요합니다. | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 수락한 참가 요청 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.AcceptRequest(
&guild.AcceptRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
AccessToken: pointy.String("accessToken-0001"),
FromUserId: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AcceptRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->acceptRequest(
(new AcceptRequestRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withAccessToken("accessToken-0001")
->withFromUserId(null)
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AcceptRequestRequest;
import io.gs2.guild.result.AcceptRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AcceptRequestResult result = client.acceptRequest(
new AcceptRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withAccessToken("accessToken-0001")
.withFromUserId(null)
);
ReceiveMemberRequest item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AcceptRequestResult> asyncResult = null;
yield return client.AcceptRequest(
new Gs2.Gs2Guild.Request.AcceptRequestRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithAccessToken("accessToken-0001")
.WithFromUserId(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.acceptRequest(
new Gs2Guild.AcceptRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withAccessToken("accessToken-0001")
.withFromUserId(null)
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.accept_request(
guild.AcceptRequestRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_access_token('accessToken-0001')
.with_from_user_id(None)
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.accept_request({
namespaceName="namespace-0001",
guildModelName="guild-0001",
accessToken="accessToken-0001",
fromUserId=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.accept_request_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
accessToken="accessToken-0001",
fromUserId=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;
guild = result.guild;acceptRequestByGuildName
길드 이름을 지정하여 참가 요청 수락
지정된 길드의 보류 중인 참가 요청을 수락하고, 요청한 사용자를 길드 멤버로 추가합니다(서버 사이드 조작).
길드 사용자용 버전과 동일한 멤버 할당, 메타데이터 유지, 제한 검증이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 수락한 참가 요청 |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.AcceptRequestByGuildName(
&guild.AcceptRequestByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: nil,
GuildName: pointy.String("guild-0001"),
FromUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AcceptRequestByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->acceptRequestByGuildName(
(new AcceptRequestByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName(null)
->withGuildName("guild-0001")
->withFromUserId("user-0002")
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AcceptRequestByGuildNameRequest;
import io.gs2.guild.result.AcceptRequestByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AcceptRequestByGuildNameResult result = client.acceptRequestByGuildName(
new AcceptRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
ReceiveMemberRequest item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AcceptRequestByGuildNameResult> asyncResult = null;
yield return client.AcceptRequestByGuildName(
new Gs2.Gs2Guild.Request.AcceptRequestByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName(null)
.WithGuildName("guild-0001")
.WithFromUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.acceptRequestByGuildName(
new Gs2Guild.AcceptRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.accept_request_by_guild_name(
guild.AcceptRequestByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name(None)
.with_guild_name('guild-0001')
.with_from_user_id('user-0002')
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.accept_request_by_guild_name({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.accept_request_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;rejectRequest
참가 요청 거부
보류 중인 참가 요청을 거부하고, 길드의 수신함과 발신자의 발신함 양쪽에서 삭제합니다.
요청한 사용자는 길드에 추가되지 않습니다. 관계는 형성되지 않습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.거부하려면 해당 역할의 PolicyDocument에 Gs2Guild:RejectRequest 권한이 필요합니다. | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 거부한 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.RejectRequest(
&guild.RejectRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: nil,
AccessToken: ,
FromUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\RejectRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->rejectRequest(
(new RejectRequestRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName(null)
->withAccessToken()
->withFromUserId("user-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.RejectRequestRequest;
import io.gs2.guild.result.RejectRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
RejectRequestResult result = client.rejectRequest(
new RejectRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withAccessToken()
.withFromUserId("user-0002")
);
ReceiveMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.RejectRequestResult> asyncResult = null;
yield return client.RejectRequest(
new Gs2.Gs2Guild.Request.RejectRequestRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName(null)
.WithAccessToken()
.WithFromUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.rejectRequest(
new Gs2Guild.RejectRequestRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withAccessToken()
.withFromUserId("user-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.reject_request(
guild.RejectRequestRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name(None)
.with_access_token()
.with_from_user_id('user-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.reject_request({
namespaceName="namespace-0001",
guildModelName=nil,
accessToken=,
fromUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.reject_request_async({
namespaceName="namespace-0001",
guildModelName=nil,
accessToken=,
fromUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;rejectRequestByGuildName
길드 이름을 지정하여 참가 요청 거부
지정된 길드의 보류 중인 참가 요청을 거부합니다(서버 사이드 조작).
요청은 길드의 수신함과 발신자의 발신함 양쪽에서 삭제됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| fromUserId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | ReceiveMemberRequest | 거부한 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.RejectRequestByGuildName(
&guild.RejectRequestByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: nil,
GuildName: pointy.String("guild-0001"),
FromUserId: pointy.String("user-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\RejectRequestByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->rejectRequestByGuildName(
(new RejectRequestByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName(null)
->withGuildName("guild-0001")
->withFromUserId("user-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.RejectRequestByGuildNameRequest;
import io.gs2.guild.result.RejectRequestByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
RejectRequestByGuildNameResult result = client.rejectRequestByGuildName(
new RejectRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
ReceiveMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.RejectRequestByGuildNameResult> asyncResult = null;
yield return client.RejectRequestByGuildName(
new Gs2.Gs2Guild.Request.RejectRequestByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName(null)
.WithGuildName("guild-0001")
.WithFromUserId("user-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.rejectRequestByGuildName(
new Gs2Guild.RejectRequestByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName(null)
.withGuildName("guild-0001")
.withFromUserId("user-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.reject_request_by_guild_name(
guild.RejectRequestByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name(None)
.with_guild_name('guild-0001')
.with_from_user_id('user-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.reject_request_by_guild_name({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.reject_request_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName=nil,
guildName="guild-0001",
fromUserId="user-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;describeSendRequests
보낸 참가 요청 목록 취득
요청한 사용자가 보낸, 응답 대기 중인 길드 참가 요청의 페이지네이션 목록을 취득합니다.
길드 모델 이름으로 필터링할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<SendMemberRequest> | 참가 요청 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeSendRequests(
&guild.DescribeSendRequestsRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-0002"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeSendRequestsRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeSendRequests(
(new DescribeSendRequestsRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-0002")
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeSendRequestsRequest;
import io.gs2.guild.result.DescribeSendRequestsResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeSendRequestsResult result = client.describeSendRequests(
new DescribeSendRequestsRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withPageToken(null)
.withLimit(null)
);
List<SendMemberRequest> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeSendRequestsResult> asyncResult = null;
yield return client.DescribeSendRequests(
new Gs2.Gs2Guild.Request.DescribeSendRequestsRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-0002")
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeSendRequests(
new Gs2Guild.DescribeSendRequestsRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withPageToken(null)
.withLimit(null)
);
const items = result.getItems();
const nextPageToken = result.getNextPageToken();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_send_requests(
guild.DescribeSendRequestsRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-0002')
.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('guild')
api_result = client.describe_send_requests({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
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('guild')
api_result_handler = client.describe_send_requests_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
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;describeSendRequestsByUserId
사용자 ID를 지정하여 보낸 참가 요청 목록 취득
지정된 사용자가 보낸 길드 참가 요청의 페이지네이션 목록을 취득합니다(서버 사이드 조작).
길드 모델 이름으로 필터링할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<SendMemberRequest> | 참가 요청 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeSendRequestsByUserId(
&guild.DescribeSendRequestsByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: nil,
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeSendRequestsByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeSendRequestsByUserId(
(new DescribeSendRequestsByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName(null)
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeSendRequestsByUserIdRequest;
import io.gs2.guild.result.DescribeSendRequestsByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeSendRequestsByUserIdResult result = client.describeSendRequestsByUserId(
new DescribeSendRequestsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withPageToken(null)
.withLimit(null)
.withTimeOffsetToken(null)
);
List<SendMemberRequest> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeSendRequestsByUserIdResult> asyncResult = null;
yield return client.DescribeSendRequestsByUserId(
new Gs2.Gs2Guild.Request.DescribeSendRequestsByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName(null)
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeSendRequestsByUserId(
new Gs2Guild.DescribeSendRequestsByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_send_requests_by_user_id(
guild.DescribeSendRequestsByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name(None)
.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('guild')
api_result = client.describe_send_requests_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
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('guild')
api_result_handler = client.describe_send_requests_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
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;getSendRequest
보낸 참가 요청 취득
요청한 사용자가 지정된 대상 길드에 보낸 특정 참가 요청을 취득합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드 이름 참가 요청이 송신된 길드의 고유한 이름(UUID)입니다. 사용자가 참가를 요청하고 있는 특정 길드 인스턴스를 식별하며, 요청 처리를 위해 길드의 수신함을 특정하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | SendMemberRequest | 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetSendRequest(
&guild.GetSendRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-0002"),
TargetGuildName: pointy.String("guild-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetSendRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getSendRequest(
(new GetSendRequestRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-0002")
->withTargetGuildName("guild-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetSendRequestRequest;
import io.gs2.guild.result.GetSendRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetSendRequestResult result = client.getSendRequest(
new GetSendRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
);
SendMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetSendRequestResult> asyncResult = null;
yield return client.GetSendRequest(
new Gs2.Gs2Guild.Request.GetSendRequestRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-0002")
.WithTargetGuildName("guild-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getSendRequest(
new Gs2Guild.GetSendRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_send_request(
guild.GetSendRequestRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-0002')
.with_target_guild_name('guild-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_send_request({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.get_send_request_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;getSendRequestByUserId
사용자 ID를 지정하여 보낸 참가 요청 취득
지정된 사용자가 지정된 대상 길드에 보낸 특정 참가 요청을 취득합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드 이름 참가 요청이 송신된 길드의 고유한 이름(UUID)입니다. 사용자가 참가를 요청하고 있는 특정 길드 인스턴스를 식별하며, 요청 처리를 위해 길드의 수신함을 특정하는 데 사용됩니다. | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | SendMemberRequest | 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetSendRequestByUserId(
&guild.GetSendRequestByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: nil,
TargetGuildName: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetSendRequestByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getSendRequestByUserId(
(new GetSendRequestByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName(null)
->withTargetGuildName(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetSendRequestByUserIdRequest;
import io.gs2.guild.result.GetSendRequestByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetSendRequestByUserIdResult result = client.getSendRequestByUserId(
new GetSendRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withTimeOffsetToken(null)
);
SendMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetSendRequestByUserIdResult> asyncResult = null;
yield return client.GetSendRequestByUserId(
new Gs2.Gs2Guild.Request.GetSendRequestByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName(null)
.WithTargetGuildName(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getSendRequestByUserId(
new Gs2Guild.GetSendRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_send_request_by_user_id(
guild.GetSendRequestByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name(None)
.with_target_guild_name(None)
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_send_request_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=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('guild')
api_result_handler = client.get_send_request_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=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;sendRequest
참가 요청 전송
지정된 길드에 참가 요청을 전송합니다. 동작은 길드의 참가 정책에 따라 달라집니다:
- “anybody” 정책: 사용자는 승인 없이 기본 역할로 길드 멤버로 즉시 추가됩니다.
- 승인 필요 정책: 발신자의 발신함과 길드의 수신함 양쪽에 참가 요청이 생성되며, 길드 마스터의 승인을 기다립니다.
전송 전에 다음 검증이 수행됩니다: 사용자가 길드의 거부 목록에 없는지, 재가입 쿨다운 기간이 경과했는지(이전에 탈퇴한 경우), maxConcurrentJoinGuilds 제한을 초과하지 않았는지.
커스텀 멤버 메타데이터를 요청에 포함할 수 있습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 전송 대상 길드 이름 | ||
| metadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 참가한 길드 승인이 필요하지 않은 길드에 참가했을 때 응답됩니다 |
| sendMemberRequest | SendMemberRequest | 보낸 참가 요청 승인이 필요한 길드에 참가 요청을 보냈을 때 응답됩니다 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.SendRequest(
&guild.SendRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-0002"),
TargetGuildName: pointy.String("guild-0002"),
Metadata: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
sendMemberRequest := result.SendMemberRequestuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\SendRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->sendRequest(
(new SendRequestRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-0002")
->withTargetGuildName("guild-0002")
->withMetadata(null)
);
$item = $result->getItem();
$sendMemberRequest = $result->getSendMemberRequest();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.SendRequestRequest;
import io.gs2.guild.result.SendRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
SendRequestResult result = client.sendRequest(
new SendRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
.withMetadata(null)
);
Guild item = result.getItem();
SendMemberRequest sendMemberRequest = result.getSendMemberRequest();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.SendRequestResult> asyncResult = null;
yield return client.SendRequest(
new Gs2.Gs2Guild.Request.SendRequestRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-0002")
.WithTargetGuildName("guild-0002")
.WithMetadata(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var sendMemberRequest = result.SendMemberRequest;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.sendRequest(
new Gs2Guild.SendRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
.withMetadata(null)
);
const item = result.getItem();
const sendMemberRequest = result.getSendMemberRequest();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.send_request(
guild.SendRequestRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-0002')
.with_target_guild_name('guild-0002')
.with_metadata(None)
)
item = result.item
send_member_request = result.send_member_request
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.send_request({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
metadata=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
sendMemberRequest = result.sendMemberRequest;client = gs2('guild')
api_result_handler = client.send_request_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
metadata=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;
sendMemberRequest = result.sendMemberRequest;sendRequestByUserId
사용자 ID를 지정하여 참가 요청 전송
지정된 사용자를 대신하여 지정된 길드에 참가 요청을 전송합니다(서버 사이드 조작).
사용자용 버전과 동일한 참가 정책 동작, 검증(거부 목록, 쿨다운, 동시 길드 제한), 승인 흐름이 적용됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 전송 대상 길드 이름 | ||
| metadata | string | ~ 512자 | 길드 멤버의 메타데이터 GS2의 동작에 영향을 주지 않는, 이 길드 멤버와 연결된 임의의 데이터입니다. 공헌 포인트, 마지막 로그인 시간, 길드 임원에게 표시되는 메모 등 멤버 고유의 정보를 저장하는 데 사용할 수 있습니다. | |||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | Guild | 참가한 길드 승인이 필요하지 않은 길드에 참가했을 때 응답됩니다 |
| sendMemberRequest | SendMemberRequest | 보낸 참가 요청 승인이 필요한 길드에 참가 요청을 보냈을 때 응답됩니다 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.SendRequestByUserId(
&guild.SendRequestByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: nil,
TargetGuildName: nil,
Metadata: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
sendMemberRequest := result.SendMemberRequestuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\SendRequestByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->sendRequestByUserId(
(new SendRequestByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName(null)
->withTargetGuildName(null)
->withMetadata(null)
->withTimeOffsetToken(null)
);
$item = $result->getItem();
$sendMemberRequest = $result->getSendMemberRequest();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.SendRequestByUserIdRequest;
import io.gs2.guild.result.SendRequestByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
SendRequestByUserIdResult result = client.sendRequestByUserId(
new SendRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withMetadata(null)
.withTimeOffsetToken(null)
);
Guild item = result.getItem();
SendMemberRequest sendMemberRequest = result.getSendMemberRequest();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.SendRequestByUserIdResult> asyncResult = null;
yield return client.SendRequestByUserId(
new Gs2.Gs2Guild.Request.SendRequestByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName(null)
.WithTargetGuildName(null)
.WithMetadata(null)
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var sendMemberRequest = result.SendMemberRequest;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.sendRequestByUserId(
new Gs2Guild.SendRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withMetadata(null)
.withTimeOffsetToken(null)
);
const item = result.getItem();
const sendMemberRequest = result.getSendMemberRequest();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.send_request_by_user_id(
guild.SendRequestByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name(None)
.with_target_guild_name(None)
.with_metadata(None)
.with_time_offset_token(None)
)
item = result.item
send_member_request = result.send_member_request
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.send_request_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=nil,
metadata=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;
sendMemberRequest = result.sendMemberRequest;client = gs2('guild')
api_result_handler = client.send_request_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=nil,
metadata=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;
sendMemberRequest = result.sendMemberRequest;deleteRequest
보낸 참가 요청 취소
요청한 사용자가 이전에 보낸 길드 참가 요청을 취소(삭제)합니다.
요청은 발신자의 발신함과 대상 길드의 수신함 양쪽에서 삭제됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 액세스 토큰 | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드 이름 참가 요청이 송신된 길드의 고유한 이름(UUID)입니다. 사용자가 참가를 요청하고 있는 특정 길드 인스턴스를 식별하며, 요청 처리를 위해 길드의 수신함을 특정하는 데 사용됩니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | SendMemberRequest | 삭제된 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteRequest(
&guild.DeleteRequestRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
GuildModelName: pointy.String("guild-0002"),
TargetGuildName: pointy.String("guild-0002"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteRequestRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteRequest(
(new DeleteRequestRequest())
->withNamespaceName("namespace-0001")
->withAccessToken("accessToken-0001")
->withGuildModelName("guild-0002")
->withTargetGuildName("guild-0002")
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteRequestRequest;
import io.gs2.guild.result.DeleteRequestResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteRequestResult result = client.deleteRequest(
new DeleteRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
);
SendMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteRequestResult> asyncResult = null;
yield return client.DeleteRequest(
new Gs2.Gs2Guild.Request.DeleteRequestRequest()
.WithNamespaceName("namespace-0001")
.WithAccessToken("accessToken-0001")
.WithGuildModelName("guild-0002")
.WithTargetGuildName("guild-0002"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteRequest(
new Gs2Guild.DeleteRequestRequest()
.withNamespaceName("namespace-0001")
.withAccessToken("accessToken-0001")
.withGuildModelName("guild-0002")
.withTargetGuildName("guild-0002")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_request(
guild.DeleteRequestRequest()
.with_namespace_name('namespace-0001')
.with_access_token('accessToken-0001')
.with_guild_model_name('guild-0002')
.with_target_guild_name('guild-0002')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_request({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.delete_request_async({
namespaceName="namespace-0001",
accessToken="accessToken-0001",
guildModelName="guild-0002",
targetGuildName="guild-0002",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;deleteRequestByUserId
사용자 ID를 지정하여 보낸 참가 요청 취소
지정된 사용자가 이전에 보낸 길드 참가 요청을 취소(삭제)합니다(서버 사이드 조작).
요청은 발신자의 발신함과 대상 길드의 수신함 양쪽에서 삭제됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| targetGuildName | string | ✓ | ~ 128자 | 대상 길드 이름 참가 요청이 송신된 길드의 고유한 이름(UUID)입니다. 사용자가 참가를 요청하고 있는 특정 길드 인스턴스를 식별하며, 요청 처리를 위해 길드의 수신함을 특정하는 데 사용됩니다. | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | SendMemberRequest | 삭제된 참가 요청 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteRequestByUserId(
&guild.DeleteRequestByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
GuildModelName: nil,
TargetGuildName: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteRequestByUserIdRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteRequestByUserId(
(new DeleteRequestByUserIdRequest())
->withNamespaceName("namespace-0001")
->withUserId("user-0001")
->withGuildModelName(null)
->withTargetGuildName(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteRequestByUserIdRequest;
import io.gs2.guild.result.DeleteRequestByUserIdResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteRequestByUserIdResult result = client.deleteRequestByUserId(
new DeleteRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withTimeOffsetToken(null)
);
SendMemberRequest 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteRequestByUserIdResult> asyncResult = null;
yield return client.DeleteRequestByUserId(
new Gs2.Gs2Guild.Request.DeleteRequestByUserIdRequest()
.WithNamespaceName("namespace-0001")
.WithUserId("user-0001")
.WithGuildModelName(null)
.WithTargetGuildName(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteRequestByUserId(
new Gs2Guild.DeleteRequestByUserIdRequest()
.withNamespaceName("namespace-0001")
.withUserId("user-0001")
.withGuildModelName(null)
.withTargetGuildName(null)
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_request_by_user_id(
guild.DeleteRequestByUserIdRequest()
.with_namespace_name('namespace-0001')
.with_user_id('user-0001')
.with_guild_model_name(None)
.with_target_guild_name(None)
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_request_by_user_id({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=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('guild')
api_result_handler = client.delete_request_by_user_id_async({
namespaceName="namespace-0001",
userId="user-0001",
guildModelName=nil,
targetGuildName=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;describeIgnoreUsers
참가를 거부하는 사용자 ID 목록 취득
길드의 거부 목록(블랙리스트)에 등록된 사용자의 페이지네이션 목록을 취득합니다.
이 목록에 포함된 사용자는 길드에 참가 요청을 보낼 수 없습니다.
Assume한 길드 사용자의 액세스 토큰이 필요합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.목록을 조회하려면 해당 역할의 PolicyDocument에 Gs2Guild:DescribeIgnoreUser 권한이 필요합니다. | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<IgnoreUser> | 참가를 거부하는 사용자 ID 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeIgnoreUsers(
&guild.DescribeIgnoreUsersRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: ,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeIgnoreUsersRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeIgnoreUsers(
(new DescribeIgnoreUsersRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken()
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeIgnoreUsersRequest;
import io.gs2.guild.result.DescribeIgnoreUsersResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeIgnoreUsersResult result = client.describeIgnoreUsers(
new DescribeIgnoreUsersRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
.withPageToken(null)
.withLimit(null)
);
List<IgnoreUser> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeIgnoreUsersResult> asyncResult = null;
yield return client.DescribeIgnoreUsers(
new Gs2.Gs2Guild.Request.DescribeIgnoreUsersRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken()
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeIgnoreUsers(
new Gs2Guild.DescribeIgnoreUsersRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken()
.withPageToken(null)
.withLimit(null)
);
const items = result.getItems();
const nextPageToken = result.getNextPageToken();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_ignore_users(
guild.DescribeIgnoreUsersRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token()
.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('guild')
api_result = client.describe_ignore_users({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
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('guild')
api_result_handler = client.describe_ignore_users_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken=,
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;describeIgnoreUsersByGuildName
길드명을 지정하여 참가를 거부하는 사용자 ID 목록 취득
지정된 길드의 거부 목록(블랙리스트)에 등록된 사용자의 페이지네이션 목록을 취득합니다(서버 사이드 조작).
이 목록에 포함된 사용자는 길드에 참가 요청을 보낼 수 없습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<IgnoreUser> | 참가를 거부하는 사용자 ID 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeIgnoreUsersByGuildName(
&guild.DescribeIgnoreUsersByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
GuildName: pointy.String("guildName-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeIgnoreUsersByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeIgnoreUsersByGuildName(
(new DescribeIgnoreUsersByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withGuildName("guildName-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeIgnoreUsersByGuildNameRequest;
import io.gs2.guild.result.DescribeIgnoreUsersByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeIgnoreUsersByGuildNameResult result = client.describeIgnoreUsersByGuildName(
new DescribeIgnoreUsersByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withPageToken(null)
.withLimit(null)
);
List<IgnoreUser> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeIgnoreUsersByGuildNameResult> asyncResult = null;
yield return client.DescribeIgnoreUsersByGuildName(
new Gs2.Gs2Guild.Request.DescribeIgnoreUsersByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithGuildName("guildName-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeIgnoreUsersByGuildName(
new Gs2Guild.DescribeIgnoreUsersByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_ignore_users_by_guild_name(
guild.DescribeIgnoreUsersByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_guild_name('guildName-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('guild')
api_result = client.describe_ignore_users_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-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('guild')
api_result_handler = client.describe_ignore_users_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-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;getIgnoreUser
참가를 거부하는 사용자 ID 취득
특정 사용자가 길드의 거부 목록(블랙리스트)에 포함되어 있는지 확인합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.조회하려면 해당 역할의 PolicyDocument에 Gs2Guild:GetIgnoreUser 권한이 필요합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetIgnoreUser(
&guild.GetIgnoreUserRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
UserId: pointy.String("user-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetIgnoreUserRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getIgnoreUser(
(new GetIgnoreUserRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withUserId("user-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetIgnoreUserRequest;
import io.gs2.guild.result.GetIgnoreUserResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetIgnoreUserResult result = client.getIgnoreUser(
new GetIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
IgnoreUser 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetIgnoreUserResult> asyncResult = null;
yield return client.GetIgnoreUser(
new Gs2.Gs2Guild.Request.GetIgnoreUserRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithUserId("user-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getIgnoreUser(
new Gs2Guild.GetIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_ignore_user(
guild.GetIgnoreUserRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_user_id('user-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_ignore_user({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-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('guild')
api_result_handler = client.get_ignore_user_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-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;getIgnoreUserByGuildName
길드명을 지정하여 참가를 거부하는 사용자 ID 취득
특정 사용자가 지정된 길드의 거부 목록(블랙리스트)에 포함되어 있는지 확인합니다(서버 사이드 조작).
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetIgnoreUserByGuildName(
&guild.GetIgnoreUserByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
GuildName: pointy.String("guildName-0001"),
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetIgnoreUserByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getIgnoreUserByGuildName(
(new GetIgnoreUserByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withGuildName("guildName-0001")
->withUserId("user-0001")
->withTimeOffsetToken(null)
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetIgnoreUserByGuildNameRequest;
import io.gs2.guild.result.GetIgnoreUserByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetIgnoreUserByGuildNameResult result = client.getIgnoreUserByGuildName(
new GetIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
IgnoreUser 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.GetIgnoreUserByGuildName(
new Gs2.Gs2Guild.Request.GetIgnoreUserByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithGuildName("guildName-0001")
.WithUserId("user-0001")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getIgnoreUserByGuildName(
new Gs2Guild.GetIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_ignore_user_by_guild_name(
guild.GetIgnoreUserByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_guild_name('guildName-0001')
.with_user_id('user-0001')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_ignore_user_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.get_ignore_user_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;addIgnoreUser
참가를 거부하는 사용자 ID 추가
사용자를 길드의 거부 목록(블랙리스트)에 추가합니다.
추가된 사용자는 이 길드에 참가 요청을 보낼 수 없게 됩니다.
이미 보류 중인 참가 요청이 있는 경우 자동으로 삭제되지는 않습니다. 별도로 거부해야 합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.추가하려면 해당 역할의 PolicyDocument에 Gs2Guild:AddIgnoreUser 권한이 필요합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.AddIgnoreUser(
&guild.AddIgnoreUserRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
UserId: pointy.String("user-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AddIgnoreUserRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->addIgnoreUser(
(new AddIgnoreUserRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withUserId("user-0001")
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AddIgnoreUserRequest;
import io.gs2.guild.result.AddIgnoreUserResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AddIgnoreUserResult result = client.addIgnoreUser(
new AddIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
IgnoreUser item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AddIgnoreUserResult> asyncResult = null;
yield return client.AddIgnoreUser(
new Gs2.Gs2Guild.Request.AddIgnoreUserRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithUserId("user-0001"),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.addIgnoreUser(
new Gs2Guild.AddIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.add_ignore_user(
guild.AddIgnoreUserRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_user_id('user-0001')
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.add_ignore_user({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-0001",
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.add_ignore_user_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-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;
guild = result.guild;addIgnoreUserByGuildName
길드 이름을 지정하여 참가를 거부하는 사용자 ID 추가
지정된 길드의 거부 리스트(블랙리스트)에 사용자를 추가합니다(서버 사이드 조작).
추가된 사용자는 이 길드에 참가 요청을 보낼 수 없게 됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
| guild | Guild | 길드 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.AddIgnoreUserByGuildName(
&guild.AddIgnoreUserByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
GuildName: pointy.String("guildName-0001"),
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
guild := result.Guilduse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\AddIgnoreUserByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->addIgnoreUserByGuildName(
(new AddIgnoreUserByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withGuildName("guildName-0001")
->withUserId("user-0001")
->withTimeOffsetToken(null)
);
$item = $result->getItem();
$guild = $result->getGuild();
} 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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.AddIgnoreUserByGuildNameRequest;
import io.gs2.guild.result.AddIgnoreUserByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
AddIgnoreUserByGuildNameResult result = client.addIgnoreUserByGuildName(
new AddIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
IgnoreUser item = result.getItem();
Guild guild = result.getGuild();
} 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.AddIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.AddIgnoreUserByGuildName(
new Gs2.Gs2Guild.Request.AddIgnoreUserByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithGuildName("guildName-0001")
.WithUserId("user-0001")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var guild = result.Guild;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.addIgnoreUserByGuildName(
new Gs2Guild.AddIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
const guild = result.getGuild();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.add_ignore_user_by_guild_name(
guild.AddIgnoreUserByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_guild_name('guildName-0001')
.with_user_id('user-0001')
.with_time_offset_token(None)
)
item = result.item
guild = result.guild
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.add_ignore_user_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;client = gs2('guild')
api_result_handler = client.add_ignore_user_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;
guild = result.guild;deleteIgnoreUser
참가를 거부하는 사용자 ID 삭제
길드의 거부 리스트(블랙리스트)에서 사용자를 삭제합니다.
삭제 후, 해당 사용자는 다시 이 길드에 참가 요청을 보낼 수 있게 됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| accessToken | string | ✓ | ~ 128자 | 길드용 액세스 토큰assume(또는 assumeByUserId)으로 취득한 토큰 문자열입니다.권한은 assume을 호출한 멤버의 역할의 PolicyDocument로 결정됩니다.삭제하려면 해당 역할의 PolicyDocument에 Gs2Guild:DeleteIgnoreUser 권한이 필요합니다. | ||
| userId | string | ✓ | ~ 128자 | 사용자ID |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteIgnoreUser(
&guild.DeleteIgnoreUserRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
AccessToken: pointy.String("accessToken-0001"),
UserId: pointy.String("user-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteIgnoreUserRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteIgnoreUser(
(new DeleteIgnoreUserRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withAccessToken("accessToken-0001")
->withUserId("user-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteIgnoreUserRequest;
import io.gs2.guild.result.DeleteIgnoreUserResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteIgnoreUserResult result = client.deleteIgnoreUser(
new DeleteIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
IgnoreUser 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteIgnoreUserResult> asyncResult = null;
yield return client.DeleteIgnoreUser(
new Gs2.Gs2Guild.Request.DeleteIgnoreUserRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithAccessToken("accessToken-0001")
.WithUserId("user-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteIgnoreUser(
new Gs2Guild.DeleteIgnoreUserRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withAccessToken("accessToken-0001")
.withUserId("user-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_ignore_user(
guild.DeleteIgnoreUserRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_access_token('accessToken-0001')
.with_user_id('user-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_ignore_user({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-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('guild')
api_result_handler = client.delete_ignore_user_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
accessToken="accessToken-0001",
userId="user-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;deleteIgnoreUserByGuildName
길드 이름을 지정하여 참가를 거부하는 사용자 ID 삭제
지정된 길드의 거부 리스트(블랙리스트)에서 사용자를 삭제합니다(서버 사이드 조작).
삭제 후, 해당 사용자는 다시 이 길드에 참가 요청을 보낼 수 있게 됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildName | string | ✓ | ~ 128자 | 길드명 | ||
| userId | string | ✓ | ~ 128자 | 사용자ID | ||
| timeOffsetToken | string | ~ 1024자 | 타임 오프셋 토큰 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | IgnoreUser | 참가를 거부하는 사용자 ID |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteIgnoreUserByGuildName(
&guild.DeleteIgnoreUserByGuildNameRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
GuildName: pointy.String("guildName-0001"),
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteIgnoreUserByGuildNameRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteIgnoreUserByGuildName(
(new DeleteIgnoreUserByGuildNameRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-0001")
->withGuildName("guildName-0001")
->withUserId("user-0001")
->withTimeOffsetToken(null)
);
$item = $result->getItem();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteIgnoreUserByGuildNameRequest;
import io.gs2.guild.result.DeleteIgnoreUserByGuildNameResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteIgnoreUserByGuildNameResult result = client.deleteIgnoreUserByGuildName(
new DeleteIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
IgnoreUser 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.DeleteIgnoreUserByGuildName(
new Gs2.Gs2Guild.Request.DeleteIgnoreUserByGuildNameRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-0001")
.WithGuildName("guildName-0001")
.WithUserId("user-0001")
.WithTimeOffsetToken(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteIgnoreUserByGuildName(
new Gs2Guild.DeleteIgnoreUserByGuildNameRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
.withGuildName("guildName-0001")
.withUserId("user-0001")
.withTimeOffsetToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_ignore_user_by_guild_name(
guild.DeleteIgnoreUserByGuildNameRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
.with_guild_name('guildName-0001')
.with_user_id('user-0001')
.with_time_offset_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_ignore_user_by_guild_name({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;client = gs2('guild')
api_result_handler = client.delete_ignore_user_by_guild_name_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
guildName="guildName-0001",
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;describeGuildModels
길드 모델 목록 취득
지정된 네임스페이스에서 현재 활성화(공개)되어 있는 길드 모델 목록을 취득합니다.
길드 모델은 최대 멤버 수, 역할 정의, 길드 마스터 역할, 기본 멤버 역할, 재참가 쿨다운 기간, 동시 길드 참가 제한, 비활성 길드 마스터 승계 설정을 포함한 길드 구조를 정의합니다.
길드 모델 마스터와 달리 읽기 전용이며 현재 사용 중인 구성을 나타냅니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<GuildModel> | 길드 모델 목록 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeGuildModels(
&guild.DescribeGuildModelsRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
items := result.Itemsuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeGuildModelsRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeGuildModels(
(new DescribeGuildModelsRequest())
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeGuildModelsRequest;
import io.gs2.guild.result.DescribeGuildModelsResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeGuildModelsResult result = client.describeGuildModels(
new DescribeGuildModelsRequest()
.withNamespaceName("namespace-0001")
);
List<GuildModel> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeGuildModelsResult> asyncResult = null;
yield return client.DescribeGuildModels(
new Gs2.Gs2Guild.Request.DescribeGuildModelsRequest()
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeGuildModels(
new Gs2Guild.DescribeGuildModelsRequest()
.withNamespaceName("namespace-0001")
);
const items = result.getItems();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_guild_models(
guild.DescribeGuildModelsRequest()
.with_namespace_name('namespace-0001')
)
items = result.items
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.describe_guild_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('guild')
api_result_handler = client.describe_guild_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;getGuildModel
길드 모델 취득
이름을 지정하여 특정한 현재 활성화된 길드 모델의 상세 정보를 취득합니다.
역할 정의, 최대 멤버 수 설정, 참가 정책 제약, 비활성 길드 마스터의 승계 기간(inactivityPeriodDays), 재참가 쿨다운 설정을 포함합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | GuildModel | 길드 모델 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetGuildModel(
&guild.GetGuildModelRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetGuildModelRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getGuildModel(
(new GetGuildModelRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetGuildModelRequest;
import io.gs2.guild.result.GetGuildModelResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetGuildModelResult result = client.getGuildModel(
new GetGuildModelRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
);
GuildModel 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetGuildModelResult> asyncResult = null;
yield return client.GetGuildModel(
new Gs2.Gs2Guild.Request.GetGuildModelRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getGuildModel(
new Gs2Guild.GetGuildModelRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_guild_model(
guild.GetGuildModelRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_guild_model({
namespaceName="namespace-0001",
guildModelName="guild-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('guild')
api_result_handler = client.get_guild_model_async({
namespaceName="namespace-0001",
guildModelName="guild-0001",
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
item = result.item;exportMaster
길드 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기
네임스페이스 내의 모든 길드 모델 마스터 정의를, 활성화에 적합한 단일 JSON 문서로 내보냅니다.
내보내는 데이터에는 멤버 제한, 역할 정의, 참가 정책, 승계 설정을 포함한 길드 모델이 포함됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | CurrentGuildMaster | 활성화 가능한 길드 모델의 마스터 데이터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.ExportMaster(
&guild.ExportMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\ExportMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.ExportMasterRequest;
import io.gs2.guild.result.ExportMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
ExportMasterResult result = client.exportMaster(
new ExportMasterRequest()
.withNamespaceName("namespace-0001")
);
CurrentGuildMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.exportMaster(
new Gs2Guild.ExportMasterRequest()
.withNamespaceName("namespace-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.export_master(
guild.ExportMasterRequest()
.with_namespace_name('namespace-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
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('guild')
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;getCurrentGuildMaster
현재 활성화된 길드 모델 마스터 취득
지정된 네임스페이스에서 현재 활성화되어 사용 중인 길드 모델 마스터 데이터를 취득합니다.
반환되는 데이터에는 현재 런타임 요청을 처리하고 있는 모든 길드 모델의 JSON 정의가 포함됩니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | CurrentGuildMaster | 현재 활성화된 길드 모델의 마스터 데이터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetCurrentGuildMaster(
&guild.GetCurrentGuildMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetCurrentGuildMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getCurrentGuildMaster(
(new GetCurrentGuildMasterRequest())
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetCurrentGuildMasterRequest;
import io.gs2.guild.result.GetCurrentGuildMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetCurrentGuildMasterResult result = client.getCurrentGuildMaster(
new GetCurrentGuildMasterRequest()
.withNamespaceName("namespace-0001")
);
CurrentGuildMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetCurrentGuildMasterResult> asyncResult = null;
yield return client.GetCurrentGuildMaster(
new Gs2.Gs2Guild.Request.GetCurrentGuildMasterRequest()
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getCurrentGuildMaster(
new Gs2Guild.GetCurrentGuildMasterRequest()
.withNamespaceName("namespace-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_current_guild_master(
guild.GetCurrentGuildMasterRequest()
.with_namespace_name('namespace-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_current_guild_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('guild')
api_result_handler = client.get_current_guild_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;preUpdateCurrentGuildMaster
현재 활성화된 마스터 데이터를 갱신(3단계 버전)
1MB를 초과하는 마스터 데이터를 업로드하는 경우, 3단계로 갱신을 수행합니다.
- 이 API를 실행하여 업로드용 토큰과 URL을 취득합니다.
- 취득한 URL에 마스터 데이터를 업로드합니다.
- UpdateCurrentGuildMaster에 업로드로 취득한 토큰을 전달하여 실행하고, 마스터 데이터를 반영합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| uploadToken | string | 업로드 후 결과를 반영할 때 사용하는 토큰 |
| uploadUrl | string | 업로드 처리 실행에 사용하는 URL |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.PreUpdateCurrentGuildMaster(
&guild.PreUpdateCurrentGuildMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrluse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\PreUpdateCurrentGuildMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->preUpdateCurrentGuildMaster(
(new PreUpdateCurrentGuildMasterRequest())
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.PreUpdateCurrentGuildMasterRequest;
import io.gs2.guild.result.PreUpdateCurrentGuildMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
PreUpdateCurrentGuildMasterResult result = client.preUpdateCurrentGuildMaster(
new PreUpdateCurrentGuildMasterRequest()
.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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.PreUpdateCurrentGuildMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentGuildMaster(
new Gs2.Gs2Guild.Request.PreUpdateCurrentGuildMasterRequest()
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.preUpdateCurrentGuildMaster(
new Gs2Guild.PreUpdateCurrentGuildMasterRequest()
.withNamespaceName("namespace-0001")
);
const uploadToken = result.getUploadToken();
const uploadUrl = result.getUploadUrl();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.pre_update_current_guild_master(
guild.PreUpdateCurrentGuildMasterRequest()
.with_namespace_name('namespace-0001')
)
upload_token = result.upload_token
upload_url = result.upload_url
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.pre_update_current_guild_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('guild')
api_result_handler = client.pre_update_current_guild_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;updateCurrentGuildMaster
현재 활성화된 길드 모델의 마스터 데이터를 갱신
새로운 길드 모델 마스터 데이터를 활성화하여 현재 활성화된 설정을 교체합니다.
2가지 모드를 지원합니다: ‘direct’는 인라인 마스터 데이터(1MB 미만의 데이터에 적합), ‘preUpload’는 PreUpdate로 사전에 업로드한 데이터를 적용합니다.
활성화 후, 모든 길드 관련 런타임 조작(길드 작성, 참가 요청, 멤버 관리)은 새로운 설정을 사용합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||||||||
| mode | 문자열 열거형 enum { “direct”, “preUpload” } | “direct” | 업데이트 모드
| |||||||||
| settings | string | {mode} == “direct” | ✓※ | ~ 5242880 바이트 (5MB) | 마스터 데이터 ※ mode이(가) “direct” 이면 필수 | |||||||
| uploadToken | string | {mode} == “preUpload” | ✓※ | ~ 1024자 | 사전 업로드로 획득한 토큰 업로드한 마스터 데이터를 적용하기 위해 사용됩니다. ※ mode이(가) “preUpload” 이면 필수 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | CurrentGuildMaster | 갱신된 현재 활성화된 길드 모델의 마스터 데이터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateCurrentGuildMaster(
&guild.UpdateCurrentGuildMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
Mode: pointy.String("direct"),
Settings: pointy.String("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}"),
UploadToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateCurrentGuildMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateCurrentGuildMaster(
(new UpdateCurrentGuildMasterRequest())
->withNamespaceName("namespace-0001")
->withMode("direct")
->withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}")
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateCurrentGuildMasterRequest;
import io.gs2.guild.result.UpdateCurrentGuildMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateCurrentGuildMasterResult result = client.updateCurrentGuildMaster(
new UpdateCurrentGuildMasterRequest()
.withNamespaceName("namespace-0001")
.withMode("direct")
.withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}")
.withUploadToken(null)
);
CurrentGuildMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterResult> asyncResult = null;
yield return client.UpdateCurrentGuildMaster(
new Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterRequest()
.WithNamespaceName("namespace-0001")
.WithMode("direct")
.WithSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}")
.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateCurrentGuildMaster(
new Gs2Guild.UpdateCurrentGuildMasterRequest()
.withNamespaceName("namespace-0001")
.withMode("direct")
.withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}")
.withUploadToken(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_current_guild_master(
guild.UpdateCurrentGuildMasterRequest()
.with_namespace_name('namespace-0001')
.with_mode('direct')
.with_settings('{"version": "2024-04-25", "guildModels": [{"name": "guild-0001", "defaultMaximumMemberCount": 10, "maximumMemberCount": 50, "inactivityPeriodDays": 10, "roles": [{"name": "master", "policyDocument": "{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}"}, {"name": "member", "policyDocument": "{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}"}], "guildMasterRole": "master", "guildMemberDefaultRole": "member", "rejoinCoolTimeMinutes": 1440}, {"name": "guild-0002", "defaultMaximumMemberCount": 20, "maximumMemberCount": 40, "inactivityPeriodDays": 10, "roles": [{"name": "master", "policyDocument": "{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}"}, {"name": "member", "policyDocument": "{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}"}], "guildMasterRole": "master", "guildMemberDefaultRole": "member", "rejoinCoolTimeMinutes": 360}]}')
.with_upload_token(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_current_guild_master({
namespaceName="namespace-0001",
mode="direct",
settings="{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}",
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('guild')
api_result_handler = client.update_current_guild_master_async({
namespaceName="namespace-0001",
mode="direct",
settings="{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 1440}, {\"name\": \"guild-0002\", \"defaultMaximumMemberCount\": 20, \"maximumMemberCount\": 40, \"inactivityPeriodDays\": 10, \"roles\": [{\"name\": \"master\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}, {\"name\": \"member\", \"policyDocument\": \"{\\\\\\\"Version\\\\\\\": \\\\\\\"2016-04-01\\\\\\\", \\\\\\\"Statements\\\\\\\": [{\\\\\\\"Effect\\\\\\\": \\\\\\\"Allow\\\\\\\", \\\\\\\"Actions\\\\\\\": [\\\\\\\"Gs2Guild:UpdateGuild\\\\\\\"], \\\\\\\"Resources\\\\\\\": [\\\\\\\"*\\\\\\\"]}]}\"}], \"guildMasterRole\": \"master\", \"guildMemberDefaultRole\": \"member\", \"rejoinCoolTimeMinutes\": 360}]}",
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;updateCurrentGuildMasterFromGitHub
현재 활성화된 길드 모델의 마스터 데이터를 GitHub에서 갱신
지정된 GitHub 리포지토리에서 길드 모델 마스터 데이터를 체크아웃하여 활성화합니다.
체크아웃 설정에서 리포지토리, 브랜치/태그, 취득할 파일 경로를 지정합니다.
길드 설정이 리포지토리에서 버전 관리되는 Git 기반의 마스터 데이터 관리 워크플로를 가능하게 합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| checkoutSetting | GitHubCheckoutSetting | ✓ | GitHub에서 마스터 데이터를 체크아웃하는 설정 |
Result
| 타입 | 설명 | |
|---|---|---|
| item | CurrentGuildMaster | 갱신된 현재 활성화된 길드 모델의 마스터 데이터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateCurrentGuildMasterFromGitHub(
&guild.UpdateCurrentGuildMasterFromGitHubRequest {
NamespaceName: pointy.String("namespace-0001"),
CheckoutSetting: &guild.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.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateCurrentGuildMasterFromGitHubRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateCurrentGuildMasterFromGitHub(
(new UpdateCurrentGuildMasterFromGitHubRequest())
->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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateCurrentGuildMasterFromGitHubRequest;
import io.gs2.guild.result.UpdateCurrentGuildMasterFromGitHubResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateCurrentGuildMasterFromGitHubResult result = client.updateCurrentGuildMasterFromGitHub(
new UpdateCurrentGuildMasterFromGitHubRequest()
.withNamespaceName("namespace-0001")
.withCheckoutSetting(new GitHubCheckoutSetting()
.withApiKeyId("apiKeyId-0001")
.withRepositoryName("gs2io/master-data")
.withSourcePath("path/to/file.json")
.withReferenceType("branch")
.withBranchName("develop")
)
);
CurrentGuildMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentGuildMasterFromGitHub(
new Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterFromGitHubRequest()
.WithNamespaceName("namespace-0001")
.WithCheckoutSetting(new Gs2.Gs2Guild.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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateCurrentGuildMasterFromGitHub(
new Gs2Guild.UpdateCurrentGuildMasterFromGitHubRequest()
.withNamespaceName("namespace-0001")
.withCheckoutSetting(new Gs2Guild.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 guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_current_guild_master_from_git_hub(
guild.UpdateCurrentGuildMasterFromGitHubRequest()
.with_namespace_name('namespace-0001')
.with_checkout_setting(guild.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('guild')
api_result = client.update_current_guild_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('guild')
api_result_handler = client.update_current_guild_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;describeGuildModelMasters
길드 모델 마스터 목록 조회
이름 접두사 필터링이 가능한, 편집 가능한 길드 모델 마스터 정의의 페이지네이션 리스트를 조회합니다.
마스터에 대한 변경 사항은 CurrentGuildMaster API로 마스터 데이터를 활성화할 때까지 반영되지 않습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| namePrefix | string | ~ 64자 | 길드 모델 이름 필터 접두사 | |||
| pageToken | string | ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 | |||
| limit | int | 30 | 1 ~ 1000 | 취득할 데이터 건수 |
Result
| 타입 | 설명 | |
|---|---|---|
| items | List<GuildModelMaster> | 길드 모델 마스터 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DescribeGuildModelMasters(
&guild.DescribeGuildModelMastersRequest {
NamespaceName: pointy.String("namespace-0001"),
NamePrefix: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokenuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DescribeGuildModelMastersRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->describeGuildModelMasters(
(new DescribeGuildModelMastersRequest())
->withNamespaceName("namespace-0001")
->withNamePrefix(null)
->withPageToken(null)
->withLimit(null)
);
$items = $result->getItems();
$nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
exit("error occurred")
}import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DescribeGuildModelMastersRequest;
import io.gs2.guild.result.DescribeGuildModelMastersResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DescribeGuildModelMastersResult result = client.describeGuildModelMasters(
new DescribeGuildModelMastersRequest()
.withNamespaceName("namespace-0001")
.withNamePrefix(null)
.withPageToken(null)
.withLimit(null)
);
List<GuildModelMaster> 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DescribeGuildModelMastersResult> asyncResult = null;
yield return client.DescribeGuildModelMasters(
new Gs2.Gs2Guild.Request.DescribeGuildModelMastersRequest()
.WithNamespaceName("namespace-0001")
.WithNamePrefix(null)
.WithPageToken(null)
.WithLimit(null),
r => asyncResult = r
);
if (asyncResult.Error != null) {
throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;import Gs2Core from '@/gs2/core';
import * as Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.describeGuildModelMasters(
new Gs2Guild.DescribeGuildModelMastersRequest()
.withNamespaceName("namespace-0001")
.withNamePrefix(null)
.withPageToken(null)
.withLimit(null)
);
const items = result.getItems();
const nextPageToken = result.getNextPageToken();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.describe_guild_model_masters(
guild.DescribeGuildModelMastersRequest()
.with_namespace_name('namespace-0001')
.with_name_prefix(None)
.with_page_token(None)
.with_limit(None)
)
items = result.items
next_page_token = result.next_page_token
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.describe_guild_model_masters({
namespaceName="namespace-0001",
namePrefix=nil,
pageToken=nil,
limit=nil,
})
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;client = gs2('guild')
api_result_handler = client.describe_guild_model_masters_async({
namespaceName="namespace-0001",
namePrefix=nil,
pageToken=nil,
limit=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
if(api_result.isError) then
-- When error occurs
fail(api_result['statusCode'], api_result['errorMessage'])
end
result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;createGuildModelMaster
길드 모델 마스터를 신규 작성
새로운 편집 가능한 길드 모델 마스터 정의를 작성합니다. 주요 설정 항목:
- defaultMaximumMemberCount / maximumMemberCount: 길드 멤버 용량의 초깃값과 상한
- roles: 이 모델의 길드 내에서 사용 가능한 역할 정의
- guildMasterRole / guildMemberDefaultRole: 생성자 및 신규 멤버에게 각각 할당되는 역할
- inactivityPeriodDays: 길드 마스터의 자동 승계가 트리거되기까지의 비활성 일수
- rejoinCoolTimeMinutes: 탈퇴 후 같은 길드에 다시 가입할 수 있을 때까지의 쿨다운 기간
- maxConcurrentJoinGuilds: 사용자가 동시에 참가할 수 있는 길드의 최대 수
- maxConcurrentGuildMasterCount: 길드별로 허용되는 길드 마스터의 최대 수
변경 사항은 CurrentGuildMaster API로 마스터 데이터를 활성화할 때까지 반영되지 않습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| name | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| metadata | string | ~ 1024자 | 메타데이터 메타데이터에는 임의의 값을 설정할 수 있습니다. 이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. | |||
| defaultMaximumMemberCount | int | ✓ | 0 ~ 2147483646 | 기본 최대 멤버 수 새 길드가 생성될 때 허용되는 초기 최대 멤버 수입니다. 이 값은 신규 길드의 currentMaximumMemberCount 초기값으로 사용됩니다. 길드 조작이나 입수 액션을 통해 나중에 maximumMemberCount 상한까지 늘릴 수 있습니다. | ||
| maximumMemberCount | int | ✓ | 0 ~ 2147483646 | 최대 멤버 수 상한 길드가 가질 수 있는 멤버 수의 절대적인 상한입니다. 길드의 currentMaximumMemberCount는 이 값을 초과할 수 없습니다. 길드가 의도된 규모를 넘어 성장하는 것을 방지하는 하드 캡으로 작동합니다. | ||
| inactivityPeriodDays | int | 7 | 1 ~ 365 | 무활동 기간(일수) 길드 마스터의 무활동이 이 일수를 초과한 경우, 남은 길드 멤버 중에서 새로운 길드 마스터가 자동으로 선출됩니다. 길드 마스터가 플레이를 중단했을 때 길드가 관리 불능 상태가 되는 것을 방지합니다. | ||
| roles | List<RoleModel> | ✓ | 1 ~ 10 items | 역할 모델 목록 이 길드 모델의 길드 내에서 이용할 수 있는 역할 정의 목록입니다. guildMasterRole 및 guildMemberDefaultRole 에서 참조되는 역할을 적어도 1개 포함해야 합니다. 최대 10개의 역할을 정의할 수 있습니다. | ||
| guildMasterRole | string | ✓ | ~ 128자 | 길드 마스터 역할명 길드 마스터에게 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. 길드 마스터는 일반적으로 길드를 관리하는 모든 권한을 가집니다. | ||
| guildMemberDefaultRole | string | ✓ | ~ 128자 | 기본 멤버 역할명 새로운 길드 멤버가 참가했을 때 자동으로 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. | ||
| rejoinCoolTimeMinutes | int | 0 | 0 ~ 2147483646 | 재가입 쿨타임(분) 사용자가 길드를 탈퇴한 후 다시 길드에 가입할 수 있게 되기까지의 쿨다운 기간(분)입니다. 0으로 설정하면 즉시 재가입이 가능합니다. 사용자가 길드에 반복적으로 가입·탈퇴하는 악용 패턴을 방지합니다. | ||
| maxConcurrentJoinGuilds | int | 1 ~ 10 | 동시 참가 가능 길드 최대 수 사용자가 이 타입의 길드에 동시에 멤버로 참가할 수 있는 최대 수입니다. 값은 1에서 10까지의 범위입니다. | |||
| maxConcurrentGuildMasterCount | int | 1 ~ 100 | 동시 존재 가능 길드 마스터 최대 수 하나의 길드에 동시에 존재할 수 있는 길드 마스터의 최대 인원수입니다. 공동 리더십 설계를 가능하게 합니다. 값은 1에서 100까지의 범위입니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | GuildModelMaster | 작성한 길드 모델 마스터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.CreateGuildModelMaster(
&guild.CreateGuildModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
Name: pointy.String("guild-model-0001"),
Description: nil,
Metadata: nil,
DefaultMaximumMemberCount: pointy.Int32(10),
MaximumMemberCount: pointy.Int32(20),
InactivityPeriodDays: nil,
Roles: []guild.RoleModel{
guild.RoleModel{
Name: pointy.String("master"),
PolicyDocument: pointy.String("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
},
guild.RoleModel{
Name: pointy.String("member"),
PolicyDocument: pointy.String("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
},
},
GuildMasterRole: pointy.String("master"),
GuildMemberDefaultRole: pointy.String("member"),
RejoinCoolTimeMinutes: pointy.Int32(1440),
MaxConcurrentJoinGuilds: nil,
MaxConcurrentGuildMasterCount: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\CreateGuildModelMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->createGuildModelMaster(
(new CreateGuildModelMasterRequest())
->withNamespaceName("namespace-0001")
->withName("guild-model-0001")
->withDescription(null)
->withMetadata(null)
->withDefaultMaximumMemberCount(10)
->withMaximumMemberCount(20)
->withInactivityPeriodDays(null)
->withRoles([
(new \Gs2\Guild\Model\RoleModel())
->withName("master")
->withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
(new \Gs2\Guild\Model\RoleModel())
->withName("member")
->withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
])
->withGuildMasterRole("master")
->withGuildMemberDefaultRole("member")
->withRejoinCoolTimeMinutes(1440)
->withMaxConcurrentJoinGuilds(null)
->withMaxConcurrentGuildMasterCount(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.CreateGuildModelMasterRequest;
import io.gs2.guild.result.CreateGuildModelMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
CreateGuildModelMasterResult result = client.createGuildModelMaster(
new CreateGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withName("guild-model-0001")
.withDescription(null)
.withMetadata(null)
.withDefaultMaximumMemberCount(10)
.withMaximumMemberCount(20)
.withInactivityPeriodDays(null)
.withRoles(Arrays.asList(
new io.gs2.guild.model.RoleModel()
.withName("master")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
new io.gs2.guild.model.RoleModel()
.withName("member")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}")
))
.withGuildMasterRole("master")
.withGuildMemberDefaultRole("member")
.withRejoinCoolTimeMinutes(1440)
.withMaxConcurrentJoinGuilds(null)
.withMaxConcurrentGuildMasterCount(null)
);
GuildModelMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.CreateGuildModelMasterResult> asyncResult = null;
yield return client.CreateGuildModelMaster(
new Gs2.Gs2Guild.Request.CreateGuildModelMasterRequest()
.WithNamespaceName("namespace-0001")
.WithName("guild-model-0001")
.WithDescription(null)
.WithMetadata(null)
.WithDefaultMaximumMemberCount(10)
.WithMaximumMemberCount(20)
.WithInactivityPeriodDays(null)
.WithRoles(new Gs2.Gs2Guild.Model.RoleModel[] {
new Gs2.Gs2Guild.Model.RoleModel()
.WithName("master")
.WithPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
new Gs2.Gs2Guild.Model.RoleModel()
.WithName("member")
.WithPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
})
.WithGuildMasterRole("master")
.WithGuildMemberDefaultRole("member")
.WithRejoinCoolTimeMinutes(1440)
.WithMaxConcurrentJoinGuilds(null)
.WithMaxConcurrentGuildMasterCount(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.createGuildModelMaster(
new Gs2Guild.CreateGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withName("guild-model-0001")
.withDescription(null)
.withMetadata(null)
.withDefaultMaximumMemberCount(10)
.withMaximumMemberCount(20)
.withInactivityPeriodDays(null)
.withRoles([
new Gs2Guild.model.RoleModel()
.withName("master")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
new Gs2Guild.model.RoleModel()
.withName("member")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
])
.withGuildMasterRole("master")
.withGuildMemberDefaultRole("member")
.withRejoinCoolTimeMinutes(1440)
.withMaxConcurrentJoinGuilds(null)
.withMaxConcurrentGuildMasterCount(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.create_guild_model_master(
guild.CreateGuildModelMasterRequest()
.with_namespace_name('namespace-0001')
.with_name('guild-model-0001')
.with_description(None)
.with_metadata(None)
.with_default_maximum_member_count(10)
.with_maximum_member_count(20)
.with_inactivity_period_days(None)
.with_roles([
guild.RoleModel()
.with_name('master')
.with_policy_document('{"Version": "2016-04-01", "Statements": [{"Effect": "Allow", "Action": ["Gs2Guild:UpdateGuild"], "Resources": ["*"]}]}'),
guild.RoleModel()
.with_name('member')
.with_policy_document('{"Version": "2016-04-01", "Statements": [{"Effect": "Allow", "Action": ["Gs2Guild:UpdateGuild"], "Resources": ["*"]}]}'),
])
.with_guild_master_role('master')
.with_guild_member_default_role('member')
.with_rejoin_cool_time_minutes(1440)
.with_max_concurrent_join_guilds(None)
.with_max_concurrent_guild_master_count(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.create_guild_model_master({
namespaceName="namespace-0001",
name="guild-model-0001",
description=nil,
metadata=nil,
defaultMaximumMemberCount=10,
maximumMemberCount=20,
inactivityPeriodDays=nil,
roles={
{
name="master",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
},
{
name="member",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
}
},
guildMasterRole="master",
guildMemberDefaultRole="member",
rejoinCoolTimeMinutes=1440,
maxConcurrentJoinGuilds=nil,
maxConcurrentGuildMasterCount=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('guild')
api_result_handler = client.create_guild_model_master_async({
namespaceName="namespace-0001",
name="guild-model-0001",
description=nil,
metadata=nil,
defaultMaximumMemberCount=10,
maximumMemberCount=20,
inactivityPeriodDays=nil,
roles={
{
name="master",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
},
{
name="member",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
}
},
guildMasterRole="master",
guildMemberDefaultRole="member",
rejoinCoolTimeMinutes=1440,
maxConcurrentJoinGuilds=nil,
maxConcurrentGuildMasterCount=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;getGuildModelMaster
길드 모델 마스터 조회
이름을 지정하여 특정 편집 가능한 길드 모델 마스터의 상세 정보를 조회합니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | GuildModelMaster | 길드 모델 마스터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.GetGuildModelMaster(
&guild.GetGuildModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\GetGuildModelMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->getGuildModelMaster(
(new GetGuildModelMasterRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.GetGuildModelMasterRequest;
import io.gs2.guild.result.GetGuildModelMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
GetGuildModelMasterResult result = client.getGuildModelMaster(
new GetGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
);
GuildModelMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.GetGuildModelMasterResult> asyncResult = null;
yield return client.GetGuildModelMaster(
new Gs2.Gs2Guild.Request.GetGuildModelMasterRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.getGuildModelMaster(
new Gs2Guild.GetGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.get_guild_model_master(
guild.GetGuildModelMasterRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.get_guild_model_master({
namespaceName="namespace-0001",
guildModelName="guild-model-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('guild')
api_result_handler = client.get_guild_model_master_async({
namespaceName="namespace-0001",
guildModelName="guild-model-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;updateGuildModelMaster
길드 모델 마스터 업데이트
기존 길드 모델 마스터의 설정을 업데이트합니다.
이름을 제외한 모든 속성을 변경할 수 있으며, 멤버 제한, 역할, 재가입 쿨다운, 비활성 승계 설정 등이 포함됩니다.
변경 사항은 CurrentGuildMaster API로 마스터 데이터를 다시 활성화할 때까지 반영되지 않습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| description | string | ~ 1024자 | 설명문 | |||
| metadata | string | ~ 1024자 | 메타데이터 메타데이터에는 임의의 값을 설정할 수 있습니다. 이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. | |||
| defaultMaximumMemberCount | int | ✓ | 0 ~ 2147483646 | 기본 최대 멤버 수 새 길드가 생성될 때 허용되는 초기 최대 멤버 수입니다. 이 값은 신규 길드의 currentMaximumMemberCount 초기값으로 사용됩니다. 길드 조작이나 입수 액션을 통해 나중에 maximumMemberCount 상한까지 늘릴 수 있습니다. | ||
| maximumMemberCount | int | ✓ | 0 ~ 2147483646 | 최대 멤버 수 상한 길드가 가질 수 있는 멤버 수의 절대적인 상한입니다. 길드의 currentMaximumMemberCount는 이 값을 초과할 수 없습니다. 길드가 의도된 규모를 넘어 성장하는 것을 방지하는 하드 캡으로 작동합니다. | ||
| inactivityPeriodDays | int | 7 | 1 ~ 365 | 무활동 기간(일수) 길드 마스터의 무활동이 이 일수를 초과한 경우, 남은 길드 멤버 중에서 새로운 길드 마스터가 자동으로 선출됩니다. 길드 마스터가 플레이를 중단했을 때 길드가 관리 불능 상태가 되는 것을 방지합니다. | ||
| roles | List<RoleModel> | ✓ | 1 ~ 10 items | 역할 모델 목록 이 길드 모델의 길드 내에서 이용할 수 있는 역할 정의 목록입니다. guildMasterRole 및 guildMemberDefaultRole 에서 참조되는 역할을 적어도 1개 포함해야 합니다. 최대 10개의 역할을 정의할 수 있습니다. | ||
| guildMasterRole | string | ✓ | ~ 128자 | 길드 마스터 역할명 길드 마스터에게 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. 길드 마스터는 일반적으로 길드를 관리하는 모든 권한을 가집니다. | ||
| guildMemberDefaultRole | string | ✓ | ~ 128자 | 기본 멤버 역할명 새로운 길드 멤버가 참가했을 때 자동으로 할당되는 역할의 이름입니다. roles 목록에 정의된 역할을 참조해야 합니다. | ||
| rejoinCoolTimeMinutes | int | 0 | 0 ~ 2147483646 | 재가입 쿨타임(분) 사용자가 길드를 탈퇴한 후 다시 길드에 가입할 수 있게 되기까지의 쿨다운 기간(분)입니다. 0으로 설정하면 즉시 재가입이 가능합니다. 사용자가 길드에 반복적으로 가입·탈퇴하는 악용 패턴을 방지합니다. | ||
| maxConcurrentJoinGuilds | int | 1 ~ 10 | 동시 참가 가능 길드 최대 수 사용자가 이 타입의 길드에 동시에 멤버로 참가할 수 있는 최대 수입니다. 값은 1에서 10까지의 범위입니다. | |||
| maxConcurrentGuildMasterCount | int | 1 ~ 100 | 동시 존재 가능 길드 마스터 최대 수 하나의 길드에 동시에 존재할 수 있는 길드 마스터의 최대 인원수입니다. 공동 리더십 설계를 가능하게 합니다. 값은 1에서 100까지의 범위입니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | GuildModelMaster | 업데이트한 길드 모델 마스터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.UpdateGuildModelMaster(
&guild.UpdateGuildModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
Description: pointy.String("description1"),
Metadata: pointy.String("{\"hoge\": \"fuga\"}"),
DefaultMaximumMemberCount: pointy.Int32(15),
MaximumMemberCount: pointy.Int32(25),
InactivityPeriodDays: nil,
Roles: []guild.RoleModel{
guild.RoleModel{
Name: pointy.String("master"),
PolicyDocument: pointy.String("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}"),
},
guild.RoleModel{
Name: pointy.String("member"),
PolicyDocument: pointy.String("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
},
},
GuildMasterRole: pointy.String("master"),
GuildMemberDefaultRole: pointy.String("member"),
RejoinCoolTimeMinutes: pointy.Int32(4320),
MaxConcurrentJoinGuilds: nil,
MaxConcurrentGuildMasterCount: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\UpdateGuildModelMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->updateGuildModelMaster(
(new UpdateGuildModelMasterRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-0001")
->withDescription("description1")
->withMetadata("{\"hoge\": \"fuga\"}")
->withDefaultMaximumMemberCount(15)
->withMaximumMemberCount(25)
->withInactivityPeriodDays(null)
->withRoles([
(new \Gs2\Guild\Model\RoleModel())
->withName("master")
->withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}"),
(new \Gs2\Guild\Model\RoleModel())
->withName("member")
->withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
])
->withGuildMasterRole("master")
->withGuildMemberDefaultRole("member")
->withRejoinCoolTimeMinutes(4320)
->withMaxConcurrentJoinGuilds(null)
->withMaxConcurrentGuildMasterCount(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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.UpdateGuildModelMasterRequest;
import io.gs2.guild.result.UpdateGuildModelMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
UpdateGuildModelMasterResult result = client.updateGuildModelMaster(
new UpdateGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withDescription("description1")
.withMetadata("{\"hoge\": \"fuga\"}")
.withDefaultMaximumMemberCount(15)
.withMaximumMemberCount(25)
.withInactivityPeriodDays(null)
.withRoles(Arrays.asList(
new io.gs2.guild.model.RoleModel()
.withName("master")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}"),
new io.gs2.guild.model.RoleModel()
.withName("member")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}")
))
.withGuildMasterRole("master")
.withGuildMemberDefaultRole("member")
.withRejoinCoolTimeMinutes(4320)
.withMaxConcurrentJoinGuilds(null)
.withMaxConcurrentGuildMasterCount(null)
);
GuildModelMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildModelMasterResult> asyncResult = null;
yield return client.UpdateGuildModelMaster(
new Gs2.Gs2Guild.Request.UpdateGuildModelMasterRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-0001")
.WithDescription("description1")
.WithMetadata("{\"hoge\": \"fuga\"}")
.WithDefaultMaximumMemberCount(15)
.WithMaximumMemberCount(25)
.WithInactivityPeriodDays(null)
.WithRoles(new Gs2.Gs2Guild.Model.RoleModel[] {
new Gs2.Gs2Guild.Model.RoleModel()
.WithName("master")
.WithPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}"),
new Gs2.Gs2Guild.Model.RoleModel()
.WithName("member")
.WithPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
})
.WithGuildMasterRole("master")
.WithGuildMemberDefaultRole("member")
.WithRejoinCoolTimeMinutes(4320)
.WithMaxConcurrentJoinGuilds(null)
.WithMaxConcurrentGuildMasterCount(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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.updateGuildModelMaster(
new Gs2Guild.UpdateGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
.withDescription("description1")
.withMetadata("{\"hoge\": \"fuga\"}")
.withDefaultMaximumMemberCount(15)
.withMaximumMemberCount(25)
.withInactivityPeriodDays(null)
.withRoles([
new Gs2Guild.model.RoleModel()
.withName("master")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}"),
new Gs2Guild.model.RoleModel()
.withName("member")
.withPolicyDocument("{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}"),
])
.withGuildMasterRole("master")
.withGuildMemberDefaultRole("member")
.withRejoinCoolTimeMinutes(4320)
.withMaxConcurrentJoinGuilds(null)
.withMaxConcurrentGuildMasterCount(null)
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.update_guild_model_master(
guild.UpdateGuildModelMasterRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
.with_description('description1')
.with_metadata('{"hoge": "fuga"}')
.with_default_maximum_member_count(15)
.with_maximum_member_count(25)
.with_inactivity_period_days(None)
.with_roles([
guild.RoleModel()
.with_name('master')
.with_policy_document('{"Version": "2016-04-01", "Statements": [{"Effect": "Allow", "Action": ["Gs2Guild:UpdateGuild", "Gs2Guild:DeleteMember"], "Resources": ["*"]}]}'),
guild.RoleModel()
.with_name('member')
.with_policy_document('{"Version": "2016-04-01", "Statements": [{"Effect": "Allow", "Action": ["Gs2Guild:UpdateGuild"], "Resources": ["*"]}]}'),
])
.with_guild_master_role('master')
.with_guild_member_default_role('member')
.with_rejoin_cool_time_minutes(4320)
.with_max_concurrent_join_guilds(None)
.with_max_concurrent_guild_master_count(None)
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.update_guild_model_master({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
description="description1",
metadata="{\"hoge\": \"fuga\"}",
defaultMaximumMemberCount=15,
maximumMemberCount=25,
inactivityPeriodDays=nil,
roles={
{
name="master",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}",
},
{
name="member",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
}
},
guildMasterRole="master",
guildMemberDefaultRole="member",
rejoinCoolTimeMinutes=4320,
maxConcurrentJoinGuilds=nil,
maxConcurrentGuildMasterCount=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('guild')
api_result_handler = client.update_guild_model_master_async({
namespaceName="namespace-0001",
guildModelName="guild-model-0001",
description="description1",
metadata="{\"hoge\": \"fuga\"}",
defaultMaximumMemberCount=15,
maximumMemberCount=25,
inactivityPeriodDays=nil,
roles={
{
name="master",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\", \"Gs2Guild:DeleteMember\"], \"Resources\": [\"*\"]}]}",
},
{
name="member",
policyDocument="{\"Version\": \"2016-04-01\", \"Statements\": [{\"Effect\": \"Allow\", \"Action\": [\"Gs2Guild:UpdateGuild\"], \"Resources\": [\"*\"]}]}",
}
},
guildMasterRole="master",
guildMemberDefaultRole="member",
rejoinCoolTimeMinutes=4320,
maxConcurrentJoinGuilds=nil,
maxConcurrentGuildMasterCount=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;deleteGuildModelMaster
길드 모델 마스터 삭제
편집 가능한 길드 모델 마스터 정의를 삭제합니다.
마스터 데이터만 영향을 받으며, 현재 활성화(공개)되어 있는 모델은 마스터 데이터가 다시 활성화될 때까지 영향을 받지 않습니다.
상세
Request
| 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128자 | 네임스페이스 이름 네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. | ||
| guildModelName | string | ✓ | ~ 128자 | 길드 모델 이름 길드 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
Result
| 타입 | 설명 | |
|---|---|---|
| item | GuildModelMaster | 삭제한 길드 모델 마스터 |
구현 예제
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
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 := guild.Gs2GuildRestClient{
Session: &session,
}
result, err := client.DeleteGuildModelMaster(
&guild.DeleteGuildModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
GuildModelName: pointy.String("guild-model-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemuse Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\DeleteGuildModelMasterRequest;
$session = new Gs2RestSession(
new BasicGs2Credential(
"your client id",
"your client secret"
),
Region::AP_NORTHEAST_1
);
$session->open();
$client = new Gs2GuildRestClient(
$session
);
try {
$result = $client->deleteGuildModelMaster(
(new DeleteGuildModelMasterRequest())
->withNamespaceName("namespace-0001")
->withGuildModelName("guild-model-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.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.DeleteGuildModelMasterRequest;
import io.gs2.guild.result.DeleteGuildModelMasterResult;
Gs2RestSession session = new Gs2RestSession(
Region.AP_NORTHEAST_1,
new BasicGs2Credential(
"your client id",
"your client secret"
)
);
session.connect();
Gs2GuildRestClient client = new Gs2GuildRestClient(session);
try {
DeleteGuildModelMasterResult result = client.deleteGuildModelMaster(
new DeleteGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
);
GuildModelMaster 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 Gs2GuildRestClient(session);
AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildModelMasterResult> asyncResult = null;
yield return client.DeleteGuildModelMaster(
new Gs2.Gs2Guild.Request.DeleteGuildModelMasterRequest()
.WithNamespaceName("namespace-0001")
.WithGuildModelName("guild-model-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 Gs2Guild from '@/gs2/guild';
const session = new Gs2Core.Gs2RestSession(
"ap-northeast-1",
new Gs2Core.BasicGs2Credential(
'your client id',
'your client secret'
)
);
await session.connect();
const client = new Gs2Guild.Gs2GuildRestClient(session);
try {
const result = await client.deleteGuildModelMaster(
new Gs2Guild.DeleteGuildModelMasterRequest()
.withNamespaceName("namespace-0001")
.withGuildModelName("guild-model-0001")
);
const item = result.getItem();
} catch (e) {
process.exit(1);
}from gs2 import core
from gs2 import guild
session = core.Gs2RestSession(
core.BasicGs2Credential(
'your client id',
'your client secret'
),
"ap-northeast-1",
)
session.connect()
client = guild.Gs2GuildRestClient(session)
try:
result = client.delete_guild_model_master(
guild.DeleteGuildModelMasterRequest()
.with_namespace_name('namespace-0001')
.with_guild_model_name('guild-model-0001')
)
item = result.item
except core.Gs2Exception as e:
exit(1)client = gs2('guild')
api_result = client.delete_guild_model_master({
namespaceName="namespace-0001",
guildModelName="guild-model-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('guild')
api_result_handler = client.delete_guild_model_master_async({
namespaceName="namespace-0001",
guildModelName="guild-model-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;