GS2-Guild SDK API Reference

Specification of models and API references for GS2-Guild SDK for various programming languages

Model

Namespace

Namespace

A Namespace allows multiple independent instances of the same service within a single project by separating data spaces and usage contexts. Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the namespace differs, the data is treated as a completely independent data space.

Therefore, you must create a namespace before you can start using each service.

Details
TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
*
~ 1024 charsNamespace GRN
* Set automatically by the server
namestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction Setting
Configuration for controlling how distributed transactions are executed when processing guild operations. Supports auto-run, atomic commit, and async processing options.
changeNotificationNotificationSettingGuild Change Notification
Push notification sent via GS2-Gateway when guild information (display name, attributes, join policy, etc.) is updated. Allows guild members to receive real-time updates about changes to their guild.
joinNotificationNotificationSettingMember Join Notification
Push notification sent via GS2-Gateway when a new member joins the guild, either through direct join (open policy) or after approval of a join request. Enables existing members to be notified of new additions.
leaveNotificationNotificationSettingMember Leave Notification
Push notification sent via GS2-Gateway when a member leaves or is removed from the guild. Covers both voluntary departures and expulsions by guild masters.
changeMemberNotificationNotificationSettingMember Change Notification
Push notification sent via GS2-Gateway when a guild member’s information (role, metadata) is updated. Whether metadata changes trigger this notification can be controlled with changeMemberNotificationIgnoreChangeMetadata.
changeMemberNotificationIgnoreChangeMetadatabool?falseWhether to ignore changes in metadata when issuing notifications when member metadata is updated
receiveRequestNotificationNotificationSettingReceive Request Notification
Push notification sent via GS2-Gateway when the guild receives a new join request from a user. Allows guild masters and authorized members to be notified of pending requests that require approval.
removeRequestNotificationNotificationSettingRemove Request Notification
Push notification sent via GS2-Gateway when a guild join request is deleted, either by cancellation from the sender, rejection by the guild, or approval (which removes the request and adds the member).
createGuildScriptScriptSettingScript to execute when creating a Guild
Script Trigger Reference - createGuild
updateGuildScriptScriptSettingScript to execute when update a guild
Script Trigger Reference - updateGuild
joinGuildScriptScriptSettingScript to execute when joining a guild
Script Trigger Reference - joinGuild
receiveJoinRequestScriptScriptSettingScript to execute when receiving a guild join request
Script Trigger Reference - receiveJoinRequest
leaveGuildScriptScriptSettingScript to execute when leaving a guild
Script Trigger Reference - leaveGuild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
Script Trigger Reference - changeRole
deleteGuildScriptScriptSettingScript to execute when deleting a guild
Script Trigger Reference - deleteGuild
logSettingLogSettingLog Output Setting
Configuration for outputting log data of guild operations to GS2-Log. By specifying a GS2-Log namespace, API request and response logs for guild creation, joining, leaving, and role changes can be collected.
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server
updatedAtlong
*
NowDatetime of last update
Unix time, milliseconds
* Set automatically by the server
revisionlong00 ~ 9223372036854775805Revision

TransactionSetting

Transaction Setting

Transaction Setting controls how transactions are executed, including their consistency, asynchronous processing, and conflict avoidance mechanisms. Combining features like AutoRun, AtomicCommit, asynchronous execution using GS2-Distributor, batch application of script results, and asynchronous Acquire Actions via GS2-JobQueue enables robust transaction management tailored to game logic.

Details
TypeConditionRequiredDefaultValue LimitsDescription
enableAutoRunboolfalseWhether to automatically execute issued transactions on the server side
enableAtomicCommitbool{enableAutoRun} == truefalseWhether to commit the execution of transactions atomically
* Applicable only if enableAutoRun is true
transactionUseDistributorbool{enableAtomicCommit} == truefalseWhether to execute transactions asynchronously
* Applicable only if enableAtomicCommit is true
commitScriptResultInUseDistributorbool{transactionUseDistributor} == truefalseWhether to execute the commit processing of the script result asynchronously
* Applicable only if transactionUseDistributor is true
acquireActionUseJobQueuebool{enableAtomicCommit} == truefalseWhether to use GS2-JobQueue to execute the acquire action
* Applicable only if enableAtomicCommit is true
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor Namespace GRN used to execute transactions
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsGS2-JobQueue Namespace GRN used to execute transactions

ScriptSetting

Script Setting

In GS2, you can associate custom scripts with microservice events and execute them. This model holds the settings for triggering script execution.

There are two main ways to execute a script: synchronous execution and asynchronous execution. Synchronous execution blocks processing until the script has finished executing. Instead, you can use the script’s execution results to halt API execution or control the API’s response content.

In contrast, asynchronous execution does not block processing until the script has finished executing. However, because the script result cannot be used to stop the API execution or modify the API response, asynchronous execution does not affect the API response flow and is generally recommended.

There are two types of asynchronous execution methods: GS2-Script and Amazon EventBridge. By using Amazon EventBridge, you can write processing in languages other than Lua.

Details
TypeConditionRequiredDefaultValue LimitsDescription
triggerScriptIdstring~ 1024 charsGS2-Script script GRN executed synchronously when the API is executed
Must be specified in GRN format starting with “grn:gs2:”.
doneTriggerTargetTypeString Enum
enum {
  “none”,
  “gs2_script”,
  “aws”
}
“none”How to execute asynchronous scripts
Specifies the type of script to use for asynchronous execution.
You can choose from “Do not use asynchronous execution (none)”, “Use GS2-Script (gs2_script)”, and “Use Amazon EventBridge (aws)”.
DefinitionDescription
“none”None
“gs2_script”GS2-Script
“aws”Amazon EventBridge
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsGS2-Script script GRN for asynchronous execution
Must be specified in GRN format starting with “grn:gs2:”.
* Applicable only if doneTriggerTargetType is “gs2_script”
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsGS2-JobQueue namespace GRN to execute asynchronous execution scripts
If you want to execute asynchronous execution scripts via GS2-JobQueue instead of executing them directly, specify the GS2-JobQueue namespace GRN.
There are not many cases where GS2-JobQueue is required, so you generally do not need to specify it unless you have a specific reason.
* Applicable only if doneTriggerTargetType is “gs2_script”

NotificationSetting

Push Notification Settings

This is a setting for sending push notifications when an event occurs in a GS2 microservice. The push notification here refers to the processing via the WebSocket interface provided by GS2-Gateway, and is different from the push notification of a smartphone. For example, when a matchmaking is completed or a friend request is received, the GS2-Gateway can send a push notification via the WebSocket interface, and the game client can detect the change of the state.

GS2-Gateway’s push notifications can be used to forward notifications to mobile push notification services when the destination device is offline. By properly utilizing mobile push notifications, you can implement a flow in which players are notified even if they exit the game during matchmaking and later return to it.

Details
TypeConditionRequiredDefaultValue LimitsDescription
gatewayNamespaceIdstring“grn:gs2:{region}:{ownerId}:gateway:default”~ 1024 charsGS2-Gateway namespace to use for push notifications
Specify the GS2-Gateway namespace ID in GRN format starting with “grn:gs2:”.
enableTransferMobileNotificationbool?falseWhether to forward the notification as a mobile push notification
When this notification is sent and the destination device is offline, specify whether to forward it as a mobile push notification.
soundstring{enableTransferMobileNotification} == true~ 1024 charsSound file name to be used for mobile push notifications
The sound file name specified here is used when sending mobile push notifications, and you can send notifications with a special sound.
* Applicable only if enableTransferMobileNotification is true
enableString Enum
enum {
  “Enabled”,
  “Disabled”
}
“Enabled”Whether to enable push notifications
DefinitionDescription
“Enabled”Enabled
“Disabled”Disabled

LogSetting

Log Output Setting

Log Output Setting defines how log data is exported. This type holds the GS2-Log namespace identifier (Namespace ID) used to export log data. Specify the GS2-Log namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId). Configuring this setting ensures that log data for API requests and responses occurring within the specified namespace is output to the target GS2-Log namespace. GS2-Log provides real-time logs that can be used for system monitoring, analysis, debugging, and other operational purposes.

Details
TypeConditionRequiredDefaultValue LimitsDescription
loggingNamespaceIdstring
~ 1024 charsGS2-Log namespace GRN to output logs
Must be specified in GRN format starting with “grn:gs2:”.

GitHubCheckoutSetting

Setup to check out master data from GitHub

Details
TypeConditionRequiredDefaultValue LimitsDescription
apiKeyIdstring
~ 1024 charsGitHub API Key GRN
repositoryNamestring
~ 1024 charsRepository Name
sourcePathstring
~ 1024 charsMaster data (JSON) file path
referenceTypeString Enum
enum {
  “commit_hash”,
  “branch”,
  “tag”
}
Source of code
DefinitionDescription
“commit_hash”Commit hash
“branch”Branch
“tag”Tag
commitHashstring{referenceType} == “commit_hash”
✓*
~ 1024 charsCommit hash
* Required if referenceType is “commit_hash”
branchNamestring{referenceType} == “branch”
✓*
~ 1024 charsBranch Name
* Required if referenceType is “branch”
tagNamestring{referenceType} == “tag”
✓*
~ 1024 charsTag Name
* Required if referenceType is “tag”

Guild

Guild

A guild can have up to 5 attributes, which can be used when searching for guilds and displaying guild lists.

A guild can set a participation policy, allowing for either open participation or approval-based participation. If open participation is selected, a user who requests to join the guild will immediately become a guild member. If approval-based participation is selected, a user who requests to join the guild will not become a guild member until approved by the guild master or a guild member.

Guild members can be assigned roles, including guild master, guild member, and up to 10 custom roles defined by the guild. A default role can be assigned to guild members when they join the guild.

Details
TypeConditionRequiredDefaultValue LimitsDescription
guildIdstring
*
~ 1024 charsGuild GRN
* Set automatically by the server
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
namestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
displayNamestring
~ 64 charsDisplay Name
A human-readable name for the guild shown to players in the UI. Unlike the guild name (which is a system-generated UUID), the display name is set by the guild creator and can be updated. Used for guild search results, member lists, and other player-facing displays.
attribute1int0 ~ 2147483645Attribute 1
A numeric attribute for the guild that can be used for filtering and sorting in guild search. Up to 5 attributes are available for developers to define custom guild properties such as level, region, play style, or activity requirements.
attribute2int0 ~ 2147483645Attribute 2
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute3int0 ~ 2147483645Attribute 3
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute4int0 ~ 2147483645Attribute 4
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute5int0 ~ 2147483645Attribute 5
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
metadatastring~ 1024 charsGuild Metadata
Arbitrary data associated with the guild that does not affect GS2 behavior. Can be used to store game-specific information such as guild emblems, descriptions, recruitment messages, or other custom data.
joinPolicyString Enum
enum {
  “anybody”,
  “approval”
}
Join Policy
Controls how users can join this guild. “anybody” allows any user to join immediately without approval. “approval” requires the guild master or authorized members to approve join requests before the user becomes a member. This can be changed by the guild master at any time.
DefinitionDescription
“anybody”Anybody can join
“approval”Approval required
customRolesList<RoleModel>[]0 ~ 10 itemsCustom Roles List
A list of guild-specific custom role definitions that override or extend the model-level roles. Each guild can define up to 10 custom roles with unique permission sets. These roles can be assigned to members in addition to the model-level roles.
guildMemberDefaultRolestring~ 128 charsDefault Custom Role
The custom role automatically assigned to new members when they join this specific guild. If set, overrides the guild model’s guildMemberDefaultRole for this guild. Must reference a role defined in the customRoles list.
currentMaximumMemberCountint
1 ~ 2147483646Current Maximum Member Count
The current maximum number of members this guild can have. Initialized with the guild model’s defaultMaximumMemberCount when the guild is created, and can be increased up to maximumMemberCount through guild operations or acquire actions (e.g., guild expansion items).
membersList<Member>[]0 ~ 100 itemsGuild Member List
The list of all current members of this guild, including guild masters and regular members. Each entry contains the member’s user ID, assigned role, metadata, and join timestamp. The number of members cannot exceed currentMaximumMemberCount.
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server
updatedAtlong
*
NowDatetime of last update
Unix time, milliseconds
* Set automatically by the server
revisionlong00 ~ 9223372036854775805Revision

JoinedGuild

Joined Guild

Represents a user’s membership in a specific guild. Created when a user joins a guild (either directly or through approved request) and deleted when the user leaves or is expelled. Used to track which guilds a user currently belongs to, enabling enforcement of the maxConcurrentJoinGuilds limit.

Details
TypeConditionRequiredDefaultValue LimitsDescription
joinedGuildIdstring
*
~ 1024 charsJoined Guild GRN
* Set automatically by the server
guildModelNamestring
~ 128 charsGuild Model Name
The name of the guild model that the joined guild belongs to. References the guild model definition which contains membership limits, role configurations, and other guild type settings.
guildNamestring
~ 128 charsGuild Name
The unique name (UUID) of the guild that the user has joined. Used to identify the specific guild instance within the guild model.
userIdstring
~ 128 charsUser ID
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server

LastGuildMasterActivity

Last Guild Master Activity

Tracks the last time any guild master performed an activity within the guild. This timestamp is used by the inactivity-based succession system: when the configured inactivityPeriodDays in the guild model elapses without any guild master activity, leadership can be automatically transferred to another member. Each guild has one activity record that is updated whenever a guild master performs a guild operation.

Details
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
updatedAtlong
*
NowDatetime of last update
Unix time, milliseconds
* Set automatically by the server

ReceiveMemberRequest

Received Join Request

This entity represents a received guild join request that is awaiting approval. This is a participation request accepted by the relevant guild. Once the relevant guild approves it, the participation request is deleted and the member is added to the member list.

Details
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
The GS2 user ID of the player who sent this join request to the guild. This identifies the applicant and is used to add them to the guild’s member list upon approval, or to notify them upon rejection.
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild that received this join request. This identifies the specific guild instance whose inbox contains this pending request, and is used to match the request with the guild’s member management operations.
metadatastring~ 512 charsMetadata
Optional arbitrary data attached to this join request by the applicant, such as an introduction message or application reason. Guild masters can review this data when deciding whether to approve or reject the request. Maximum 512 characters.
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server

SendMemberRequest

Sent Join Request

This entity represents the state of a member registration application in progress. This entity represents a guild join request sent by the user. When the recipient user approves it, the join request is deleted and the user is added to the member list.

Details
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
The GS2 user ID of the player who sent this guild join request. This identifies the requesting user and is used to add them to the guild’s member list upon approval.
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild to which the join request was sent. This identifies the specific guild instance that the user is requesting to join, and is used to locate the guild’s inbox for request processing.
metadatastring~ 512 charsMetadata
Optional arbitrary data attached to this join request, such as an introduction message or application reason. This data is visible to guild masters when reviewing the request, allowing them to make informed approval decisions. Maximum 512 characters.
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server

IgnoreUser

Ignore User

Represents a user who is blocked from joining a specific guild. When a user is added to the ignore list, their join requests are automatically rejected, and they cannot join the guild even if the join policy is set to open. Used by guild masters to manage unwanted members.

Details
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server

GuildModel

Guild Model

A Guild Model is an entity that sets the maximum number of people who can join the guild and the permission settings for each position within the guild.

Details
TypeConditionRequiredDefaultValue LimitsDescription
guildModelIdstring
*
~ 1024 charsGuild Model GRN
* Set automatically by the server
namestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
defaultMaximumMemberCountint
1 ~ 2147483646Default Maximum Member Count
The initial maximum number of members allowed when a new guild is created. This value is used as the starting currentMaximumMemberCount for new guilds. Can be increased later up to the maximumMemberCount limit through guild operations or acquire actions.
maximumMemberCountint
1 ~ 2147483646Maximum Member Count
The absolute upper limit for the number of members a guild can have. The guild’s currentMaximumMemberCount cannot exceed this value. This serves as a hard cap to prevent guilds from growing beyond the intended size.
inactivityPeriodDaysint71 ~ 365Inactivity Period Days
The number of days of guild master inactivity after which a new guild master is automatically selected from the remaining guild members. This prevents guilds from becoming unmanageable when the guild master stops playing.
rolesList<RoleModel>
1 ~ 10 itemsList of Role Models
The list of role definitions available within guilds of this type. Must include at least the roles referenced by guildMasterRole and guildMemberDefaultRole. Each role defines a unique set of permissions via a policy document. Up to 10 roles can be defined.
guildMasterRolestring
~ 128 charsGuild Master Role Name
The name of the role assigned to guild masters. Must reference a role defined in the roles list. Guild masters typically have full permissions to manage the guild, including approving join requests, expelling members, changing roles, and updating guild settings.
guildMemberDefaultRolestring
~ 128 charsDefault Member Role Name
The name of the role automatically assigned to new guild members when they join. Must reference a role defined in the roles list. This is the baseline permission set for regular members before any role changes by the guild master.
rejoinCoolTimeMinutesint00 ~ 2147483646Rejoin Cool Time (Minutes)
The cooldown period in minutes before a user can rejoin a guild after leaving. Set to 0 to allow immediate rejoining. This prevents abuse patterns where users repeatedly join and leave guilds.
maxConcurrentJoinGuildsint1 ~ 10Maximum Concurrent Guild Memberships
The maximum number of guilds of this type that a user can be a member of simultaneously. Allows for designs where players can belong to multiple guilds at the same time (e.g., a combat guild and a social guild). The value ranges from 1 to 10.
maxConcurrentGuildMasterCountint1 ~ 100Maximum Concurrent Guild Master Count
The maximum number of guild masters that can exist in a single guild at the same time. Allows for co-leadership designs where multiple players share guild master responsibilities and permissions. The value ranges from 1 to 100.

RoleModel

Role Model

The role model defines the role within the guild and sets the permissions for each role.

Details
TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsRole Model name
Role Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
policyDocumentstring
~ 10240 charsPolicy Document
A JSON-formatted policy document that defines the permissions for this role. Specifies which guild operations (such as accepting/rejecting join requests, expelling members, updating guild info, changing member roles) are allowed or denied for members assigned to this role.

Member

Member

An entity that manages a list of guild members

Details
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
roleNamestring
~ 128 charsRole Model name
Role Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.
joinedAtlong
*
NowDate and time of joining the guild
Unix time, milliseconds

VerifyActionResult

Verify Action execution result

Details
TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
Type of action to be executed in the Verify Action
verifyRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
verifyResultstring~ 1048576 charsResult payload

ConsumeActionResult

Consume Action execution result

Details
TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
Type of action to be executed in the Consume Action
consumeRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
consumeResultstring~ 1048576 charsResult payload

AcquireActionResult

Acquire Action execution result

Details
TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
Type of action to be executed in the Acquire Action
acquireRequeststring
~ 524288 charsJSON string of the request used when executing the action
statusCodeint0 ~ 999Status code
acquireResultstring~ 1048576 charsResult payload

TransactionResult

Transaction execution results

Result of a transaction executed using the server-side automatic transaction execution feature

Details
TypeConditionRequiredDefaultValue LimitsDescription
transactionIdstring
36 ~ 36 charsTransaction ID
verifyResultsList<VerifyActionResult>0 ~ 10 itemsList of verify action execution results
consumeResultsList<ConsumeActionResult>[]0 ~ 10 itemsList of Consume Action execution results
acquireResultsList<AcquireActionResult>[]0 ~ 100 itemsList of Acquire Action execution results
hasErrorboolfalseWhether an error occurred during transaction execution

CurrentGuildMaster

Currently active Guild Model master data

This master data describes the definitions of Guild Models currently active within the namespace. GS2 uses JSON format files for managing master data. By uploading these files, the master data settings are updated on the server.

To create JSON files, GS2 provides a master data editor within the management console. Additionally, you can create tools better suited for game operations and export JSON files in the appropriate format.

Details
TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
*
~ 1024 charsNamespace GRN
* Set automatically by the server
settingsstring
~ 5242880 bytes (5MB)Master Data

GuildModelMaster

Guild Model Master

Guild Model Master is data used to edit and manage Guild Model within the game. It is temporarily stored in the Management Console’s Master Data Editor. By performing import and update processes, it is reflected as Guild Model actually referenced by the game.

A Guild Model Master is an entity that sets the maximum number of people who can join the guild and the permission settings for each position within the guild.

Details
TypeConditionRequiredDefaultValue LimitsDescription
guildModelIdstring
*
~ 1024 charsGuild Model Master GRN
* Set automatically by the server
namestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
defaultMaximumMemberCountint
0 ~ 2147483646Default Maximum Member Count
The initial maximum number of members allowed when a new guild is created. This value is used as the starting currentMaximumMemberCount for new guilds. Can be increased later up to the maximumMemberCount limit through guild operations or acquire actions.
maximumMemberCountint
0 ~ 2147483646Maximum Member Count
The absolute upper limit for the number of members a guild can have. The guild’s currentMaximumMemberCount cannot exceed this value. This serves as a hard cap to prevent guilds from growing beyond the intended size.
inactivityPeriodDaysint71 ~ 365Inactivity Period Days
The number of days of guild master inactivity after which a new guild master is automatically selected from the remaining guild members. This prevents guilds from becoming unmanageable when the guild master stops playing.
rolesList<RoleModel>
1 ~ 10 itemsList of Role Models
The list of role definitions available within guilds of this type. Must include at least the roles referenced by guildMasterRole and guildMemberDefaultRole. Up to 10 roles can be defined.
guildMasterRolestring
~ 128 charsGuild Master Role Name
The name of the role assigned to guild masters. Must reference a role defined in the roles list. Guild masters typically have full permissions to manage the guild.
guildMemberDefaultRolestring
~ 128 charsDefault Member Role Name
The name of the role automatically assigned to new guild members when they join. Must reference a role defined in the roles list.
rejoinCoolTimeMinutesint00 ~ 2147483646Rejoin Cool Time (Minutes)
The cooldown period in minutes before a user can rejoin a guild after leaving. Set to 0 to allow immediate rejoining. This prevents abuse patterns where users repeatedly join and leave guilds.
maxConcurrentJoinGuildsint1 ~ 10Maximum Concurrent Guild Memberships
The maximum number of guilds of this type that a user can be a member of simultaneously. The value ranges from 1 to 10.
maxConcurrentGuildMasterCountint1 ~ 100Maximum Concurrent Guild Master Count
The maximum number of guild masters that can exist in a single guild at the same time. Allows for co-leadership designs. The value ranges from 1 to 100.
createdAtlong
*
NowDatetime of creation
Unix time, milliseconds
* Set automatically by the server
updatedAtlong
*
NowDatetime of last update
Unix time, milliseconds
* Set automatically by the server
revisionlong00 ~ 9223372036854775805Revision

Methods

describeNamespaces

Get a list of Namespaces

Retrieves a list of namespaces that have been created on a per-service basis within the project. You can use the optional page token to start acquiring data from a specific location in the list. You can also limit the number of namespaces to be acquired.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namePrefixstring~ 64 charsFilter by Namespace name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<Namespace>List of Namespace
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Create a new Namespace

You must specify detailed information including the name, description, and various settings of the namespace.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction Setting
Configuration for controlling how distributed transactions are executed when processing guild operations. Supports auto-run, atomic commit, and async processing options.
changeNotificationNotificationSettingGuild Change Notification
Push notification sent via GS2-Gateway when guild information (display name, attributes, join policy, etc.) is updated. Allows guild members to receive real-time updates about changes to their guild.
joinNotificationNotificationSettingMember Join Notification
Push notification sent via GS2-Gateway when a new member joins the guild, either through direct join (open policy) or after approval of a join request. Enables existing members to be notified of new additions.
leaveNotificationNotificationSettingMember Leave Notification
Push notification sent via GS2-Gateway when a member leaves or is removed from the guild. Covers both voluntary departures and expulsions by guild masters.
changeMemberNotificationNotificationSettingMember Change Notification
Push notification sent via GS2-Gateway when a guild member’s information (role, metadata) is updated. Whether metadata changes trigger this notification can be controlled with changeMemberNotificationIgnoreChangeMetadata.
changeMemberNotificationIgnoreChangeMetadatabool?falseWhether to ignore changes in metadata when issuing notifications when member metadata is updated
receiveRequestNotificationNotificationSettingReceive Request Notification
Push notification sent via GS2-Gateway when the guild receives a new join request from a user. Allows guild masters and authorized members to be notified of pending requests that require approval.
removeRequestNotificationNotificationSettingRemove Request Notification
Push notification sent via GS2-Gateway when a guild join request is deleted, either by cancellation from the sender, rejection by the guild, or approval (which removes the request and adds the member).
createGuildScriptScriptSettingScript to execute when creating a Guild
Script Trigger Reference - createGuild
updateGuildScriptScriptSettingScript to execute when update a guild
Script Trigger Reference - updateGuild
joinGuildScriptScriptSettingScript to execute when joining a guild
Script Trigger Reference - joinGuild
receiveJoinRequestScriptScriptSettingScript to execute when receiving a guild join request
Script Trigger Reference - receiveJoinRequest
leaveGuildScriptScriptSettingScript to execute when leaving a guild
Script Trigger Reference - leaveGuild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
Script Trigger Reference - changeRole
deleteGuildScriptScriptSettingScript to execute when deleting a guild
Script Trigger Reference - deleteGuild
logSettingLogSettingLog Output Setting
Configuration for outputting log data of guild operations to GS2-Log. By specifying a GS2-Log namespace, API request and response logs for guild creation, joining, leaving, and role changes can be collected.

Result

TypeDescription
itemNamespaceNamespace created

Implementation Example

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.Item
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\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

Get Namespace status

Get the current status of the specified namespace. This includes whether the Namespace is active, pending, or in some other state.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
statusstring

Implementation Example

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.Status
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\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

Get namespace

Get detailed information about the specified namespace. This includes the name, description, and other settings of the namespace.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemNamespaceNamespace

Implementation Example

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.Item
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\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

Update Namespace

Update the settings of the specified namespace. You can change the description of the Namespace and specific settings.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction Setting
Configuration for controlling how distributed transactions are executed when processing guild operations. Supports auto-run, atomic commit, and async processing options.
changeNotificationNotificationSettingGuild Change Notification
Push notification sent via GS2-Gateway when guild information (display name, attributes, join policy, etc.) is updated. Allows guild members to receive real-time updates about changes to their guild.
joinNotificationNotificationSettingMember Join Notification
Push notification sent via GS2-Gateway when a new member joins the guild, either through direct join (open policy) or after approval of a join request. Enables existing members to be notified of new additions.
leaveNotificationNotificationSettingMember Leave Notification
Push notification sent via GS2-Gateway when a member leaves or is removed from the guild. Covers both voluntary departures and expulsions by guild masters.
changeMemberNotificationNotificationSettingMember Change Notification
Push notification sent via GS2-Gateway when a guild member’s information (role, metadata) is updated. Whether metadata changes trigger this notification can be controlled with changeMemberNotificationIgnoreChangeMetadata.
changeMemberNotificationIgnoreChangeMetadatabool?falseWhether to ignore changes in metadata when issuing notifications when member metadata is updated
receiveRequestNotificationNotificationSettingReceive Request Notification
Push notification sent via GS2-Gateway when the guild receives a new join request from a user. Allows guild masters and authorized members to be notified of pending requests that require approval.
removeRequestNotificationNotificationSettingRemove Request Notification
Push notification sent via GS2-Gateway when a guild join request is deleted, either by cancellation from the sender, rejection by the guild, or approval (which removes the request and adds the member).
createGuildScriptScriptSettingScript to execute when creating a Guild
Script Trigger Reference - createGuild
updateGuildScriptScriptSettingScript to execute when update a guild
Script Trigger Reference - updateGuild
joinGuildScriptScriptSettingScript to execute when joining a guild
Script Trigger Reference - joinGuild
receiveJoinRequestScriptScriptSettingScript to execute when receiving a guild join request
Script Trigger Reference - receiveJoinRequest
leaveGuildScriptScriptSettingScript to execute when leaving a guild
Script Trigger Reference - leaveGuild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
Script Trigger Reference - changeRole
deleteGuildScriptScriptSettingScript to execute when deleting a guild
Script Trigger Reference - deleteGuild
logSettingLogSettingLog Output Setting
Configuration for outputting log data of guild operations to GS2-Log. By specifying a GS2-Log namespace, API request and response logs for guild creation, joining, leaving, and role changes can be collected.

Result

TypeDescription
itemNamespaceNamespace updated

Implementation Example

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.Item
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\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

Delete Namespace

Delete the specified namespace. This operation is irreversible and all data associated with the deleted Namespace will be lost.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemNamespaceThe deleted Namespace

Implementation Example

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.Item
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\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

Get the microservice version

Details

Request

Request parameters: None

Result

TypeDescription
itemstringVersion

Implementation Example

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.Item
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\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

Dump data associated with the specified user ID

Can be used to meet legal requirements for the protection of personal information, or to back up or migrate data.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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.result
client = 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.result

checkDumpUserDataByUserId

Check if the dump of the data associated with the specified user ID is complete

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of output data

Implementation Example

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.Url
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\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

Delete user data

Execute cleaning of data associated with the specified user ID This allows you to safely delete specific user data from the project.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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.result
client = 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.result

checkCleanUserDataByUserId

Check if the cleaning of the data associated with the specified user ID is complete

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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.result
client = 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.result

prepareImportUserDataByUserId

Execute import of data associated with the specified user ID

The data that can be used for import is limited to the data exported by GS2, and old data may fail to import. You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.

You can start the actual import process by uploading the exported zip file to the URL returned in the return value of this API and calling importUserDataByUserId.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
uploadTokenstringToken used to reflect results after upload
uploadUrlstringURL used to upload user data

Implementation Example

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.UploadUrl
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\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

Execute import of data associated with the specified user ID

The data that can be used for import is limited to the data exported by GS2, and old data may fail to import. You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.

Before calling this API, you must call prepareImportUserDataByUserId to complete the upload preparation.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
uploadTokenstring
~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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.result
client = 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.result

checkImportUserDataByUserId

Check if the import of the data associated with the specified user ID is complete

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
uploadTokenstring
~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of log data

Implementation Example

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.Url
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\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

Search Guilds

Searches for guilds with various filter criteria. Supports filtering by displayName (partial match), integer attributes (attributes1-5), and join policies. Results can be sorted by number of players, attribute values (ascending/descending), or last updated time. By default, guilds at full member capacity are excluded; set includeFullMembersGuild to true to include them.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
displayNamestring~ 64 charsDisplay name to search for guild
attributes1List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes2List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes3List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes4List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes5List<int>0 ~ 10 itemsList of guild operation policies to search for guild
joinPoliciesList<string>0 ~ 10 itemsList of guild join policies to search for guild
includeFullMembersGuildbool?falseWhether to include full guilds in search results
orderByString Enum
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”Sort order
DefinitionDescription
“number_of_players”Number of players joined
“attribute1_asc”Attribute1 ascending
“attribute1_desc”Attribute1 descending
“attribute2_asc”Attribute2 ascending
“attribute2_desc”Attribute2 descending
“attribute3_asc”Attribute3 ascending
“attribute3_desc”Attribute3 descending
“attribute4_asc”Attribute4 ascending
“attribute4_desc”Attribute4 descending
“attribute5_asc”Attribute5 ascending
“attribute5_desc”Attribute5 descending
“last_updated”Last updated
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<Guild>List of Guild
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Search Guilds by specifying a user ID

Searches for guilds with various filter criteria (server-side operation). The same filtering, sorting, and full-member-guild exclusion options apply as in the user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
displayNamestring~ 64 charsDisplay name to search for guild
attributes1List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes2List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes3List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes4List<int>0 ~ 10 itemsList of guild operation policies to search for guild
attributes5List<int>0 ~ 10 itemsList of guild operation policies to search for guild
joinPoliciesList<string>0 ~ 10 itemsList of guild join policies to search for guild
includeFullMembersGuildbool?falseWhether to include full guilds in search results
orderByString Enum
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”Sort order
DefinitionDescription
“number_of_players”Number of players joined
“attribute1_asc”Attribute1 ascending
“attribute1_desc”Attribute1 descending
“attribute2_asc”Attribute2 ascending
“attribute2_desc”Attribute2 descending
“attribute3_asc”Attribute3 ascending
“attribute3_desc”Attribute3 descending
“attribute4_asc”Attribute4 ascending
“attribute4_desc”Attribute4 descending
“attribute5_asc”Attribute5 ascending
“attribute5_desc”Attribute5 descending
“last_updated”Last updated
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<Guild>List of Guild
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Create a new Guild

Creates a new guild and automatically registers the requesting user as the guild master. Validates that the user’s maxConcurrentJoinGuilds limit is not exceeded before creation. The guild can be configured with a display name, custom attributes (attribute1-5), join policy, custom roles, and default member role.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
displayNamestring
~ 64 charsDisplay Name
A human-readable name for the guild shown to players in the UI. Unlike the guild name (which is a system-generated UUID), the display name is set by the guild creator and can be updated. Used for guild search results, member lists, and other player-facing displays.
attribute1int0 ~ 2147483645Attribute 1
A numeric attribute for the guild that can be used for filtering and sorting in guild search. Up to 5 attributes are available for developers to define custom guild properties such as level, region, play style, or activity requirements.
attribute2int0 ~ 2147483645Attribute 2
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute3int0 ~ 2147483645Attribute 3
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute4int0 ~ 2147483645Attribute 4
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute5int0 ~ 2147483645Attribute 5
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
metadatastring~ 1024 charsGuild Metadata
Arbitrary data associated with the guild that does not affect GS2 behavior. Can be used to store game-specific information such as guild emblems, descriptions, recruitment messages, or other custom data.
memberMetadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.
joinPolicyString Enum
enum {
  “anybody”,
  “approval”
}
Join Policy
Controls how users can join this guild. “anybody” allows any user to join immediately without approval. “approval” requires the guild master or authorized members to approve join requests before the user becomes a member. This can be changed by the guild master at any time.
DefinitionDescription
“anybody”Anybody can join
“approval”Approval required
customRolesList<RoleModel>[]0 ~ 10 itemsCustom Roles List
A list of guild-specific custom role definitions that override or extend the model-level roles. Each guild can define up to 10 custom roles with unique permission sets. These roles can be assigned to members in addition to the model-level roles.
guildMemberDefaultRolestring~ 128 charsDefault Custom Role
The custom role automatically assigned to new members when they join this specific guild. If set, overrides the guild model’s guildMemberDefaultRole for this guild. Must reference a role defined in the customRoles list.

Result

TypeDescription
itemGuildGuild created

Implementation Example

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.Item
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\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

Create a new Guild by specifying a user ID

Creates a new guild with the specified user as the guild master (server-side operation). The same maxConcurrentJoinGuilds validation applies as in the user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
displayNamestring
~ 64 charsDisplay Name
A human-readable name for the guild shown to players in the UI. Unlike the guild name (which is a system-generated UUID), the display name is set by the guild creator and can be updated. Used for guild search results, member lists, and other player-facing displays.
attribute1int0 ~ 2147483645Attribute 1
A numeric attribute for the guild that can be used for filtering and sorting in guild search. Up to 5 attributes are available for developers to define custom guild properties such as level, region, play style, or activity requirements.
attribute2int0 ~ 2147483645Attribute 2
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute3int0 ~ 2147483645Attribute 3
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute4int0 ~ 2147483645Attribute 4
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute5int0 ~ 2147483645Attribute 5
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
metadatastring~ 1024 charsGuild Metadata
Arbitrary data associated with the guild that does not affect GS2 behavior. Can be used to store game-specific information such as guild emblems, descriptions, recruitment messages, or other custom data.
memberMetadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.
joinPolicyString Enum
enum {
  “anybody”,
  “approval”
}
Join Policy
Controls how users can join this guild. “anybody” allows any user to join immediately without approval. “approval” requires the guild master or authorized members to approve join requests before the user becomes a member. This can be changed by the guild master at any time.
DefinitionDescription
“anybody”Anybody can join
“approval”Approval required
customRolesList<RoleModel>[]0 ~ 10 itemsCustom Roles List
A list of guild-specific custom role definitions that override or extend the model-level roles. Each guild can define up to 10 custom roles with unique permission sets. These roles can be assigned to members in addition to the model-level roles.
guildMemberDefaultRolestring~ 128 charsDefault Custom Role
The custom role automatically assigned to new members when they join this specific guild. If set, overrides the guild model’s guildMemberDefaultRole for this guild. Must reference a role defined in the customRoles list.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildGuild created

Implementation Example

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.Item
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\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

Get Guild

Retrieves the detailed information of a specific guild, including its members, custom attributes, join policy, and roles.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.

Result

TypeDescription
itemGuildGuild

Implementation Example

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.Item
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\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

Get Guild by specifying a user ID

Retrieves the detailed information of a specific guild (server-side operation), including its members, custom attributes, join policy, and roles.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildGuild

Implementation Example

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.Item
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\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

Update Guild

Updates the guild’s configuration including display name, custom attributes (attribute1-5), metadata, join policy, custom roles, and default member role. Executes the UpdateGuildScript callback with both the old and new guild data. Sends a change notification to all guild members informing them of the update. Please specify the access token of the guild user to Assume.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
displayNamestring
~ 64 charsDisplay Name
A human-readable name for the guild shown to players in the UI. Unlike the guild name (which is a system-generated UUID), the display name is set by the guild creator and can be updated. Used for guild search results, member lists, and other player-facing displays.
attribute1int0 ~ 2147483645Attribute 1
A numeric attribute for the guild that can be used for filtering and sorting in guild search. Up to 5 attributes are available for developers to define custom guild properties such as level, region, play style, or activity requirements.
attribute2int0 ~ 2147483645Attribute 2
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute3int0 ~ 2147483645Attribute 3
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute4int0 ~ 2147483645Attribute 4
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute5int0 ~ 2147483645Attribute 5
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
metadatastring~ 1024 charsGuild Metadata
Arbitrary data associated with the guild that does not affect GS2 behavior. Can be used to store game-specific information such as guild emblems, descriptions, recruitment messages, or other custom data.
joinPolicyString Enum
enum {
  “anybody”,
  “approval”
}
Join Policy
Controls how users can join this guild. “anybody” allows any user to join immediately without approval. “approval” requires the guild master or authorized members to approve join requests before the user becomes a member. This can be changed by the guild master at any time.
DefinitionDescription
“anybody”Anybody can join
“approval”Approval required
customRolesList<RoleModel>[]0 ~ 10 itemsCustom Roles List
A list of guild-specific custom role definitions that override or extend the model-level roles. Each guild can define up to 10 custom roles with unique permission sets. These roles can be assigned to members in addition to the model-level roles.
guildMemberDefaultRolestring~ 128 charsDefault Custom Role
The custom role automatically assigned to new members when they join this specific guild. If set, overrides the guild model’s guildMemberDefaultRole for this guild. Must reference a role defined in the customRoles list.

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update Guild by specifying a Guild name

Updates the specified guild’s configuration (server-side operation). The same UpdateGuildScript callback and member change notification apply as in the guild-user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
displayNamestring
~ 64 charsDisplay Name
A human-readable name for the guild shown to players in the UI. Unlike the guild name (which is a system-generated UUID), the display name is set by the guild creator and can be updated. Used for guild search results, member lists, and other player-facing displays.
attribute1int0 ~ 2147483645Attribute 1
A numeric attribute for the guild that can be used for filtering and sorting in guild search. Up to 5 attributes are available for developers to define custom guild properties such as level, region, play style, or activity requirements.
attribute2int0 ~ 2147483645Attribute 2
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute3int0 ~ 2147483645Attribute 3
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute4int0 ~ 2147483645Attribute 4
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
attribute5int0 ~ 2147483645Attribute 5
A numeric attribute for the guild that can be used for filtering and sorting in guild search. See attribute1 for details.
metadatastring~ 1024 charsGuild Metadata
Arbitrary data associated with the guild that does not affect GS2 behavior. Can be used to store game-specific information such as guild emblems, descriptions, recruitment messages, or other custom data.
joinPolicyString Enum
enum {
  “anybody”,
  “approval”
}
Join Policy
Controls how users can join this guild. “anybody” allows any user to join immediately without approval. “approval” requires the guild master or authorized members to approve join requests before the user becomes a member. This can be changed by the guild master at any time.
DefinitionDescription
“anybody”Anybody can join
“approval”Approval required
customRolesList<RoleModel>[]0 ~ 10 itemsCustom Roles List
A list of guild-specific custom role definitions that override or extend the model-level roles. Each guild can define up to 10 custom roles with unique permission sets. These roles can be assigned to members in addition to the model-level roles.
guildMemberDefaultRolestring~ 128 charsDefault Custom Role
The custom role automatically assigned to new members when they join this specific guild. If set, overrides the guild model’s guildMemberDefaultRole for this guild. Must reference a role defined in the customRoles list.

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Expel member

Removes the specified user from the guild’s member list. Before removal, validates that the guild will still have at least one guild master after the expulsion; if the target user is the last guild master, the operation is rejected with a GuildMasterRequired error. Please specify the access token as the access token assumed by the guild user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
targetUserIdstring
~ 128 charsUser ID to be expelled

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Expel member by specifying a Guild name

Removes the specified user from the specified guild’s member list (server-side operation). The same guild master count validation (GuildMasterRequired) applies as in the guild-user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
targetUserIdstring
~ 128 charsUser ID to be expelled

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update member role

Changes the role of a specific guild member to the specified role name. Validates that the target user is a member of the guild before updating. The member’s role update timestamp is also refreshed. Please specify the access token as the access token assumed by the guild user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
targetUserIdstring
~ 128 charsUser ID to be updated
roleNamestring
~ 128 charsRole Model name
Role Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update member role by specifying a Guild name

Changes the role of a specific guild member in the specified guild (server-side operation). The same member validation and timestamp update apply as in the guild-user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
targetUserIdstring
~ 128 charsUser ID to be updated
roleNamestring
~ 128 charsRole Model name
Role Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update member role in bulk

Updates the roles of multiple guild members in a single operation. Only the members specified in the request are updated; members not included in the list retain their current roles. Please specify the access token as the access token assumed by the guild user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
membersList<Member>
1 ~ 100 itemsList of members to update

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update member role in bulk by specifying a Guild name

Updates the roles of multiple guild members in the specified guild in a single operation (server-side operation). Only the members specified in the request are updated; members not included retain their current roles.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
membersList<Member>
1 ~ 100 itemsList of members to update

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Delete Guild

Deletes the guild and all associated data. All guild members are removed, with each member’s LeaveGuildScript callback executed and LeaveNotification sent.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name

Result

TypeDescription
itemGuildGuild deleted

Implementation Example

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.Item
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\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

Delete Guild by specifying a Guild name

Deletes the specified guild and all associated data (server-side operation). The same LeaveGuildScript callbacks and LeaveNotifications apply as in the guild-user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name

Result

TypeDescription
itemGuildGuild deleted

Implementation Example

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.Item
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\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

Add the maximum number of members by specifying a Guild name

Increases the guild’s currentMaximumMemberCount by the specified value. The resulting value must not exceed the maximumMemberCount defined in the guild model.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Decrease the maximum number of members

Decreases the guild’s currentMaximumMemberCount by the specified value. The resulting value cannot go below zero.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Decrease the maximum number of members by specifying a Guild name

Decreases the specified guild’s currentMaximumMemberCount by the specified value (server-side operation). The resulting value cannot go below zero.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Verify the maximum number of guild members

Verifies the guild’s currentMaximumMemberCount against the specified value using the chosen comparison operator. Supported operators: less, lessEqual, greater, greaterEqual, equal, notEqual. If the verification fails, an error is returned. This is useful for conditional logic in transactions.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
Type of verification
DefinitionDescription
“less”The maximum number of guild members is less than the specified value
“lessEqual”The maximum number of guild members is less than or equal to the specified value
“greater”The maximum number of guild members is greater than the specified value
“greaterEqual”The maximum number of guild members is greater than or equal to the specified value
“equal”The maximum number of guild members is equal to the specified value
“notEqual”The maximum number of guild members is not equal to the specified value
valueint1 ~ 2147483646Maximum number of guild members
multiplyValueSpecifyingQuantityboolfalseWhether to multiply the value used for verification when specifying the quantity

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Verify the maximum number of guild members by specifying a Guild name

Verifies the specified guild’s currentMaximumMemberCount against the specified value using the chosen comparison operator (server-side operation). Supported operators: less, lessEqual, greater, greaterEqual, equal, notEqual.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
Type of verification
DefinitionDescription
“less”The maximum number of guild members is less than the specified value
“lessEqual”The maximum number of guild members is less than or equal to the specified value
“greater”The maximum number of guild members is greater than the specified value
“greaterEqual”The maximum number of guild members is greater than or equal to the specified value
“equal”The maximum number of guild members is equal to the specified value
“notEqual”The maximum number of guild members is not equal to the specified value
valueint1 ~ 2147483646Maximum number of guild members
multiplyValueSpecifyingQuantityboolfalseWhether to multiply the value used for verification when specifying the quantity

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Verify if guild members include user ID

Verifies whether the specified user is or is not a member of the guild. Supports two verification types: ‘include’ checks that the user is a guild member, ’notInclude’ checks that the user is not a guild member. If the verification fails, an error is returned.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
accessTokenstring
~ 128 charsAccess token
verifyTypeString Enum
enum {
  “include”,
  “notInclude”
}
Type of verification
DefinitionDescription
“include”Guild members include the specified user
“notInclude”Guild members do not include the specified user

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Verify if guild members include user ID by specifying a user ID

Verifies whether the specified user is or is not a member of the guild (server-side operation). Supports two verification types: ‘include’ and ’notInclude’.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
userIdstring
~ 128 charsUser ID
verifyTypeString Enum
enum {
  “include”,
  “notInclude”
}
Type of verification
DefinitionDescription
“include”Guild members include the specified user
“notInclude”Guild members do not include the specified user
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Set the maximum number of guild members by specifying a Guild name

Sets the guild’s currentMaximumMemberCount to the specified absolute value. Unlike increase/decrease operations, this directly sets the value rather than applying a delta. Returns both the updated guild and the guild state before the update, allowing the caller to track the change.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
valueint1 ~ 2147483646Set the maximum number of members

Result

TypeDescription
itemGuildGuild updated
oldGuildGuild before update

Implementation Example

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.Old
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\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

Get an access token to act as a guild user

Issues an access token that allows the requesting user to perform operations as the guild entity. This token is required for guild management operations such as updating guild settings, managing members, accepting/rejecting join requests, and managing the ignore list. The requesting user must be a member of the guild; otherwise, a NotIncludedGuildMember error is returned. The response includes the access token, the guild’s user ID, and the token’s expiration timestamp.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.

Result

TypeDescription
tokenstringaccess token
userIdstringUser ID
expirelongExpiration time
A timestamp indicating the expiration time of the token. When this date is reached, the token becomes invalid.
Unix time, milliseconds

Implementation Example

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.Expire
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\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

Get an access token to act as a guild user by specifying the user ID

Issues an access token that allows the specified user to perform operations as the guild entity (server-side operation). The specified user must be a member of the guild; otherwise, a NotIncludedGuildMember error is returned.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
tokenstringaccess token
userIdstringUser ID
expirelongExpiration time
A timestamp indicating the expiration time of the token. When this date is reached, the token becomes invalid.
Unix time, milliseconds

Implementation Example

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.Expire
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\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

Get a list of joined Guilds

Retrieves a paginated list of guilds that the requesting user is currently a member of. An optional guild model name filter can be specified to retrieve joined guilds for a specific guild model only.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<JoinedGuild>Joining guild
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get a list of joined Guilds by specifying a user ID

Retrieves a paginated list of guilds that the specified user is currently a member of (server-side operation). An optional guild model name filter can be specified to retrieve joined guilds for a specific guild model only.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<JoinedGuild>Joining guild
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get Joining Guild

Retrieves the membership information for a specific guild that the requesting user has joined, identified by guild model name and guild name.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.

Result

TypeDescription
itemJoinedGuildJoining guild

Implementation Example

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.Item
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\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

Get Joining Guild by specifying a user ID

Retrieves the membership information for a specific guild that the specified user has joined (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemJoinedGuildJoining guild

Implementation Example

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.Item
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\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

Update member metadata

Updates the metadata of the requesting user’s membership within the specified guild.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
accessTokenstring
~ 128 charsAccess token
metadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Update member metadata by specifying a user ID

Updates the metadata of the specified user’s membership within the specified guild (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
userIdstring
~ 128 charsUser ID to be updated
metadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildGuild updated

Implementation Example

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.Item
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\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

Withdrawal from the Guild

The requesting user leaves the specified guild. If a rejoin cooldown (rejoinCoolTimeMinutes) is configured in the guild model, the user cannot rejoin the same guild until the cooldown period has elapsed. If the user is the only guild master, the withdrawal is rejected with a GuildMasterRequired error to prevent leaving the guild without a leader.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.

Result

TypeDescription
itemJoinedGuildGuild that withdrew
guildGuildGuild

Implementation Example

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.Guild
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\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

Withdrawal from the Guild by specifying the user ID

The specified user leaves the specified guild (server-side operation). The same rejoin cooldown and guild master validation apply as in the user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
UUID~ 36 charsGuild Name
Maintains a unique name for each guild.
The name is automatically generated in UUID (Universally Unique Identifier) format and used to identify each guild.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemJoinedGuildGuild that withdrew
guildGuildGuild

Implementation Example

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.Guild
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\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

Get last activity date and time of guild master

Retrieves the timestamp of the last activity performed by the guild master. This information is used to determine whether the guild master has been inactive long enough for automatic succession via PromoteSeniorMember. The inactivity threshold is calculated based on the inactivityPeriodDays setting in the guild model.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Get last activity date and time of guild master by specifying a Guild name

Retrieves the timestamp of the last activity performed by the guild master for the specified guild (server-side operation). This information is used to determine whether the guild master has been inactive long enough for automatic succession.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Promote the most senior guild member to guild master if the guild master has not logged in for a certain period of time

Checks whether the guild master has been inactive longer than the inactivityPeriodDays threshold (calculated as 24 hours x inactivityPeriodDays). If the condition is met, the longest-serving non-master member (determined by JoinedAt timestamp) is promoted to the guild master role. When maxConcurrentGuildMasterCount is 1, the inactive guild master is demoted to the default member role before the promotion occurs.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Replace an inactive guild master with the longest-serving member by guild name

Checks whether the guild master of the specified guild has been inactive longer than the inactivityPeriodDays threshold (server-side operation). If the condition is met, the longest-serving non-master member (determined by JoinedAt timestamp) is promoted to the guild master role. When maxConcurrentGuildMasterCount is 1, the inactive guild master is demoted to the default member role before the promotion occurs.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Get a list of Received Join Requests

Retrieves a paginated list of join requests that have been sent to the guild and are awaiting approval. Requires the access token of the assumed guild user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<ReceiveMemberRequest>List of join request
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get a list of Received Join Requests by specifying a Guild name

Retrieves a paginated list of join requests that have been sent to the specified guild and are awaiting approval (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<ReceiveMemberRequest>List of join request
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get Received Join Request

Retrieves a specific join request received by the guild from the specified user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestJoin request

Implementation Example

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.Item
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\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

Get Received Join Request by specifying a Guild name

Retrieves a specific join request received by the specified guild from the specified user (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestJoin request

Implementation Example

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.Item
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\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

Accept join request

Accepts a pending join request, adding the requesting user as a guild member. The user is assigned the guild’s default member role, and their member metadata from the original request is preserved. The request is removed from both the guild’s inbox and the sender’s send box. Validates that the user’s maxConcurrentJoinGuilds limit is not exceeded and the guild’s maximum member count is not reached.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestAccepted join request
guildGuildGuild

Implementation Example

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.Guild
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\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

Accept join request by specifying a Guild name

Accepts a pending join request for the specified guild (server-side operation), adding the requesting user as a guild member. The same member assignment, metadata preservation, and limit validations apply as in the guild-user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestAccepted join request
guildGuildGuild

Implementation Example

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.Guild
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\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

Reject join request

Rejects a pending join request, removing it from both the guild’s inbox and the sender’s send box. The requesting user is not added to the guild. No relationship is established.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestRejected join request

Implementation Example

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.Item
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\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

Reject join request by specifying a Guild name

Rejects a pending join request for the specified guild (server-side operation). The request is removed from both the guild’s inbox and the sender’s send box.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemReceiveMemberRequestRejected join request

Implementation Example

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.Item
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\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

Get a list of Sent Join Requests

Retrieves a paginated list of guild join requests that the requesting user has sent and are pending a response. Results can be filtered by guild model name.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<SendMemberRequest>List of join requests
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get a list of Sent Join Requests by specifying a user ID

Retrieves a paginated list of guild join requests that the specified user has sent (server-side operation). Results can be filtered by guild model name.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<SendMemberRequest>List of join requests
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get Sent Join Request

Retrieves a specific guild join request that the requesting user has sent to the specified target guild.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild to which the join request was sent. This identifies the specific guild instance that the user is requesting to join, and is used to locate the guild’s inbox for request processing.

Result

TypeDescription
itemSendMemberRequestJoin Request

Implementation Example

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.Item
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\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

Get Sent Join Request by specifying a user ID

Retrieves a specific guild join request that the specified user has sent to the specified target guild (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild to which the join request was sent. This identifies the specific guild instance that the user is requesting to join, and is used to locate the guild’s inbox for request processing.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSendMemberRequestJoin Request

Implementation Example

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.Item
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\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

Send a join request

Sends a join request to the specified guild. The behavior depends on the guild’s join policy:

  • “anybody” policy: The user is immediately added to the guild as a member with the default role, without requiring approval.
  • Approval-required policy: A join request is created in both the sender’s send box and the guild’s inbox, awaiting guild master approval. Before sending, the following validations are performed: the user is not on the guild’s ignore list, the rejoin cooldown period has elapsed (if the user previously left), and the maxConcurrentJoinGuilds limit is not exceeded. Custom member metadata can be included with the request.
Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsDestination Guild Name
metadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.

Result

TypeDescription
itemGuildJoined guild
Responds when a join request is made to a guild that does not require approval
sendMemberRequestSendMemberRequestSent Join Request
Responds when a join request is made to a guild that requires approval

Implementation Example

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.SendMemberRequest
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\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

Send a join request by specifying the user ID

Sends a join request to the specified guild on behalf of the specified user (server-side operation). The same join policy behavior, validations (ignore list, cooldown, concurrent guild limit), and approval flow apply as in the user-facing version.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsDestination Guild Name
metadatastring~ 512 charsGuild Member Metadata
Arbitrary data associated with this guild member that does not affect GS2 behavior. Can be used to store member-specific information such as contribution points, last login time, or notes visible to guild officers.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildJoined guild
Responds when a join request is made to a guild that does not require approval
sendMemberRequestSendMemberRequestSent Join Request
Responds when a join request is made to a guild that requires approval

Implementation Example

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.SendMemberRequest
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\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

Cancel a sent join request

Cancels (deletes) a guild join request that the requesting user has previously sent. The request is removed from both the sender’s send box and the target guild’s inbox.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsAccess token
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild to which the join request was sent. This identifies the specific guild instance that the user is requesting to join, and is used to locate the guild’s inbox for request processing.

Result

TypeDescription
itemSendMemberRequestJoin request deleted

Implementation Example

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.Item
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\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

Cancel a sent join request by specifying a user ID

Cancels (deletes) a guild join request that the specified user has previously sent (server-side operation). The request is removed from both the sender’s send box and the target guild’s inbox.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
targetGuildNamestring
~ 128 charsTarget Guild Name
The unique name (UUID) of the guild to which the join request was sent. This identifies the specific guild instance that the user is requesting to join, and is used to locate the guild’s inbox for request processing.
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSendMemberRequestJoin request deleted

Implementation Example

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.Item
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\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

Get a list of User IDs that refuse to participate

Retrieves a paginated list of users on the guild’s ignore list (blacklist). Users on this list are prevented from sending join requests to the guild. Requires the access token of the assumed guild user.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<IgnoreUser>List of User IDs that refuse to participate
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get a list of User IDs that refuse to participate by specifying a Guild name

Retrieves a paginated list of users on the specified guild’s ignore list (blacklist) (server-side operation). Users on this list are prevented from sending join requests to the guild.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<IgnoreUser>List of User IDs that refuse to participate
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Get User ID that refuse to participate

Checks whether a specific user is on the guild’s ignore list (blacklist).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate

Implementation Example

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.Item
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\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

Get User ID that refuse to participate by specifying a Guild name

Checks whether a specific user is on the specified guild’s ignore list (blacklist) (server-side operation).

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate

Implementation Example

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.Item
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\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

Add User ID that refuse to participate

Adds a user to the guild’s ignore list (blacklist). Once added, the user will be unable to send join requests to this guild. If the user already has a pending join request, it is not automatically removed; it must be rejected separately.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Add User ID that refuse to participate by specifying a Guild name

Adds a user to the specified guild’s ignore list (blacklist) (server-side operation). Once added, the user will be unable to send join requests to this guild.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate
guildGuildGuild

Implementation Example

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.Guild
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\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

Delete User ID that refuse to participate

Removes a user from the guild’s ignore list (blacklist). After removal, the user will be able to send join requests to this guild again.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
accessTokenstring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate

Implementation Example

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.Item
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\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

Delete User ID that refuse to participate by specifying a Guild name

Removes a user from the specified guild’s ignore list (blacklist) (server-side operation). After removal, the user will be able to send join requests to this guild again.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildNamestring
~ 128 charsGuild name
userIdstring
~ 128 charsUser ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserUser ID that refuse to participate

Implementation Example

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.Item
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\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

Get a list of Guild Models

Retrieves the list of currently active (published) Guild Models in the specified namespace. Guild Models define the guild structure including maximum member count, role definitions, guild master role, default member role, join cooldown period, concurrent guild join limits, and inactive guild master succession settings. Unlike Guild Model Masters, these are read-only and represent the configuration currently in use.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemsList<GuildModel>List of Guild Model

Implementation Example

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.Items
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\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

Get Guild Model

Retrieves the detailed information of a specific currently active Guild Model by name. Includes role definitions, maximum member count settings, join policy constraints, inactive guild master succession period (inactivityPeriodDays), and rejoin cooldown configuration.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemGuildModelGuild Model

Implementation Example

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.Item
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\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

Export Guild Model Master in a master data format that can be activated

Exports all Guild Model Master definitions in the namespace as a single JSON document suitable for activation. The exported data includes guild models with their member limits, role definitions, join policies, and succession settings.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemCurrentGuildMasterGuild Model master data that can be activated

Implementation Example

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.Item
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\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

Get currently active Guild Model master data

Retrieves the Guild Model master data that is currently activated and in use in the specified namespace. The returned data contains the JSON definition of all guild models that are currently serving runtime requests.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemCurrentGuildMasterCurrently active Guild Model master data

Implementation Example

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.Item
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\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

Update Currently Active Master Data (3-phase version)

When uploading master data larger than 1MB, the update is performed in 3 phases.

  1. Execute this API to obtain a token and URL for uploading.
  2. Upload the master data to the obtained URL.
  3. Execute UpdateCurrentModelMaster by passing the token obtained from the the upload to reflect the master data.
Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
uploadTokenstringToken used to reflect results after upload
uploadUrlstringURL used to upload

Implementation Example

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.UploadUrl
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\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

Update currently active Guild Model master data

Activates new Guild Model master data, replacing the currently active configuration. Supports two modes: ‘direct’ for inline master data (suitable for data under 1MB), and ‘preUpload’ for applying data that was previously uploaded via PreUpdate. Once activated, all guild-related runtime operations (guild creation, join requests, member management) will use the new configuration.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
modeString Enum
enum {
  “direct”,
  “preUpload”
}
“direct”Update mode
DefinitionDescription
“direct”Directly update master data
“preUpload”Upload master data and then update
settingsstring{mode} == “direct”
✓*
~ 5242880 charsMaster Data
* Required if mode is “direct”
uploadTokenstring{mode} == “preUpload”
✓*
~ 1024 charsToken obtained by pre-upload
Used to apply the uploaded master data.
* Required if mode is “preUpload”

Result

TypeDescription
itemCurrentGuildMasterUpdated master data of the currently active Guild Models

Implementation Example

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.Item
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\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

Update the currently active guild settings from GitHub

Checks out Guild Model master data from a specified GitHub repository and activates it. The checkout settings specify the repository, branch/tag, and file path to retrieve. This enables Git-based master data management workflows where guild configurations are version-controlled in a repository.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
checkoutSettingGitHubCheckoutSetting
Setup to check out master data from GitHub

Result

TypeDescription
itemCurrentGuildMasterUpdated master data of the currently active Guild Models

Implementation Example

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.Item
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\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

Get a list of Guild Model Masters

Retrieves a paginated list of editable Guild Model Master definitions with optional name prefix filtering. Changes to masters do not take effect until the master data is activated via the CurrentGuildMaster API.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
namePrefixstring~ 64 charsFilter by Namespace name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data items to retrieve

Result

TypeDescription
itemsList<GuildModelMaster>List of Guild Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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.NextPageToken
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\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

Create a new Guild Model Master

Creates a new editable Guild Model Master definition. Key configuration includes:

  • defaultMaximumMemberCount / maximumMemberCount: Initial and upper limit for guild member capacity
  • roles: Role definitions available within guilds of this model
  • guildMasterRole / guildMemberDefaultRole: Role assigned to the creator and new members respectively
  • inactivityPeriodDays: Number of days of inactivity before guild master auto-succession is triggered
  • rejoinCoolTimeMinutes: Cooldown period after leaving before a user can rejoin the same guild
  • maxConcurrentJoinGuilds: Maximum number of guilds a user can join simultaneously
  • maxConcurrentGuildMasterCount: Maximum number of guild masters allowed per guild Changes do not take effect until the master data is activated via the CurrentGuildMaster API.
Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
namestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
defaultMaximumMemberCountint
0 ~ 2147483646Default Maximum Member Count
The initial maximum number of members allowed when a new guild is created. This value is used as the starting currentMaximumMemberCount for new guilds. Can be increased later up to the maximumMemberCount limit through guild operations or acquire actions.
maximumMemberCountint
0 ~ 2147483646Maximum Member Count
The absolute upper limit for the number of members a guild can have. The guild’s currentMaximumMemberCount cannot exceed this value. This serves as a hard cap to prevent guilds from growing beyond the intended size.
inactivityPeriodDaysint71 ~ 365Inactivity Period Days
The number of days of guild master inactivity after which a new guild master is automatically selected from the remaining guild members. This prevents guilds from becoming unmanageable when the guild master stops playing.
rolesList<RoleModel>
1 ~ 10 itemsList of Role Models
The list of role definitions available within guilds of this type. Must include at least the roles referenced by guildMasterRole and guildMemberDefaultRole. Up to 10 roles can be defined.
guildMasterRolestring
~ 128 charsGuild Master Role Name
The name of the role assigned to guild masters. Must reference a role defined in the roles list. Guild masters typically have full permissions to manage the guild.
guildMemberDefaultRolestring
~ 128 charsDefault Member Role Name
The name of the role automatically assigned to new guild members when they join. Must reference a role defined in the roles list.
rejoinCoolTimeMinutesint00 ~ 2147483646Rejoin Cool Time (Minutes)
The cooldown period in minutes before a user can rejoin a guild after leaving. Set to 0 to allow immediate rejoining. This prevents abuse patterns where users repeatedly join and leave guilds.
maxConcurrentJoinGuildsint1 ~ 10Maximum Concurrent Guild Memberships
The maximum number of guilds of this type that a user can be a member of simultaneously. The value ranges from 1 to 10.
maxConcurrentGuildMasterCountint1 ~ 100Maximum Concurrent Guild Master Count
The maximum number of guild masters that can exist in a single guild at the same time. Allows for co-leadership designs. The value ranges from 1 to 100.

Result

TypeDescription
itemGuildModelMasterGuild Model Master created

Implementation Example

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.Item
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\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

Get Guild Model Master

Retrieves the detailed information of a specific editable Guild Model Master by name.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemGuildModelMasterGuild Model Master

Implementation Example

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.Item
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\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

Update Guild Model Master

Updates the configuration of an existing Guild Model Master. All properties except the name can be changed, including member limits, roles, join cooldown, and inactivity succession settings. Changes do not take effect until the master data is re-activated via the CurrentGuildMaster API.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
defaultMaximumMemberCountint
0 ~ 2147483646Default Maximum Member Count
The initial maximum number of members allowed when a new guild is created. This value is used as the starting currentMaximumMemberCount for new guilds. Can be increased later up to the maximumMemberCount limit through guild operations or acquire actions.
maximumMemberCountint
0 ~ 2147483646Maximum Member Count
The absolute upper limit for the number of members a guild can have. The guild’s currentMaximumMemberCount cannot exceed this value. This serves as a hard cap to prevent guilds from growing beyond the intended size.
inactivityPeriodDaysint71 ~ 365Inactivity Period Days
The number of days of guild master inactivity after which a new guild master is automatically selected from the remaining guild members. This prevents guilds from becoming unmanageable when the guild master stops playing.
rolesList<RoleModel>
1 ~ 10 itemsList of Role Models
The list of role definitions available within guilds of this type. Must include at least the roles referenced by guildMasterRole and guildMemberDefaultRole. Up to 10 roles can be defined.
guildMasterRolestring
~ 128 charsGuild Master Role Name
The name of the role assigned to guild masters. Must reference a role defined in the roles list. Guild masters typically have full permissions to manage the guild.
guildMemberDefaultRolestring
~ 128 charsDefault Member Role Name
The name of the role automatically assigned to new guild members when they join. Must reference a role defined in the roles list.
rejoinCoolTimeMinutesint00 ~ 2147483646Rejoin Cool Time (Minutes)
The cooldown period in minutes before a user can rejoin a guild after leaving. Set to 0 to allow immediate rejoining. This prevents abuse patterns where users repeatedly join and leave guilds.
maxConcurrentJoinGuildsint1 ~ 10Maximum Concurrent Guild Memberships
The maximum number of guilds of this type that a user can be a member of simultaneously. The value ranges from 1 to 10.
maxConcurrentGuildMasterCountint1 ~ 100Maximum Concurrent Guild Master Count
The maximum number of guild masters that can exist in a single guild at the same time. Allows for co-leadership designs. The value ranges from 1 to 100.

Result

TypeDescription
itemGuildModelMasterGuild Model Master updated

Implementation Example

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.Item
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\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

Delete Guild Model Master

Deletes an editable Guild Model Master definition. This only affects the master data; the currently active (published) model is not affected until the master data is re-activated.

Details

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
guildModelNamestring
~ 128 charsGuild Model name
Guild Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).

Result

TypeDescription
itemGuildModelMasterGuild Model Master deleted

Implementation Example

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.Item
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\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;