API Reference of GS2-Guild SDK

Model

Namespace

Namespace

Namespace is a mechanism that allows multiple uses of the same service for different purposes within a single project. Basically, GS2 services have a layer called namespace, and different namespaces are treated as completely different data spaces, even for the same service.

Therefore, it is necessary to create a namespace before starting to use each service.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsNamespace GRN
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
changeNotificationNotificationSettingNotification issued when a guild information is updated
joinNotificationNotificationSettingNotification issued when a guild member is added
leaveNotificationNotificationSettingNotification issued when a guild member is removed
changeMemberNotificationNotificationSettingNotification issued when a guild member is updated
receiveRequestNotificationNotificationSettingNotification used when a member request is received
removeRequestNotificationNotificationSettingNotification used when a member request is deleted
createGuildScriptScriptSettingScript to execute when creating a guild
updateGuildScriptScriptSettingScript to execute when update a guild
joinGuildScriptScriptSettingScript to execute when joining a guild
leaveGuildScriptScriptSettingScript to execute when leaving a guild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
logSettingLogSettingLog output settings
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

GuildModelMaster

Guild Model Master

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.

TypeConditionRequireDefaultLimitationDescription
guildModelIdstring~ 1024 charsGuild Model Master GRN
namestring~ 128 charsGuild Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
defaultMaximumMemberCountint~ 2147483646Maximum number of guild members that will be applied when creating a guild
maximumMemberCountint~ 2147483646Maximum number of guild members that can be applied
inactivityPeriodDaysint71 ~ 365Number of days of inactivity of the guild master to select a new guild master from the guild members
rolesList<RoleModel>1 ~ 10 itemsList of permission settings for each position in the guild
guildMasterRolestring~ 128 charsRole that guild masters have
guildMemberDefaultRolestring~ 128 charsRole that guild members have in the initial state
rejoinCoolTimeMinutesint0~ 2147483646Cool time until you can join again after leaving the guild (minutes)
maxConcurrentJoinGuildsint1 ~ 10Maximum number of guilds that can be joined at the same time
maxConcurrentGuildMasterCountint1 ~ 100Maximum number of guild masters that can exist at the same time
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

GuildModel

Guild Model Master

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.

TypeConditionRequireDefaultLimitationDescription
guildModelIdstring~ 1024 charsGuild Model GRN
namestring~ 128 charsGuild Model Name
metadatastring~ 2048 charsmetadata
defaultMaximumMemberCountint1 ~ 2147483646Maximum number of guild members that will be applied when creating a guild
maximumMemberCountint1 ~ 2147483646Maximum number of guild members that can be applied
inactivityPeriodDaysint71 ~ 365Number of days of inactivity of the guild master to select a new guild master from the guild members
rolesList<RoleModel>1 ~ 10 itemsList of permission settings for each position in the guild
guildMasterRolestring~ 128 charsRole that guild masters have
guildMemberDefaultRolestring~ 128 charsRole that guild members have in the initial state
rejoinCoolTimeMinutesint0~ 2147483646Cool time until you can join again after leaving the guild (minutes)
maxConcurrentJoinGuildsint1 ~ 10Maximum number of guilds that can be joined at the same time
maxConcurrentGuildMasterCountint1 ~ 100Maximum number of guild masters that can exist at the same time

Inbox

In-box

Received guild requests

TypeConditionRequireDefaultLimitationDescription
inboxIdstring~ 1024 charsReceived guild join request GRN
guildNamestring~ 128 charsGuild name
fromUserIdsList<string>~ 1000 itemsList of user IDs who have sent guild requests
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

SendBox

Send box

Sent guild requests

TypeConditionRequireDefaultLimitationDescription
sendBoxIdstring~ 1024 charsSent guild join request GRN
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamesList<string>~ 10 itemsList of destination guild names for member requests
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

Guild

Guild

Created when GetGuildGuild is called for the first time, and the guild time count starts from that time. The guild time count is reset when you receive a reward.

If GS2-Schedule events are associated, you cannot access Guild before the event is held, and you cannot create a guild. If an event is associated, the guild holds the number of repetitions of the event. If the current event ID and the event ID at the time of guild creation do not match, if the number of repetitions of the current event and the number of repetitions held by the guild do not match, or if the guild is created before the start time of the event, the waiting time is reset.

TypeConditionRequireDefaultLimitationDescription
guildIdstring~ 1024 charsGuild GRN
guildModelNamestring~ 128 charsGuild Model Name
namestringUUID~ 36 charsGuild Name
displayNamestring~ 64 charsDisplay Name
attribute1int~ 2147483645Attribute 1
attribute2int~ 2147483645Attribute 2
attribute3int~ 2147483645Attribute 3
attribute4int~ 2147483645Attribute 4
attribute5int~ 2147483645Attribute 5
joinPolicyenum {
    “anybody”,
    “approval”
}
~ 128 charsJoin Policy
customRolesList<RoleModel>~ 10 itemsPermission settings list for each position defined by the guild
guildMemberDefaultRolestring~ 128 charsCustom role that guild members have in their initial state
currentMaximumMemberCountint1 ~ 2147483646Maximum number of guild members
membersList<Member>~ 10 itemsGuild member list
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

Enumeration type definition to specify as joinPolicy

Enumerator String DefinitionDescription
anybodyAnybody can join
approvalApproval required

JoinedGuild

Guilds that the user is participating in

TypeConditionRequireDefaultLimitationDescription
joinedGuildIdstring~ 1024 charsJoined Guild GRN
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild Name
userIdstring~ 128 charsUser Id
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)

LastGuildMasterActivity

Last time the guild master performed an activity

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)

CurrentGuildMaster

Currently available master data

GS2 uses JSON format files for master data management. By uploading the file, you can actually reflect the settings on the server.

We provide a master data editor on the management console as a way to create JSON files, but you can also create JSON files using the The service can also be used by creating a tool more appropriate for game management and exporting a JSON file in the appropriate format.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsCurrently guild setting GRN
settingsstring~ 5242880 charsMaster data

RoleModel

Role Model

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

TypeConditionRequireDefaultLimitationDescription
namestring~ 128 charsRole Model Name
metadatastring~ 2048 charsmetadata
policyDocumentstring~ 10240 charsPolicy document for permissions to apply to roles

Member

Guild

An entity that manages a list of guild members

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
roleNamestring~ 128 charsRole Model Name
joinedAtlongNowJoin date (Unix time unit:milliseconds)

ReceiveMemberRequest

Guild request received

This entity indicates that a guild request has been accepted. This is a guild request received by the user from another user. When the user approves the guild request, the guild request is deleted and the user is added to the guild list.

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsSent
targetGuildNamestring~ 128 charsTarget

SendMemberRequest

Guild request sent

This entity indicates the status of a pending guild request. This is a guild request sent by the user to another user. When the user who sent the guild request approves it, the guild request is deleted and the user is added to the guild list.

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsSent
targetGuildNamestring~ 128 charsGuild name

IgnoreUser

Refuse to participate user

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)

TransactionSetting

Transaction settings

TypeConditionRequireDefaultLimitationDescription
enableAutoRunboolfalseAutomatically run issued transactions on the server side, or
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor namespace used for transaction execution
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsNamespace in GS2-JobQueue used to run the transaction

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 send additional processing to mobile push notifications when the destination device is offline. If you use mobile push notifications well, you may be able to realize a flow in which you can notify the player by using mobile push notifications even if you end the game during matchmaking and return to the game.

TypeConditionRequireDefaultLimitationDescription
gatewayNamespaceIdstring“grn:gs2:{region}:{ownerId}:gateway:default”~ 1024 charsGS2-Gateway namespace to use for push notifications
enableTransferMobileNotificationbool?falseForwarding to mobile push notification
soundstring{enableTransferMobileNotification} == true~ 1024 charsSound file name to be used for mobile push notifications

ScriptSetting

Script settings

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 execution result to stop the execution of the API or to tamper with the result of the API.

On the other hand, asynchronous execution does not block processing until the script has finished executing. Instead, you can use the script execution result to stop the execution of the API or to tamper with the result of the API. However, asynchronous execution does not block processing until the script has finished executing, so it is generally recommended to use asynchronous execution.

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.

TypeConditionRequireDefaultLimitationDescription
triggerScriptIdstring~ 1024 charsScript GRN
doneTriggerTargetTypeenum {
    “none”,
    “gs2_script”,
    “aws”
}
“none”~ 128 charsNotification of Completion
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsScript GRN
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsNamespace GRN

Enumeration type definition to specify as doneTriggerTargetType

Enumerator String DefinitionDescription
noneNone
gs2_scriptGS2-Script
awsAmazon EventBridge

LogSetting

Log setting

This type manages log output settings. This type holds the identifier of the log namespace used to output log data. The log namespace ID specifies the GS2-Log namespace to aggregate and store the log data. Through this setting, API request and response log data under this namespace will be output to the target GS2-Log. GS2-Log provides logs in real time, which can be used for system monitoring, analysis, debugging, etc.

TypeConditionRequireDefaultLimitationDescription
loggingNamespaceIdstring~ 1024 charsNamespace GRN

GitHubCheckoutSetting

Setup to check out master data from GitHub

TypeConditionRequireDefaultLimitationDescription
apiKeyIdstring~ 1024 charsGitHub API key GRN
repositoryNamestring~ 1024 charsRepository Name
sourcePathstring~ 1024 charsSource code file path
referenceTypeenum {
    “commit_hash”,
    “branch”,
    “tag”
}
~ 128 charsSource of code
commitHashstring{referenceType} == “commit_hash”~ 1024 charsCommit hash
branchNamestring{referenceType} == “branch”~ 1024 charsBranch Name
tagNamestring{referenceType} == “tag”~ 1024 charsTag Name

Enumeration type definition to specify as referenceType

Enumerator String DefinitionDescription
commit_hashCommit hash
branchBranch
tagTag

Methods

describeNamespaces

Get list of namespaces

Request

TypeConditionRequireDefaultLimitationDescription
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

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 {
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->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()
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeNamespacesRequest;
using Gs2.Gs2Guild.Result.DescribeNamespacesResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Guild.Request.DescribeNamespacesRequest()
        .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()
            .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_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({
    pageToken=nil,
    limit=nil,
})

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

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

api_result_handler = client.describe_namespaces_async({
    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['message'])
end

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

createNamespace

Create a new namespace

Request

TypeConditionRequireDefaultLimitationDescription
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
changeNotificationNotificationSettingNotification issued when a guild information is updated
joinNotificationNotificationSettingNotification issued when a guild member is added
leaveNotificationNotificationSettingNotification issued when a guild member is removed
changeMemberNotificationNotificationSettingNotification issued when a guild member is updated
receiveRequestNotificationNotificationSettingNotification used when a member request is received
removeRequestNotificationNotificationSettingNotification used when a member request is deleted
createGuildScriptScriptSettingScript to execute when creating a guild
updateGuildScriptScriptSettingScript to execute when update a guild
joinGuildScriptScriptSettingScript to execute when joining a guild
leaveGuildScriptScriptSettingScript to execute when leaving a guild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
logSettingLogSettingLog output settings

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("namespace1"),
        Description: nil,
        ChangeNotification: nil,
        JoinNotification: nil,
        LeaveNotification: nil,
        ChangeMemberNotification: nil,
        ReceiveRequestNotification: nil,
        RemoveRequestNotification: nil,
        CreateGuildScript: nil,
        UpdateGuildScript: nil,
        JoinGuildScript: nil,
        LeaveGuildScript: nil,
        ChangeRoleScript: nil,
        LogSetting: &guild.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName(self::namespace1)
            ->withDescription(null)
            ->withChangeNotification(null)
            ->withJoinNotification(null)
            ->withLeaveNotification(null)
            ->withChangeMemberNotification(null)
            ->withReceiveRequestNotification(null)
            ->withRemoveRequestNotification(null)
            ->withCreateGuildScript(null)
            ->withUpdateGuildScript(null)
            ->withJoinGuildScript(null)
            ->withLeaveGuildScript(null)
            ->withChangeRoleScript(null)
            ->withLogSetting((new \Gs2\Guild\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $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("namespace1")
            .withDescription(null)
            .withChangeNotification(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withChangeMemberNotification(null)
            .withReceiveRequestNotification(null)
            .withRemoveRequestNotification(null)
            .withCreateGuildScript(null)
            .withUpdateGuildScript(null)
            .withJoinGuildScript(null)
            .withLeaveGuildScript(null)
            .withChangeRoleScript(null)
            .withLogSetting(new io.gs2.guild.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CreateNamespaceRequest;
using Gs2.Gs2Guild.Result.CreateNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Guild.Request.CreateNamespaceRequest()
        .WithName("namespace1")
        .WithDescription(null)
        .WithChangeNotification(null)
        .WithJoinNotification(null)
        .WithLeaveNotification(null)
        .WithChangeMemberNotification(null)
        .WithReceiveRequestNotification(null)
        .WithRemoveRequestNotification(null)
        .WithCreateGuildScript(null)
        .WithUpdateGuildScript(null)
        .WithJoinGuildScript(null)
        .WithLeaveGuildScript(null)
        .WithChangeRoleScript(null)
        .WithLogSetting(new Gs2.Gs2Guild.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    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("namespace1")
            .withDescription(null)
            .withChangeNotification(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withChangeMemberNotification(null)
            .withReceiveRequestNotification(null)
            .withRemoveRequestNotification(null)
            .withCreateGuildScript(null)
            .withUpdateGuildScript(null)
            .withJoinGuildScript(null)
            .withLeaveGuildScript(null)
            .withChangeRoleScript(null)
            .withLogSetting(new Gs2Guild.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    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(self.hash1)
            .with_description(None)
            .with_change_notification(None)
            .with_join_notification(None)
            .with_leave_notification(None)
            .with_change_member_notification(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_leave_guild_script(None)
            .with_change_role_script(None)
            .with_log_setting(
                guild.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.create_namespace({
    name="namespace1",
    description=nil,
    changeNotification=nil,
    joinNotification=nil,
    leaveNotification=nil,
    changeMemberNotification=nil,
    receiveRequestNotification=nil,
    removeRequestNotification=nil,
    createGuildScript=nil,
    updateGuildScript=nil,
    joinGuildScript=nil,
    leaveGuildScript=nil,
    changeRoleScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

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

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

api_result_handler = client.create_namespace_async({
    name="namespace1",
    description=nil,
    changeNotification=nil,
    joinNotification=nil,
    leaveNotification=nil,
    changeMemberNotification=nil,
    receiveRequestNotification=nil,
    removeRequestNotification=nil,
    createGuildScript=nil,
    updateGuildScript=nil,
    joinGuildScript=nil,
    leaveGuildScript=nil,
    changeRoleScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

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

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

result = api_result.result
item = result.item;

getNamespaceStatus

Get namespace status

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

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("namespace1"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName(self::namespace1)
    );
    $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("namespace1")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetNamespaceStatusRequest;
using Gs2.Gs2Guild.Result.GetNamespaceStatusResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Guild.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace1"),
    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("namespace1")
    );
    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(self.hash1)
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.get_namespace_status({
    namespaceName="namespace1",
})

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

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

api_result_handler = client.get_namespace_status_async({
    namespaceName="namespace1",
})

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

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

result = api_result.result
status = result.status;

getNamespace

Get namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

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("namespace1"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $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("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetNamespaceRequest;
using Gs2.Gs2Guild.Result.GetNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Guild.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace1"),
    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("namespace1")
    );
    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(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.get_namespace({
    namespaceName="namespace1",
})

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

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

api_result_handler = client.get_namespace_async({
    namespaceName="namespace1",
})

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

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

result = api_result.result
item = result.item;

updateNamespace

Update namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
changeNotificationNotificationSettingNotification issued when a guild information is updated
joinNotificationNotificationSettingNotification issued when a guild member is added
leaveNotificationNotificationSettingNotification issued when a guild member is removed
changeMemberNotificationNotificationSettingNotification issued when a guild member is updated
receiveRequestNotificationNotificationSettingNotification used when a member request is received
removeRequestNotificationNotificationSettingNotification used when a member request is deleted
createGuildScriptScriptSettingScript to execute when creating a guild
updateGuildScriptScriptSettingScript to execute when update a guild
joinGuildScriptScriptSettingScript to execute when joining a guild
leaveGuildScriptScriptSettingScript to execute when leaving a guild
changeRoleScriptScriptSettingScript to execute when changing the role assigned to a member
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceUpdated 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.UpdateNamespace(
    &guild.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        ChangeNotification: nil,
        JoinNotification: nil,
        LeaveNotification: nil,
        ChangeMemberNotification: nil,
        ReceiveRequestNotification: nil,
        RemoveRequestNotification: nil,
        CreateGuildScript: nil,
        UpdateGuildScript: nil,
        JoinGuildScript: nil,
        LeaveGuildScript: nil,
        ChangeRoleScript: nil,
        LogSetting: &guild.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName(self::namespace1)
            ->withDescription("description1")
            ->withChangeNotification(null)
            ->withJoinNotification(null)
            ->withLeaveNotification(null)
            ->withChangeMemberNotification(null)
            ->withReceiveRequestNotification(null)
            ->withRemoveRequestNotification(null)
            ->withCreateGuildScript(null)
            ->withUpdateGuildScript(null)
            ->withJoinGuildScript(null)
            ->withLeaveGuildScript(null)
            ->withChangeRoleScript(null)
            ->withLogSetting((new \Gs2\Guild\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $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("namespace1")
            .withDescription("description1")
            .withChangeNotification(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withChangeMemberNotification(null)
            .withReceiveRequestNotification(null)
            .withRemoveRequestNotification(null)
            .withCreateGuildScript(null)
            .withUpdateGuildScript(null)
            .withJoinGuildScript(null)
            .withLeaveGuildScript(null)
            .withChangeRoleScript(null)
            .withLogSetting(new io.gs2.guild.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateNamespaceRequest;
using Gs2.Gs2Guild.Result.UpdateNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Guild.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace1")
        .WithDescription("description1")
        .WithChangeNotification(null)
        .WithJoinNotification(null)
        .WithLeaveNotification(null)
        .WithChangeMemberNotification(null)
        .WithReceiveRequestNotification(null)
        .WithRemoveRequestNotification(null)
        .WithCreateGuildScript(null)
        .WithUpdateGuildScript(null)
        .WithJoinGuildScript(null)
        .WithLeaveGuildScript(null)
        .WithChangeRoleScript(null)
        .WithLogSetting(new Gs2.Gs2Guild.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    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("namespace1")
            .withDescription("description1")
            .withChangeNotification(null)
            .withJoinNotification(null)
            .withLeaveNotification(null)
            .withChangeMemberNotification(null)
            .withReceiveRequestNotification(null)
            .withRemoveRequestNotification(null)
            .withCreateGuildScript(null)
            .withUpdateGuildScript(null)
            .withJoinGuildScript(null)
            .withLeaveGuildScript(null)
            .withChangeRoleScript(null)
            .withLogSetting(new Gs2Guild.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    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(self.hash1)
            .with_description('description1')
            .with_change_notification(None)
            .with_join_notification(None)
            .with_leave_notification(None)
            .with_change_member_notification(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_leave_guild_script(None)
            .with_change_role_script(None)
            .with_log_setting(
                guild.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.update_namespace({
    namespaceName="namespace1",
    description="description1",
    changeNotification=nil,
    joinNotification=nil,
    leaveNotification=nil,
    changeMemberNotification=nil,
    receiveRequestNotification=nil,
    removeRequestNotification=nil,
    createGuildScript=nil,
    updateGuildScript=nil,
    joinGuildScript=nil,
    leaveGuildScript=nil,
    changeRoleScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

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

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

api_result_handler = client.update_namespace_async({
    namespaceName="namespace1",
    description="description1",
    changeNotification=nil,
    joinNotification=nil,
    leaveNotification=nil,
    changeMemberNotification=nil,
    receiveRequestNotification=nil,
    removeRequestNotification=nil,
    createGuildScript=nil,
    updateGuildScript=nil,
    joinGuildScript=nil,
    leaveGuildScript=nil,
    changeRoleScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

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

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

result = api_result.result
item = result.item;

deleteNamespace

Delete namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceDeleted 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("namespace1"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $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("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteNamespaceRequest;
using Gs2.Gs2Guild.Result.DeleteNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Guild.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace1"),
    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("namespace1")
    );
    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(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.delete_namespace({
    namespaceName="namespace1",
})

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

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

api_result_handler = client.delete_namespace_async({
    namespaceName="namespace1",
})

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

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

result = api_result.result
item = result.item;

dumpUserDataByUserId

Get dump data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DumpUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.DumpUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result

checkDumpUserDataByUserId

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

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CheckDumpUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.CheckDumpUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result
url = result.url;

cleanUserDataByUserId

Get clean data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CleanUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.CleanUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result

checkCleanUserDataByUserId

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

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CheckCleanUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.CheckCleanUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result

prepareImportUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.PrepareImportUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.PrepareImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

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

importUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.ImportUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.ImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result

checkImportUserDataByUserId

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

Request

TypeConditionRequireDefaultLimitationDescription
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CheckImportUserDataByUserIdRequest;
using Gs2.Gs2Guild.Result.CheckImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
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['message'])
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['message'])
end

result = api_result.result
url = result.url;

describeGuildModelMasters

Get list of guild model masters

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGuildModelMasters(
        (new DescribeGuildModelMastersRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<GuildModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeGuildModelMastersRequest;
using Gs2.Gs2Guild.Result.DescribeGuildModelMastersResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeGuildModelMastersResult> asyncResult = null;
yield return client.DescribeGuildModelMasters(
    new Gs2.Gs2Guild.Request.DescribeGuildModelMastersRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    pageToken=nil,
    limit=nil,
})

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

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

api_result_handler = client.describe_guild_model_masters_async({
    namespaceName="namespace1",
    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['message'])
end

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

createGuildModelMaster

Create new guild model master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
namestring~ 128 charsGuild Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
defaultMaximumMemberCountint~ 2147483646Maximum number of guild members that will be applied when creating a guild
maximumMemberCountint~ 2147483646Maximum number of guild members that can be applied
inactivityPeriodDaysint71 ~ 365Number of days of inactivity of the guild master to select a new guild master from the guild members
rolesList<RoleModel>1 ~ 10 itemsList of permission settings for each position in the guild
guildMasterRolestring~ 128 charsRole that guild masters have
guildMemberDefaultRolestring~ 128 charsRole that guild members have in the initial state
rejoinCoolTimeMinutesint0~ 2147483646Cool time until you can join again after leaving the guild (minutes)
maxConcurrentJoinGuildsint1 ~ 10Maximum number of guilds that can be joined at the same time
maxConcurrentGuildMasterCountint1 ~ 100Maximum number of guild masters that can exist at the same time

Result

TypeDescription
itemGuildModelMasterCreated Guild 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.CreateGuildModelMaster(
    &guild.CreateGuildModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGuildModelMaster(
        (new CreateGuildModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CreateGuildModelMasterRequest;
using Gs2.Gs2Guild.Result.CreateGuildModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.CreateGuildModelMasterResult> asyncResult = null;
yield return client.CreateGuildModelMaster(
    new Gs2.Gs2Guild.Request.CreateGuildModelMasterRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.create_guild_model_master_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getGuildModelMaster

Get Experience model master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGuildModelMaster(
        (new GetGuildModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
    );
    GuildModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetGuildModelMasterRequest;
using Gs2.Gs2Guild.Result.GetGuildModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetGuildModelMasterResult> asyncResult = null;
yield return client.GetGuildModelMaster(
    new Gs2.Gs2Guild.Request.GetGuildModelMasterRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
})

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

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

api_result_handler = client.get_guild_model_master_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

updateGuildModelMaster

Update Guild Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
defaultMaximumMemberCountint~ 2147483646Maximum number of guild members that will be applied when creating a guild
maximumMemberCountint~ 2147483646Maximum number of guild members that can be applied
inactivityPeriodDaysint71 ~ 365Number of days of inactivity of the guild master to select a new guild master from the guild members
rolesList<RoleModel>1 ~ 10 itemsList of permission settings for each position in the guild
guildMasterRolestring~ 128 charsRole that guild masters have
guildMemberDefaultRolestring~ 128 charsRole that guild members have in the initial state
rejoinCoolTimeMinutesint0~ 2147483646Cool time until you can join again after leaving the guild (minutes)
maxConcurrentJoinGuildsint1 ~ 10Maximum number of guilds that can be joined at the same time
maxConcurrentGuildMasterCountint1 ~ 100Maximum number of guild masters that can exist at the same time

Result

TypeDescription
itemGuildModelMasterUpdated Guild 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.UpdateGuildModelMaster(
    &guild.UpdateGuildModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateGuildModelMaster(
        (new UpdateGuildModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateGuildModelMasterRequest;
using Gs2.Gs2Guild.Result.UpdateGuildModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildModelMasterResult> asyncResult = null;
yield return client.UpdateGuildModelMaster(
    new Gs2.Gs2Guild.Request.UpdateGuildModelMasterRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.update_guild_model_master_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteGuildModelMaster

Delete Guild Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name

Result

TypeDescription
itemGuildModelMasterDeleted Guild 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.DeleteGuildModelMaster(
    &guild.DeleteGuildModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGuildModelMaster(
        (new DeleteGuildModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
    );
    GuildModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteGuildModelMasterRequest;
using Gs2.Gs2Guild.Result.DeleteGuildModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildModelMasterResult> asyncResult = null;
yield return client.DeleteGuildModelMaster(
    new Gs2.Gs2Guild.Request.DeleteGuildModelMasterRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
})

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

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

api_result_handler = client.delete_guild_model_master_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

describeGuildModels

Get list of guild models

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

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("namespace2"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGuildModels(
        (new DescribeGuildModelsRequest())
            ->withNamespaceName(self::namespace2)
    );
    $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("namespace2")
    );
    List<GuildModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeGuildModelsRequest;
using Gs2.Gs2Guild.Result.DescribeGuildModelsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeGuildModelsResult> asyncResult = null;
yield return client.DescribeGuildModels(
    new Gs2.Gs2Guild.Request.DescribeGuildModelsRequest()
        .WithNamespaceName("namespace2"),
    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("namespace2")
    );
    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(self.hash2)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.describe_guild_models({
    namespaceName="namespace2",
})

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

result = api_result.result
items = result.items;
client = gs2('guild')

api_result_handler = client.describe_guild_models_async({
    namespaceName="namespace2",
})

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

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

result = api_result.result
items = result.items;

getGuildModel

Get Guild Model

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name

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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGuildModel(
        (new GetGuildModelRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withGuildModelName("guild-0001")
    );
    GuildModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetGuildModelRequest;
using Gs2.Gs2Guild.Result.GetGuildModelResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetGuildModelResult> asyncResult = null;
yield return client.GetGuildModel(
    new Gs2.Gs2Guild.Request.GetGuildModelRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName="guild-0001",
})

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

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

api_result_handler = client.get_guild_model_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

searchGuilds

Get list of guilds

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsUser Id
displayNamestring~ 64 charsDisplay name to search for guild
attributes1List<int>~ 10 itemsList of guild operation policies to search for guild
attributes2List<int>~ 10 itemsList of guild operation policies to search for guild
attributes3List<int>~ 10 itemsList of guild operation policies to search for guild
attributes4List<int>~ 10 itemsList of guild operation policies to search for guild
attributes5List<int>~ 10 itemsList of guild operation policies to search for guild
joinPoliciesList<string>~ 10 itemsList of guild join policies to search for guild
includeFullMembersGuildbool?falseWhether to include guilds with full guild members in the search results
orderByenum {
    “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”~ 128 charsSort order
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Enumeration type definition to specify as orderBy

Enumerator String DefinitionDescription
number_of_playersNumber of players joined
attribute1_ascAttribute1 ascending
attribute1_descAttribute1 descending
attribute2_ascAttribute2 ascending
attribute2_descAttribute2 descending
attribute3_ascAttribute3 ascending
attribute3_descAttribute3 descending
attribute4_ascAttribute4 ascending
attribute4_descAttribute4 descending
attribute5_ascAttribute5 ascending
attribute5_descAttribute5 descending
last_updatedLast updated

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->searchGuilds(
        (new SearchGuildsRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SearchGuildsRequest;
using Gs2.Gs2Guild.Result.SearchGuildsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SearchGuildsResult> asyncResult = null;
yield return client.SearchGuilds(
    new Gs2.Gs2Guild.Request.SearchGuildsRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    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['message'])
end

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

api_result_handler = client.search_guilds_async({
    namespaceName="namespace1",
    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['message'])
end

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

searchGuildsByUserId

Get list of guilds by user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
userIdstring~ 128 charsUser Id
displayNamestring~ 64 charsDisplay name to search for guild
attributes1List<int>~ 10 itemsList of guild operation policies to search for guild
attributes2List<int>~ 10 itemsList of guild operation policies to search for guild
attributes3List<int>~ 10 itemsList of guild operation policies to search for guild
attributes4List<int>~ 10 itemsList of guild operation policies to search for guild
attributes5List<int>~ 10 itemsList of guild operation policies to search for guild
joinPoliciesList<string>~ 10 itemsList of guild join policies to search for guild
includeFullMembersGuildbool?falseWhether to include guilds with full guild members in the search results
orderByenum {
    “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”~ 128 charsSort order
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Enumeration type definition to specify as orderBy

Enumerator String DefinitionDescription
number_of_playersNumber of players joined
attribute1_ascAttribute1 ascending
attribute1_descAttribute1 descending
attribute2_ascAttribute2 ascending
attribute2_descAttribute2 descending
attribute3_ascAttribute3 ascending
attribute3_descAttribute3 descending
attribute4_ascAttribute4 ascending
attribute4_descAttribute4 descending
attribute5_ascAttribute5 ascending
attribute5_descAttribute5 descending
last_updatedLast updated

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->searchGuildsByUserId(
        (new SearchGuildsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SearchGuildsByUserIdRequest;
using Gs2.Gs2Guild.Result.SearchGuildsByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SearchGuildsByUserIdResult> asyncResult = null;
yield return client.SearchGuildsByUserId(
    new Gs2.Gs2Guild.Request.SearchGuildsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
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="namespace1",
    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['message'])
end

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

createGuild

Create Guild

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
displayNamestring~ 64 charsDisplay Name
attribute1int~ 2147483645Attribute 1
attribute2int~ 2147483645Attribute 2
attribute3int~ 2147483645Attribute 3
attribute4int~ 2147483645Attribute 4
attribute5int~ 2147483645Attribute 5
joinPolicyenum {
    “anybody”,
    “approval”
}
~ 128 charsJoin Policy
customRolesList<RoleModel>~ 10 itemsPermission settings list for each position defined by the guild
guildMemberDefaultRolestring~ 128 charsCustom role that guild members have in their initial state

Enumeration type definition to specify as joinPolicy

Enumerator String DefinitionDescription
anybodyAnybody can join
approvalApproval required

Result

TypeDescription
itemGuildCreated 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.CreateGuild(
    &guild.CreateGuildRequest {
        NamespaceName: pointy.String("namespace1"),
        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,
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGuild(
        (new CreateGuildRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withGuildModelName("guild-model-0001")
            ->withDisplayName("My Guild")
            ->withAttribute1(1)
            ->withAttribute2(null)
            ->withAttribute3(null)
            ->withAttribute4(null)
            ->withAttribute5(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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(null)
            .withJoinPolicy("anybody")
            .withCustomRoles(null)
            .withGuildMemberDefaultRole(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CreateGuildRequest;
using Gs2.Gs2Guild.Result.CreateGuildResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.CreateGuildResult> asyncResult = null;
yield return client.CreateGuild(
    new Gs2.Gs2Guild.Request.CreateGuildRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithGuildModelName("guild-model-0001")
        .WithDisplayName("My Guild")
        .WithAttribute1(1)
        .WithAttribute2(null)
        .WithAttribute3(null)
        .WithAttribute4(null)
        .WithAttribute5(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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(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(self.hash1)
            .with_access_token(self.access_token_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_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=nil,
    joinPolicy="anybody",
    customRoles=nil,
    guildMemberDefaultRole=nil,
})

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

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

api_result_handler = client.create_guild_async({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=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['message'])
end

result = api_result.result
item = result.item;

createGuildByUserId

Create guild by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
displayNamestring~ 64 charsDisplay Name
attribute1int~ 2147483645Attribute 1
attribute2int~ 2147483645Attribute 2
attribute3int~ 2147483645Attribute 3
attribute4int~ 2147483645Attribute 4
attribute5int~ 2147483645Attribute 5
joinPolicyenum {
    “anybody”,
    “approval”
}
~ 128 charsJoin Policy
customRolesList<RoleModel>~ 10 itemsPermission settings list for each position defined by the guild
guildMemberDefaultRolestring~ 128 charsCustom role that guild members have in their initial state
timeOffsetTokenstring~ 1024 charsTime offset token

Enumeration type definition to specify as joinPolicy

Enumerator String DefinitionDescription
anybodyAnybody can join
approvalApproval required

Result

TypeDescription
itemGuildCreated 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.CreateGuildByUserId(
    &guild.CreateGuildByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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,
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGuildByUserId(
        (new CreateGuildByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withGuildModelName("guild-model-0001")
            ->withDisplayName("My Guild")
            ->withAttribute1(1)
            ->withAttribute2(null)
            ->withAttribute3(null)
            ->withAttribute4(null)
            ->withAttribute5(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("namespace1")
            .withUserId("user-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(null)
            .withJoinPolicy("anybody")
            .withCustomRoles(null)
            .withGuildMemberDefaultRole(null)
            .withTimeOffsetToken(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.CreateGuildByUserIdRequest;
using Gs2.Gs2Guild.Result.CreateGuildByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.CreateGuildByUserIdResult> asyncResult = null;
yield return client.CreateGuildByUserId(
    new Gs2.Gs2Guild.Request.CreateGuildByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithGuildModelName("guild-model-0001")
        .WithDisplayName("My Guild")
        .WithAttribute1(1)
        .WithAttribute2(null)
        .WithAttribute3(null)
        .WithAttribute4(null)
        .WithAttribute5(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("namespace1")
            .withUserId("user-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(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(self.hash1)
            .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_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="namespace1",
    userId="user-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=nil,
    joinPolicy="anybody",
    customRoles=nil,
    guildMemberDefaultRole=nil,
    timeOffsetToken=nil,
})

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

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

api_result_handler = client.create_guild_by_user_id_async({
    namespaceName="namespace1",
    userId="user-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=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['message'])
end

result = api_result.result
item = result.item;

getGuild

Get Guild

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGuild(
        (new GetGuildRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetGuildRequest;
using Gs2.Gs2Guild.Result.GetGuildResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetGuildResult> asyncResult = null;
yield return client.GetGuild(
    new Gs2.Gs2Guild.Request.GetGuildRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

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

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

api_result_handler = client.get_guild_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getGuildByUserId

Get guild by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGuildByUserId(
        (new GetGuildByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetGuildByUserIdRequest;
using Gs2.Gs2Guild.Result.GetGuildByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetGuildByUserIdResult> asyncResult = null;
yield return client.GetGuildByUserId(
    new Gs2.Gs2Guild.Request.GetGuildByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.get_guild_by_user_id_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

updateGuild

Update Guild

Please specify the access token of the guild user to Assume.

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsGuild name
guildModelNamestring~ 128 charsGuild Model Name
displayNamestring~ 64 charsDisplay Name
attribute1int~ 2147483645Attribute 1
attribute2int~ 2147483645Attribute 2
attribute3int~ 2147483645Attribute 3
attribute4int~ 2147483645Attribute 4
attribute5int~ 2147483645Attribute 5
joinPolicyenum {
    “anybody”,
    “approval”
}
~ 128 charsJoin Policy
customRolesList<RoleModel>~ 10 itemsPermission settings list for each position defined by the guild
guildMemberDefaultRolestring~ 128 charsCustom role that guild members have in their initial state

Enumeration type definition to specify as joinPolicy

Enumerator String DefinitionDescription
anybodyAnybody can join
approvalApproval required

Result

TypeDescription
itemGuildUpdated 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.UpdateGuild(
    &guild.UpdateGuildRequest {
        NamespaceName: pointy.String("namespace1"),
        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,
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateGuild(
        (new UpdateGuildRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withGuildModelName("guild-model-0001")
            ->withDisplayName("My Guild")
            ->withAttribute1(1)
            ->withAttribute2(null)
            ->withAttribute3(null)
            ->withAttribute4(null)
            ->withAttribute5(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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(null)
            .withJoinPolicy("anybody")
            .withCustomRoles(null)
            .withGuildMemberDefaultRole(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateGuildRequest;
using Gs2.Gs2Guild.Result.UpdateGuildResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildResult> asyncResult = null;
yield return client.UpdateGuild(
    new Gs2.Gs2Guild.Request.UpdateGuildRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithGuildModelName("guild-model-0001")
        .WithDisplayName("My Guild")
        .WithAttribute1(1)
        .WithAttribute2(null)
        .WithAttribute3(null)
        .WithAttribute4(null)
        .WithAttribute5(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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(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(self.hash1)
            .with_access_token(self.access_token_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_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=nil,
    joinPolicy="anybody",
    customRoles=nil,
    guildMemberDefaultRole=nil,
})

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

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

api_result_handler = client.update_guild_async({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=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['message'])
end

result = api_result.result
item = result.item;

updateGuildByGuildName

Update guild by specifying guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildNamestring~ 128 charsGuild name
guildModelNamestring~ 128 charsGuild Model Name
displayNamestring~ 64 charsDisplay Name
attribute1int~ 2147483645Attribute 1
attribute2int~ 2147483645Attribute 2
attribute3int~ 2147483645Attribute 3
attribute4int~ 2147483645Attribute 4
attribute5int~ 2147483645Attribute 5
joinPolicyenum {
    “anybody”,
    “approval”
}
~ 128 charsJoin Policy
customRolesList<RoleModel>~ 10 itemsPermission settings list for each position defined by the guild
guildMemberDefaultRolestring~ 128 charsCustom role that guild members have in their initial state

Enumeration type definition to specify as joinPolicy

Enumerator String DefinitionDescription
anybodyAnybody can join
approvalApproval required

Result

TypeDescription
itemGuildUpdated 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.UpdateGuildByGuildName(
    &guild.UpdateGuildByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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,
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateGuildByGuildName(
        (new UpdateGuildByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildName("guild-0001")
            ->withGuildModelName("guild-model-0001")
            ->withDisplayName("My Guild")
            ->withAttribute1(1)
            ->withAttribute2(null)
            ->withAttribute3(null)
            ->withAttribute4(null)
            ->withAttribute5(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("namespace1")
            .withGuildName("guild-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(null)
            .withJoinPolicy("anybody")
            .withCustomRoles(null)
            .withGuildMemberDefaultRole(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateGuildByGuildNameRequest;
using Gs2.Gs2Guild.Result.UpdateGuildByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateGuildByGuildNameResult> asyncResult = null;
yield return client.UpdateGuildByGuildName(
    new Gs2.Gs2Guild.Request.UpdateGuildByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .WithGuildName("guild-0001")
        .WithGuildModelName("guild-model-0001")
        .WithDisplayName("My Guild")
        .WithAttribute1(1)
        .WithAttribute2(null)
        .WithAttribute3(null)
        .WithAttribute4(null)
        .WithAttribute5(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("namespace1")
            .withGuildName("guild-0001")
            .withGuildModelName("guild-model-0001")
            .withDisplayName("My Guild")
            .withAttribute1(1)
            .withAttribute2(null)
            .withAttribute3(null)
            .withAttribute4(null)
            .withAttribute5(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(self.hash1)
            .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_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="namespace1",
    guildName="guild-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=nil,
    joinPolicy="anybody",
    customRoles=nil,
    guildMemberDefaultRole=nil,
})

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

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

api_result_handler = client.update_guild_by_guild_name_async({
    namespaceName="namespace1",
    guildName="guild-0001",
    guildModelName="guild-model-0001",
    displayName="My Guild",
    attribute1=1,
    attribute2=nil,
    attribute3=nil,
    attribute4=nil,
    attribute5=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['message'])
end

result = api_result.result
item = result.item;

deleteMember

Expel member

Please specify the access token as the access token assumed by the guild user

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
targetUserIdstring~ 128 charsUser ID to be expelled

Result

TypeDescription
itemGuildUpdated 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.DeleteMember(
    &guild.DeleteMemberRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteMember(
        (new DeleteMemberRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteMemberRequest;
using Gs2.Gs2Guild.Result.DeleteMemberResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteMemberResult> asyncResult = null;
yield return client.DeleteMember(
    new Gs2.Gs2Guild.Request.DeleteMemberRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

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

api_result_handler = client.delete_member_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteMemberByGuildName

Expel member by specifying guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
targetUserIdstring~ 128 charsUser ID to be expelled

Result

TypeDescription
itemGuildUpdated 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.DeleteMemberByGuildName(
    &guild.DeleteMemberByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteMemberByGuildName(
        (new DeleteMemberByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withTargetUserId("user-0002")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteMemberByGuildNameRequest;
using Gs2.Gs2Guild.Result.DeleteMemberByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteMemberByGuildNameResult> asyncResult = null;
yield return client.DeleteMemberByGuildName(
    new Gs2.Gs2Guild.Request.DeleteMemberByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
    targetUserId="user-0002",
})

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

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

api_result_handler = client.delete_member_by_guild_name_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

updateMemberRole

Update member role

Please specify the access token as the access token assumed by the guild user

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
targetUserIdstring~ 128 charsUser ID to be updated
roleNamestring~ 128 charsRole Model Name

Result

TypeDescription
itemGuildUpdated 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.UpdateMemberRole(
    &guild.UpdateMemberRoleRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateMemberRole(
        (new UpdateMemberRoleRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateMemberRoleRequest;
using Gs2.Gs2Guild.Result.UpdateMemberRoleResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberRoleResult> asyncResult = null;
yield return client.UpdateMemberRole(
    new Gs2.Gs2Guild.Request.UpdateMemberRoleRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    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['message'])
end

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

api_result_handler = client.update_member_role_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

updateMemberRoleByGuildName

Update member role by specifying guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
targetUserIdstring~ 128 charsUser ID to be updated
roleNamestring~ 128 charsRole Model Name

Result

TypeDescription
itemGuildUpdated 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.UpdateMemberRoleByGuildName(
    &guild.UpdateMemberRoleByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateMemberRoleByGuildName(
        (new UpdateMemberRoleByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateMemberRoleByGuildNameRequest;
using Gs2.Gs2Guild.Result.UpdateMemberRoleByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateMemberRoleByGuildNameResult> asyncResult = null;
yield return client.UpdateMemberRoleByGuildName(
    new Gs2.Gs2Guild.Request.UpdateMemberRoleByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.update_member_role_by_guild_name_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

batchUpdateMemberRole

Update member role in bulk

Please specify the access token as the access token assumed by the guild user

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
membersList<Member>1 ~ 100 itemsList of members to update

Result

TypeDescription
itemGuildUpdated 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.BatchUpdateMemberRole(
    &guild.BatchUpdateMemberRoleRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->batchUpdateMemberRole(
        (new BatchUpdateMemberRoleRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.BatchUpdateMemberRoleRequest;
using Gs2.Gs2Guild.Result.BatchUpdateMemberRoleResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.BatchUpdateMemberRoleResult> asyncResult = null;
yield return client.BatchUpdateMemberRole(
    new Gs2.Gs2Guild.Request.BatchUpdateMemberRoleRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    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['message'])
end

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

api_result_handler = client.batch_update_member_role_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

batchUpdateMemberRoleByGuildName

Update member role in bulk by specifying guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
membersList<Member>1 ~ 100 itemsList of members to update

Result

TypeDescription
itemGuildUpdated 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.BatchUpdateMemberRoleByGuildName(
    &guild.BatchUpdateMemberRoleByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->batchUpdateMemberRoleByGuildName(
        (new BatchUpdateMemberRoleByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.BatchUpdateMemberRoleByGuildNameRequest;
using Gs2.Gs2Guild.Result.BatchUpdateMemberRoleByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.BatchUpdateMemberRoleByGuildNameResult> asyncResult = null;
yield return client.BatchUpdateMemberRoleByGuildName(
    new Gs2.Gs2Guild.Request.BatchUpdateMemberRoleByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.batch_update_member_role_by_guild_name_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteGuild

Delete Guild

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name

Result

TypeDescription
itemGuildDeleted 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.DeleteGuild(
    &guild.DeleteGuildRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGuild(
        (new DeleteGuildRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
    );
    $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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken("accessToken-0001")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteGuildRequest;
using Gs2.Gs2Guild.Result.DeleteGuildResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildResult> asyncResult = null;
yield return client.DeleteGuild(
    new Gs2.Gs2Guild.Request.DeleteGuildRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_0001)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.delete_guild({
    namespaceName="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
})

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

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

api_result_handler = client.delete_guild_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteGuildByGuildName

Delete guild by specifying guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name

Result

TypeDescription
itemGuildDeleted 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.DeleteGuildByGuildName(
    &guild.DeleteGuildByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGuildByGuildName(
        (new DeleteGuildByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteGuildByGuildNameRequest;
using Gs2.Gs2Guild.Result.DeleteGuildByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteGuildByGuildNameResult> asyncResult = null;
yield return client.DeleteGuildByGuildName(
    new Gs2.Gs2Guild.Request.DeleteGuildByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

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

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

api_result_handler = client.delete_guild_by_guild_name_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

increaseMaximumCurrentMaximumMemberCountByGuildName

Add the maximum number of members by specifying the guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildUpdated 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.IncreaseMaximumCurrentMaximumMemberCountByGuildName(
    &guild.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->increaseMaximumCurrentMaximumMemberCountByGuildName(
        (new IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withValue(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
using Gs2.Gs2Guild.Result.IncreaseMaximumCurrentMaximumMemberCountByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.IncreaseMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.IncreaseMaximumCurrentMaximumMemberCountByGuildName(
    new Gs2.Gs2Guild.Request.IncreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
    value=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

decreaseMaximumCurrentMaximumMemberCount

Decrease the maximum number of members

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildUpdated 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.DecreaseMaximumCurrentMaximumMemberCount(
    &guild.DecreaseMaximumCurrentMaximumMemberCountRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->decreaseMaximumCurrentMaximumMemberCount(
        (new DecreaseMaximumCurrentMaximumMemberCountRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken("accessToken-0001")
            .withValue(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountRequest;
using Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountResult> asyncResult = null;
yield return client.DecreaseMaximumCurrentMaximumMemberCount(
    new Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
    value=nil,
})

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

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

api_result_handler = client.decrease_maximum_current_maximum_member_count_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

decreaseMaximumCurrentMaximumMemberCountByGuildName

Decrease the maximum number of members by specifying the guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
valueint1 ~ 2147483646Increase the maximum number of members

Result

TypeDescription
itemGuildUpdated 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.DecreaseMaximumCurrentMaximumMemberCountByGuildName(
    &guild.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->decreaseMaximumCurrentMaximumMemberCountByGuildName(
        (new DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withValue(null)
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest;
using Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.DecreaseMaximumCurrentMaximumMemberCountByGuildName(
    new Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
    value=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

verifyCurrentMaximumMemberCount

Verify the maximum number of guild members

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
verifyTypeenum {
    “less”,
    “lessEqual”,
    “greater”,
    “greaterEqual”,
    “equal”,
    “notEqual”
}
~ 128 charsType of verification
valueint1 ~ 2147483646Set the maximum number of members
multiplyValueSpecifyingQuantityboolfalseWhether to multiply the value used for verification when specifying the quantity

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
lessRank is less than the specified value
lessEqualRank is less than or equal to the specified value
greaterRank is greater than the specified value
greaterEqualRank is greater than or equal to the specified value
equalRank is equal to the specified value
notEqualRank is not equal to the specified value

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.VerifyCurrentMaximumMemberCount(
    &guild.VerifyCurrentMaximumMemberCountRequest {
        NamespaceName: pointy.String("namespace1"),
        GuildModelName: pointy.String("guild-model-0001"),
        AccessToken: ,
        VerifyType: pointy.String("less"),
        Value: pointy.Int32(10),
        MultiplyValueSpecifyingQuantity: 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\VerifyCurrentMaximumMemberCountRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyCurrentMaximumMemberCount(
        (new VerifyCurrentMaximumMemberCountRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken()
            ->withVerifyType("less")
            ->withValue(10)
            ->withMultiplyValueSpecifyingQuantity(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.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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken()
            .withVerifyType("less")
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountRequest;
using Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountResult> asyncResult = null;
yield return client.VerifyCurrentMaximumMemberCount(
    new Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountRequest()
        .WithNamespaceName("namespace1")
        .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;
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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken()
            .withVerifyType("less")
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(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.verify_current_maximum_member_count(
        guild.VerifyCurrentMaximumMemberCountRequest()
            .with_namespace_name(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token()
            .with_verify_type('less')
            .with_value(10)
            .with_multiply_value_specifying_quantity(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_current_maximum_member_count({
    namespaceName="namespace1",
    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['message'])
end

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

api_result_handler = client.verify_current_maximum_member_count_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result

verifyCurrentMaximumMemberCountByGuildName

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

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
verifyTypeenum {
    “less”,
    “lessEqual”,
    “greater”,
    “greaterEqual”,
    “equal”,
    “notEqual”
}
~ 128 charsType of verification
valueint1 ~ 2147483646Set the maximum number of members
multiplyValueSpecifyingQuantityboolfalseWhether to multiply the value used for verification when specifying the quantity

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
lessRank is less than the specified value
lessEqualRank is less than or equal to the specified value
greaterRank is greater than the specified value
greaterEqualRank is greater than or equal to the specified value
equalRank is equal to the specified value
notEqualRank is not equal to the specified value

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.VerifyCurrentMaximumMemberCountByGuildName(
    &guild.VerifyCurrentMaximumMemberCountByGuildNameRequest {
        NamespaceName: pointy.String("namespace1"),
        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")
}
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyCurrentMaximumMemberCountByGuildName(
        (new VerifyCurrentMaximumMemberCountByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withGuildName("guild-0001")
            ->withVerifyType("less")
            ->withValue(10)
            ->withMultiplyValueSpecifyingQuantity(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.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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withVerifyType("less")
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountByGuildNameRequest;
using Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.VerifyCurrentMaximumMemberCountByGuildName(
    new Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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;
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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withVerifyType("less")
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(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.verify_current_maximum_member_count_by_guild_name(
        guild.VerifyCurrentMaximumMemberCountByGuildNameRequest()
            .with_namespace_name(self.hash1)
            .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)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_current_maximum_member_count_by_guild_name({
    namespaceName="namespace1",
    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['message'])
end

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

api_result_handler = client.verify_current_maximum_member_count_by_guild_name_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result

verifyIncludeMember

Verify if guild members include user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
accessTokenstring~ 128 charsUser Id
verifyTypeenum {
    “include”,
    “notInclude”
}
~ 128 charsType of verification

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
includeGuild members include the specified user
notIncludeGuild members do not include the specified user

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.VerifyIncludeMember(
    &guild.VerifyIncludeMemberRequest {
        NamespaceName: pointy.String("namespace1"),
        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")
}
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyIncludeMember(
        (new VerifyIncludeMemberRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withGuildName("guild-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withVerifyType("include")
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("include")
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyIncludeMemberRequest;
using Gs2.Gs2Guild.Result.VerifyIncludeMemberResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyIncludeMemberResult> asyncResult = null;
yield return client.VerifyIncludeMember(
    new Gs2.Gs2Guild.Request.VerifyIncludeMemberRequest()
        .WithNamespaceName("namespace1")
        .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;
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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("include")
    );
} 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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_guild_name('guild-0001')
            .with_access_token(self.access_token_0001)
            .with_verify_type('include')
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_include_member({
    namespaceName="namespace1",
    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['message'])
end

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

api_result_handler = client.verify_include_member_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result

verifyIncludeMemberByUserId

Verify if guild members include user ID by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
userIdstring~ 128 charsUser Id
verifyTypeenum {
    “include”,
    “notInclude”
}
~ 128 charsType of verification
timeOffsetTokenstring~ 1024 charsTime offset token

Enumeration type definition to specify as verifyType

Enumerator String DefinitionDescription
includeGuild members include the specified user
notIncludeGuild members do not include the specified user

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.VerifyIncludeMemberByUserId(
    &guild.VerifyIncludeMemberByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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")
}
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyIncludeMemberByUserId(
        (new VerifyIncludeMemberByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withGuildName("guild-0001")
            ->withUserId("user-0001")
            ->withVerifyType("include")
            ->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.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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withUserId("user-0001")
            .withVerifyType("include")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyIncludeMemberByUserIdRequest;
using Gs2.Gs2Guild.Result.VerifyIncludeMemberByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyIncludeMemberByUserIdResult> asyncResult = null;
yield return client.VerifyIncludeMemberByUserId(
    new Gs2.Gs2Guild.Request.VerifyIncludeMemberByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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;
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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
            .withUserId("user-0001")
            .withVerifyType("include")
            .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.verify_include_member_by_user_id(
        guild.VerifyIncludeMemberByUserIdRequest()
            .with_namespace_name(self.hash1)
            .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)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_include_member_by_user_id({
    namespaceName="namespace1",
    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['message'])
end

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

api_result_handler = client.verify_include_member_by_user_id_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result

setMaximumCurrentMaximumMemberCountByGuildName

Set the maximum waiting time by specifying the guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildNamestring~ 128 charsGuild name
guildModelNamestring~ 128 charsGuild Model Name
valueint1 ~ 2147483646Set the maximum number of members

Result

TypeDescription
itemGuildUpdated Guild
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setMaximumCurrentMaximumMemberCountByGuildName(
        (new SetMaximumCurrentMaximumMemberCountByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SetMaximumCurrentMaximumMemberCountByGuildNameRequest;
using Gs2.Gs2Guild.Result.SetMaximumCurrentMaximumMemberCountByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SetMaximumCurrentMaximumMemberCountByGuildNameResult> asyncResult = null;
yield return client.SetMaximumCurrentMaximumMemberCountByGuildName(
    new Gs2.Gs2Guild.Request.SetMaximumCurrentMaximumMemberCountByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildName="guild-0001",
    guildModelName="guild-model-0001",
    value=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
old = result.old;

assume

Get an access token to act as a guild user

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name

Result

TypeDescription
tokenstringaccess token
userIdstringUser Id
expirelongeffective date (Unix time unit: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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->assume(
        (new AssumeRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AssumeRequest;
using Gs2.Gs2Guild.Result.AssumeResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AssumeResult> asyncResult = null;
yield return client.Assume(
    new Gs2.Gs2Guild.Request.AssumeRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

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

result = api_result.result
token = result.token;
userId = result.userId;
expire = result.expire;
client = gs2('guild')

api_result_handler = client.assume_async({
    namespaceName="namespace1",
    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['message'])
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

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
tokenstringaccess token
userIdstringUser Id
expirelongeffective date (Unix time unit: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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->assumeByUserId(
        (new AssumeByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AssumeByUserIdRequest;
using Gs2.Gs2Guild.Result.AssumeByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AssumeByUserIdResult> asyncResult = null;
yield return client.AssumeByUserId(
    new Gs2.Gs2Guild.Request.AssumeByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
token = result.token;
userId = result.userId;
expire = result.expire;

increaseMaximumCurrentMaximumMemberCountByStampSheet

Execute addition of the maximum number of members as a acquire action

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring~ 5242880 charsTransaction
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemGuildUpdated 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.IncreaseMaximumCurrentMaximumMemberCountByStampSheet(
    &guild.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest {
        StampSheet: pointy.String("stampSheet"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Guild\Gs2GuildRestClient;
use Gs2\Guild\Request\IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->increaseMaximumCurrentMaximumMemberCountByStampSheet(
        (new IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest())
            ->withStampSheet(self::stampSheet)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.guild.rest.Gs2GuildRestClient;
import io.gs2.guild.request.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest;
import io.gs2.guild.result.IncreaseMaximumCurrentMaximumMemberCountByStampSheetResult;

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

try {
    IncreaseMaximumCurrentMaximumMemberCountByStampSheetResult result = client.increaseMaximumCurrentMaximumMemberCountByStampSheet(
        new IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    Guild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest;
using Gs2.Gs2Guild.Result.IncreaseMaximumCurrentMaximumMemberCountByStampSheetResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.IncreaseMaximumCurrentMaximumMemberCountByStampSheetResult> asyncResult = null;
yield return client.IncreaseMaximumCurrentMaximumMemberCountByStampSheet(
    new Gs2.Gs2Guild.Request.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest()
        .WithStampSheet("stampSheet")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as 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.increaseMaximumCurrentMaximumMemberCountByStampSheet(
        new Gs2Guild.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-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.increase_maximum_current_maximum_member_count_by_stamp_sheet(
        guild.IncreaseMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.increase_maximum_current_maximum_member_count_by_stamp_sheet({
    stampSheet="stampSheet",
    keyId="key-0001",
})

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

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

api_result_handler = client.increase_maximum_current_maximum_member_count_by_stamp_sheet_async({
    stampSheet="stampSheet",
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;

decreaseMaximumCurrentMaximumMemberCountByStampTask

Execute subtraction of the maximum number of members as a consume action

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsConsume Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemGuildUpdated Guild
newContextStackstringRequest of context in which consume action execution results are recorded

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.DecreaseMaximumCurrentMaximumMemberCountByStampTask(
    &guild.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest {
        StampTask: pointy.String("stampTask"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
newContextStack := result.NewContextStack
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\DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->decreaseMaximumCurrentMaximumMemberCountByStampTask(
        (new DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.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.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest;
import io.gs2.guild.result.DecreaseMaximumCurrentMaximumMemberCountByStampTaskResult;

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

try {
    DecreaseMaximumCurrentMaximumMemberCountByStampTaskResult result = client.decreaseMaximumCurrentMaximumMemberCountByStampTask(
        new DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    Guild item = result.getItem();
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest;
using Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountByStampTaskResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DecreaseMaximumCurrentMaximumMemberCountByStampTaskResult> asyncResult = null;
yield return client.DecreaseMaximumCurrentMaximumMemberCountByStampTask(
    new Gs2.Gs2Guild.Request.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var newContextStack = result.NewContextStack;
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.decreaseMaximumCurrentMaximumMemberCountByStampTask(
        new Gs2Guild.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const newContextStack = result.getNewContextStack();
} 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_stamp_task(
        guild.DecreaseMaximumCurrentMaximumMemberCountByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.decrease_maximum_current_maximum_member_count_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

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

result = api_result.result
item = result.item;
newContextStack = result.newContextStack;
client = gs2('guild')

api_result_handler = client.decrease_maximum_current_maximum_member_count_by_stamp_task_async({
    stampTask="stampTask",
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
newContextStack = result.newContextStack;

setMaximumCurrentMaximumMemberCountByStampSheet

Execute setting the maximum number of members as a acquire action

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring~ 5242880 charsTransaction
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemGuildUpdated Guild
oldGuildUpdated 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.SetMaximumCurrentMaximumMemberCountByStampSheet(
    &guild.SetMaximumCurrentMaximumMemberCountByStampSheetRequest {
        StampSheet: pointy.String("stampSheet"),
        KeyId: pointy.String("key-0001"),
    }
)
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\SetMaximumCurrentMaximumMemberCountByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setMaximumCurrentMaximumMemberCountByStampSheet(
        (new SetMaximumCurrentMaximumMemberCountByStampSheetRequest())
            ->withStampSheet(self::stampSheet)
            ->withKeyId(self::key-0001)
    );
    $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.SetMaximumCurrentMaximumMemberCountByStampSheetRequest;
import io.gs2.guild.result.SetMaximumCurrentMaximumMemberCountByStampSheetResult;

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

try {
    SetMaximumCurrentMaximumMemberCountByStampSheetResult result = client.setMaximumCurrentMaximumMemberCountByStampSheet(
        new SetMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    Guild item = result.getItem();
    Guild old = result.getOld();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SetMaximumCurrentMaximumMemberCountByStampSheetRequest;
using Gs2.Gs2Guild.Result.SetMaximumCurrentMaximumMemberCountByStampSheetResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SetMaximumCurrentMaximumMemberCountByStampSheetResult> asyncResult = null;
yield return client.SetMaximumCurrentMaximumMemberCountByStampSheet(
    new Gs2.Gs2Guild.Request.SetMaximumCurrentMaximumMemberCountByStampSheetRequest()
        .WithStampSheet("stampSheet")
        .WithKeyId("key-0001"),
    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.setMaximumCurrentMaximumMemberCountByStampSheet(
        new Gs2Guild.SetMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    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_stamp_sheet(
        guild.SetMaximumCurrentMaximumMemberCountByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    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_stamp_sheet({
    stampSheet="stampSheet",
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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_stamp_sheet_async({
    stampSheet="stampSheet",
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
old = result.old;

verifyCurrentMaximumMemberCountByStampTask

Execute verification of the maximum number of guild members as a verify action

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsVerify Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
newContextStackstringRequest of context in which verify action execution results are recorded

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.VerifyCurrentMaximumMemberCountByStampTask(
    &guild.VerifyCurrentMaximumMemberCountByStampTaskRequest {
        StampTask: pointy.String("stampTask"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
newContextStack := result.NewContextStack
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\VerifyCurrentMaximumMemberCountByStampTaskRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyCurrentMaximumMemberCountByStampTask(
        (new VerifyCurrentMaximumMemberCountByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.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.VerifyCurrentMaximumMemberCountByStampTaskRequest;
import io.gs2.guild.result.VerifyCurrentMaximumMemberCountByStampTaskResult;

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

try {
    VerifyCurrentMaximumMemberCountByStampTaskResult result = client.verifyCurrentMaximumMemberCountByStampTask(
        new VerifyCurrentMaximumMemberCountByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountByStampTaskRequest;
using Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountByStampTaskResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyCurrentMaximumMemberCountByStampTaskResult> asyncResult = null;
yield return client.VerifyCurrentMaximumMemberCountByStampTask(
    new Gs2.Gs2Guild.Request.VerifyCurrentMaximumMemberCountByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var newContextStack = result.NewContextStack;
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.verifyCurrentMaximumMemberCountByStampTask(
        new Gs2Guild.VerifyCurrentMaximumMemberCountByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const newContextStack = result.getNewContextStack();
} 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_stamp_task(
        guild.VerifyCurrentMaximumMemberCountByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_current_maximum_member_count_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

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

result = api_result.result
newContextStack = result.newContextStack;
client = gs2('guild')

api_result_handler = client.verify_current_maximum_member_count_by_stamp_task_async({
    stampTask="stampTask",
    keyId="key-0001",
})

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

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

result = api_result.result
newContextStack = result.newContextStack;

verifyIncludeMemberByStampTask

Execute verification of whether the guild members include the user ID as a verify action

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsVerify Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
newContextStackstringRequest of context in which verify action execution results are recorded

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.VerifyIncludeMemberByStampTask(
    &guild.VerifyIncludeMemberByStampTaskRequest {
        StampTask: pointy.String("stampTask"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
newContextStack := result.NewContextStack
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\VerifyIncludeMemberByStampTaskRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->verifyIncludeMemberByStampTask(
        (new VerifyIncludeMemberByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.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.VerifyIncludeMemberByStampTaskRequest;
import io.gs2.guild.result.VerifyIncludeMemberByStampTaskResult;

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

try {
    VerifyIncludeMemberByStampTaskResult result = client.verifyIncludeMemberByStampTask(
        new VerifyIncludeMemberByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.VerifyIncludeMemberByStampTaskRequest;
using Gs2.Gs2Guild.Result.VerifyIncludeMemberByStampTaskResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.VerifyIncludeMemberByStampTaskResult> asyncResult = null;
yield return client.VerifyIncludeMemberByStampTask(
    new Gs2.Gs2Guild.Request.VerifyIncludeMemberByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var newContextStack = result.NewContextStack;
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.verifyIncludeMemberByStampTask(
        new Gs2Guild.VerifyIncludeMemberByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const newContextStack = result.getNewContextStack();
} 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_stamp_task(
        guild.VerifyIncludeMemberByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.verify_include_member_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

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

result = api_result.result
newContextStack = result.newContextStack;
client = gs2('guild')

api_result_handler = client.verify_include_member_by_stamp_task_async({
    stampTask="stampTask",
    keyId="key-0001",
})

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

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

result = api_result.result
newContextStack = result.newContextStack;

describeJoinedGuilds

Obtain list of joined guilds

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<JoinedGuild>List of Friend 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.DescribeJoinedGuilds(
    &guild.DescribeJoinedGuildsRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeJoinedGuilds(
        (new DescribeJoinedGuildsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeJoinedGuildsRequest;
using Gs2.Gs2Guild.Result.DescribeJoinedGuildsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeJoinedGuildsResult> asyncResult = null;
yield return client.DescribeJoinedGuilds(
    new Gs2.Gs2Guild.Request.DescribeJoinedGuildsRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    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['message'])
end

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

api_result_handler = client.describe_joined_guilds_async({
    namespaceName="namespace1",
    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['message'])
end

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

describeJoinedGuildsByUserId

Obtain list of joined guilds by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<JoinedGuild>List of Friend 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.DescribeJoinedGuildsByUserId(
    &guild.DescribeJoinedGuildsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeJoinedGuildsByUserId(
        (new DescribeJoinedGuildsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeJoinedGuildsByUserIdRequest;
using Gs2.Gs2Guild.Result.DescribeJoinedGuildsByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeJoinedGuildsByUserIdResult> asyncResult = null;
yield return client.DescribeJoinedGuildsByUserId(
    new Gs2.Gs2Guild.Request.DescribeJoinedGuildsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
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="namespace1",
    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['message'])
end

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

getJoinedGuild

Obtain joined guild

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name

Result

TypeDescription
itemJoinedGuildFriend 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.GetJoinedGuild(
    &guild.GetJoinedGuildRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getJoinedGuild(
        (new GetJoinedGuildRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
    );
    JoinedGuild item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetJoinedGuildRequest;
using Gs2.Gs2Guild.Result.GetJoinedGuildResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetJoinedGuildResult> asyncResult = null;
yield return client.GetJoinedGuild(
    new Gs2.Gs2Guild.Request.GetJoinedGuildRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

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

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

api_result_handler = client.get_joined_guild_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getJoinedGuildByUserId

Obtain joined guild by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemJoinedGuildFriend 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.GetJoinedGuildByUserId(
    &guild.GetJoinedGuildByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getJoinedGuildByUserId(
        (new GetJoinedGuildByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetJoinedGuildByUserIdRequest;
using Gs2.Gs2Guild.Result.GetJoinedGuildByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetJoinedGuildByUserIdResult> asyncResult = null;
yield return client.GetJoinedGuildByUserId(
    new Gs2.Gs2Guild.Request.GetJoinedGuildByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.get_joined_guild_by_user_id_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

withdrawal

Withdrawal from the Guild

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name

Result

TypeDescription
itemJoinedGuildAccepted Member 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.Withdrawal(
    &guild.WithdrawalRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->withdrawal(
        (new WithdrawalRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.WithdrawalRequest;
using Gs2.Gs2Guild.Result.WithdrawalResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.WithdrawalResult> asyncResult = null;
yield return client.Withdrawal(
    new Gs2.Gs2Guild.Request.WithdrawalRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

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

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

api_result_handler = client.withdrawal_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

withdrawalByUserId

Withdrawal from the Guild by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
guildNamestringUUID~ 36 charsGuild Name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemJoinedGuildAccepted Member 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.WithdrawalByUserId(
    &guild.WithdrawalByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->withdrawalByUserId(
        (new WithdrawalByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.WithdrawalByUserIdRequest;
using Gs2.Gs2Guild.Result.WithdrawalByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.WithdrawalByUserIdResult> asyncResult = null;
yield return client.WithdrawalByUserId(
    new Gs2.Gs2Guild.Request.WithdrawalByUserIdRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    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['message'])
end

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

api_result_handler = client.withdrawal_by_user_id_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

getLastGuildMasterActivity

Get user ID to refuse to participate

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityRefuse to participate user
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getLastGuildMasterActivity(
        (new GetLastGuildMasterActivityRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken()
    );
    LastGuildMasterActivity item = result.getItem();
    Guild guild = result.getGuild();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetLastGuildMasterActivityRequest;
using Gs2.Gs2Guild.Result.GetLastGuildMasterActivityResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetLastGuildMasterActivityResult> asyncResult = null;
yield return client.GetLastGuildMasterActivity(
    new Gs2.Gs2Guild.Request.GetLastGuildMasterActivityRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    accessToken=,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

getLastGuildMasterActivityByGuildName

Get user ID to refuse to participate by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityRefuse to participate user
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getLastGuildMasterActivityByGuildName(
        (new GetLastGuildMasterActivityByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
    );
    LastGuildMasterActivity item = result.getItem();
    Guild guild = result.getGuild();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetLastGuildMasterActivityByGuildNameRequest;
using Gs2.Gs2Guild.Result.GetLastGuildMasterActivityByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetLastGuildMasterActivityByGuildNameResult> asyncResult = null;
yield return client.GetLastGuildMasterActivityByGuildName(
    new Gs2.Gs2Guild.Request.GetLastGuildMasterActivityByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
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

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityRefuse to participate user
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->promoteSeniorMember(
        (new PromoteSeniorMemberRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken()
    );
    LastGuildMasterActivity item = result.getItem();
    Guild guild = result.getGuild();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.PromoteSeniorMemberRequest;
using Gs2.Gs2Guild.Result.PromoteSeniorMemberResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.PromoteSeniorMemberResult> asyncResult = null;
yield return client.PromoteSeniorMember(
    new Gs2.Gs2Guild.Request.PromoteSeniorMemberRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    accessToken=,
})

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

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

api_result_handler = client.promote_senior_member_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

promoteSeniorMemberByGuildName

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

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name

Result

TypeDescription
itemLastGuildMasterActivityRefuse to participate user
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->promoteSeniorMemberByGuildName(
        (new PromoteSeniorMemberByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withGuildName("guild-0001")
    );
    LastGuildMasterActivity item = result.getItem();
    Guild guild = result.getGuild();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.PromoteSeniorMemberByGuildNameRequest;
using Gs2.Gs2Guild.Result.PromoteSeniorMemberByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.PromoteSeniorMemberByGuildNameResult> asyncResult = null;
yield return client.PromoteSeniorMemberByGuildName(
    new Gs2.Gs2Guild.Request.PromoteSeniorMemberByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    guildName="guild-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

exportMaster

Export master data for currently available guild settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentGuildMasterCurrently available guild settings

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("namespace1"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $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("namespace1")
    );
    CurrentGuildMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.ExportMasterRequest;
using Gs2.Gs2Guild.Result.ExportMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Guild.Request.ExportMasterRequest()
        .WithNamespaceName("namespace1"),
    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("namespace1")
    );
    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(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.export_master({
    namespaceName="namespace1",
})

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

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

api_result_handler = client.export_master_async({
    namespaceName="namespace1",
})

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

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

result = api_result.result
item = result.item;

getCurrentGuildMaster

Retrieve the currently available guild settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentGuildMasterCurrently available guild settings

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("namespace1"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentGuildMaster(
        (new GetCurrentGuildMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $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("namespace1")
    );
    CurrentGuildMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetCurrentGuildMasterRequest;
using Gs2.Gs2Guild.Result.GetCurrentGuildMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetCurrentGuildMasterResult> asyncResult = null;
yield return client.GetCurrentGuildMaster(
    new Gs2.Gs2Guild.Request.GetCurrentGuildMasterRequest()
        .WithNamespaceName("namespace1"),
    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("namespace1")
    );
    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(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.get_current_guild_master({
    namespaceName="namespace1",
})

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

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

api_result_handler = client.get_current_guild_master_async({
    namespaceName="namespace1",
})

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

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

result = api_result.result
item = result.item;

updateCurrentGuildMaster

Update the currently available guild settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
settingsstring~ 5242880 charsMaster data

Result

TypeDescription
itemCurrentGuildMasterUpdated and currently available guild settings

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("namespace1"),
        Settings: pointy.String("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentGuildMaster(
        (new UpdateCurrentGuildMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}")
    );
    $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("namespace1")
            .withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}")
    );
    CurrentGuildMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterRequest;
using Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterResult> asyncResult = null;
yield return client.UpdateCurrentGuildMaster(
    new Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterRequest()
        .WithNamespaceName("namespace1")
        .WithSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}"),
    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("namespace1")
            .withSettings("{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}")
    );
    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(self.hash1)
            .with_settings('{"version": "2024-04-25", "guildModels": [{"name": "guild-0001", "defaultMaximumMemberCount": 10, "maximumMemberCount": 50, "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, "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}]}')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('guild')

api_result = client.update_current_guild_master({
    namespaceName="namespace1",
    settings="{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}",
})

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

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

api_result_handler = client.update_current_guild_master_async({
    namespaceName="namespace1",
    settings="{\"version\": \"2024-04-25\", \"guildModels\": [{\"name\": \"guild-0001\", \"defaultMaximumMemberCount\": 10, \"maximumMemberCount\": 50, \"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, \"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}]}",
})

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

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

result = api_result.result
item = result.item;

updateCurrentGuildMasterFromGitHub

Update the currently available guild settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
checkoutSettingGitHubCheckoutSettingSetup to check out master data from GitHub

Result

TypeDescription
itemCurrentGuildMasterUpdated and currently available guild settings

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("namespace1"),
        CheckoutSetting: &guild.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("$gitHubApiKey1.apiKeyId"),
            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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentGuildMasterFromGitHub(
        (new UpdateCurrentGuildMasterFromGitHubRequest())
            ->withNamespaceName(self::namespace1)
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId(self::$gitHubApiKey1.apiKeyId)
                ->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("namespace1")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterFromGitHubRequest;
using Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterFromGitHubResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.UpdateCurrentGuildMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentGuildMasterFromGitHub(
    new Gs2.Gs2Guild.Request.UpdateCurrentGuildMasterFromGitHubRequest()
        .WithNamespaceName("namespace1")
        .WithCheckoutSetting(new Gs2.Gs2Guild.Model.GitHubCheckoutSetting()
            .WithApiKeyId("$gitHubApiKey1.apiKeyId")
            .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("namespace1")
            .withCheckoutSetting(new Gs2Guild.model.GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .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(self.hash1)
            .with_checkout_setting(guild.GitHubCheckoutSetting()
                .with_api_key_id(self.git_hub_api_key1.api_key_id)
                .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="namespace1",
    checkoutSetting={
        api_key_id="$gitHubApiKey1.apiKeyId",
        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['message'])
end

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

api_result_handler = client.update_current_guild_master_from_git_hub_async({
    namespaceName="namespace1",
    checkoutSetting={
        api_key_id="$gitHubApiKey1.apiKeyId",
        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['message'])
end

result = api_result.result
item = result.item;

describeReceiveRequests

Get list of received guild requests

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ReceiveMemberRequest>List of Friend 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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeReceiveRequests(
        (new DescribeReceiveRequestsRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeReceiveRequestsRequest;
using Gs2.Gs2Guild.Result.DescribeReceiveRequestsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeReceiveRequestsResult> asyncResult = null;
yield return client.DescribeReceiveRequests(
    new Gs2.Gs2Guild.Request.DescribeReceiveRequestsRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

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

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

api_result_handler = client.describe_receive_requests_async({
    namespaceName="namespace1",
    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['message'])
end

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

describeReceiveRequestsByGuildName

Obtain list of guild requests received by specifying a guild name

Please specify the guild name for the user ID.

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ReceiveMemberRequest>List of Friend 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeReceiveRequestsByGuildName(
        (new DescribeReceiveRequestsByGuildNameRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeReceiveRequestsByGuildNameRequest;
using Gs2.Gs2Guild.Result.DescribeReceiveRequestsByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeReceiveRequestsByGuildNameResult> asyncResult = null;
yield return client.DescribeReceiveRequestsByGuildName(
    new Gs2.Gs2Guild.Request.DescribeReceiveRequestsByGuildNameRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName=nil,
    guildName="guild-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace2",
    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['message'])
end

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

getReceiveRequest

Retrieve received guild requests

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestFriend 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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getReceiveRequest(
        (new GetReceiveRequestRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withGuildModelName("guild-0001")
            .withAccessToken("accessToken-0001")
            .withFromUserId(null)
    );
    ReceiveMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetReceiveRequestRequest;
using Gs2.Gs2Guild.Result.GetReceiveRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetReceiveRequestResult> asyncResult = null;
yield return client.GetReceiveRequest(
    new Gs2.Gs2Guild.Request.GetReceiveRequestRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-0001",
    accessToken="accessToken-0001",
    fromUserId=nil,
})

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

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

api_result_handler = client.get_receive_request_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getReceiveRequestByGuildName

Obtain received guild requests by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestFriend 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getReceiveRequestByGuildName(
        (new GetReceiveRequestByGuildNameRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withGuildModelName(null)
            .withGuildName("guild-0001")
            .withFromUserId("user-0002")
    );
    ReceiveMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetReceiveRequestByGuildNameRequest;
using Gs2.Gs2Guild.Result.GetReceiveRequestByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetReceiveRequestByGuildNameResult> asyncResult = null;
yield return client.GetReceiveRequestByGuildName(
    new Gs2.Gs2Guild.Request.GetReceiveRequestByGuildNameRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName=nil,
    guildName="guild-0001",
    fromUserId="user-0002",
})

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

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

api_result_handler = client.get_receive_request_by_guild_name_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

acceptRequest

Accept Member Request

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestAccepted Member 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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->acceptRequest(
        (new AcceptRequestRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AcceptRequestRequest;
using Gs2.Gs2Guild.Result.AcceptRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AcceptRequestResult> asyncResult = null;
yield return client.AcceptRequest(
    new Gs2.Gs2Guild.Request.AcceptRequestRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-0001",
    accessToken="accessToken-0001",
    fromUserId=nil,
})

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

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

api_result_handler = client.accept_request_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

acceptRequestByGuildName

Accept Member Request by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestAccepted Member 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->acceptRequestByGuildName(
        (new AcceptRequestByGuildNameRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AcceptRequestByGuildNameRequest;
using Gs2.Gs2Guild.Result.AcceptRequestByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AcceptRequestByGuildNameResult> asyncResult = null;
yield return client.AcceptRequestByGuildName(
    new Gs2.Gs2Guild.Request.AcceptRequestByGuildNameRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName=nil,
    guildName="guild-0001",
    fromUserId="user-0002",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

rejectRequest

Reject guild request

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestRejected guild 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->rejectRequest(
        (new RejectRequestRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withGuildModelName(null)
            .withAccessToken()
            .withFromUserId("user-0002")
    );
    ReceiveMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.RejectRequestRequest;
using Gs2.Gs2Guild.Result.RejectRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.RejectRequestResult> asyncResult = null;
yield return client.RejectRequest(
    new Gs2.Gs2Guild.Request.RejectRequestRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName=nil,
    accessToken=,
    fromUserId="user-0002",
})

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

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

api_result_handler = client.reject_request_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

rejectRequestByGuildName

Reject guild requests by guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveMemberRequestRejected guild 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->rejectRequestByGuildName(
        (new RejectRequestByGuildNameRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withGuildModelName(null)
            .withGuildName("guild-0001")
            .withFromUserId("user-0002")
    );
    ReceiveMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.RejectRequestByGuildNameRequest;
using Gs2.Gs2Guild.Result.RejectRequestByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.RejectRequestByGuildNameResult> asyncResult = null;
yield return client.RejectRequestByGuildName(
    new Gs2.Gs2Guild.Request.RejectRequestByGuildNameRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    guildModelName=nil,
    guildName="guild-0001",
    fromUserId="user-0002",
})

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

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

api_result_handler = client.reject_request_by_guild_name_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

describeSendRequests

Get list of guild requests you have sent

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SendMemberRequest>List of Member 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.DescribeSendRequests(
    &guild.DescribeSendRequestsRequest {
        NamespaceName: pointy.String("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSendRequests(
        (new DescribeSendRequestsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeSendRequestsRequest;
using Gs2.Gs2Guild.Result.DescribeSendRequestsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeSendRequestsResult> asyncResult = null;
yield return client.DescribeSendRequests(
    new Gs2.Gs2Guild.Request.DescribeSendRequestsRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-0002",
    pageToken=nil,
    limit=nil,
})

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

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

api_result_handler = client.describe_send_requests_async({
    namespaceName="namespace1",
    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['message'])
end

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

describeSendRequestsByUserId

Obtain list of guild requests sent by specifying a user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<SendMemberRequest>List of Member 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.DescribeSendRequestsByUserId(
    &guild.DescribeSendRequestsByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSendRequestsByUserId(
        (new DescribeSendRequestsByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeSendRequestsByUserIdRequest;
using Gs2.Gs2Guild.Result.DescribeSendRequestsByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeSendRequestsByUserIdResult> asyncResult = null;
yield return client.DescribeSendRequestsByUserId(
    new Gs2.Gs2Guild.Request.DescribeSendRequestsByUserIdRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    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['message'])
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="namespace2",
    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['message'])
end

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

getSendRequest

Retrieve guild requests sent

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name

Result

TypeDescription
itemSendMemberRequestMember 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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSendRequest(
        (new GetSendRequestRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-0002")
            .withTargetGuildName("guild-0002")
    );
    SendMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetSendRequestRequest;
using Gs2.Gs2Guild.Result.GetSendRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetSendRequestResult> asyncResult = null;
yield return client.GetSendRequest(
    new Gs2.Gs2Guild.Request.GetSendRequestRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-0002",
    targetGuildName="guild-0002",
})

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

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

api_result_handler = client.get_send_request_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getSendRequestByUserId

Retrieves guild requests sent by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSendMemberRequestMember 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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSendRequestByUserId(
        (new GetSendRequestByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withUserId("user-0001")
            .withGuildModelName(null)
            .withTargetGuildName(null)
            .withTimeOffsetToken(null)
    );
    SendMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetSendRequestByUserIdRequest;
using Gs2.Gs2Guild.Result.GetSendRequestByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetSendRequestByUserIdResult> asyncResult = null;
yield return client.GetSendRequestByUserId(
    new Gs2.Gs2Guild.Request.GetSendRequestByUserIdRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    userId="user-0001",
    guildModelName=nil,
    targetGuildName=nil,
    timeOffsetToken=nil,
})

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

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

api_result_handler = client.get_send_request_by_user_id_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

sendRequest

Send a guild request

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name

Result

TypeDescription
itemGuildJoined Guild
sendMemberRequestSendMemberRequestSent Member 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.SendRequest(
    &guild.SendRequestRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        GuildModelName: pointy.String("guild-0002"),
        TargetGuildName: pointy.String("guild-0002"),
    }
)
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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->sendRequest(
        (new SendRequestRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withGuildModelName("guild-0002")
            ->withTargetGuildName("guild-0002")
    );
    $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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-0002")
            .withTargetGuildName("guild-0002")
    );
    Guild item = result.getItem();
    SendMemberRequest sendMemberRequest = result.getSendMemberRequest();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SendRequestRequest;
using Gs2.Gs2Guild.Result.SendRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SendRequestResult> asyncResult = null;
yield return client.SendRequest(
    new Gs2.Gs2Guild.Request.SendRequestRequest()
        .WithNamespaceName("namespace1")
        .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;
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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-0002")
            .withTargetGuildName("guild-0002")
    );
    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(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_guild_model_name('guild-0002')
            .with_target_guild_name('guild-0002')
    )
    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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-0002",
    targetGuildName="guild-0002",
})

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

result = api_result.result
item = result.item;
sendMemberRequest = result.sendMemberRequest;
client = gs2('guild')

api_result_handler = client.send_request_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
sendMemberRequest = result.sendMemberRequest;

sendRequestByUserId

Send a guild request specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGuildJoined Guild
sendMemberRequestSendMemberRequestSent Member 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.SendRequestByUserId(
    &guild.SendRequestByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        UserId: pointy.String("user-0001"),
        GuildModelName: nil,
        TargetGuildName: 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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->sendRequestByUserId(
        (new SendRequestByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withUserId("user-0001")
            ->withGuildModelName(null)
            ->withTargetGuildName(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("namespace2")
            .withUserId("user-0001")
            .withGuildModelName(null)
            .withTargetGuildName(null)
            .withTimeOffsetToken(null)
    );
    Guild item = result.getItem();
    SendMemberRequest sendMemberRequest = result.getSendMemberRequest();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.SendRequestByUserIdRequest;
using Gs2.Gs2Guild.Result.SendRequestByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.SendRequestByUserIdResult> asyncResult = null;
yield return client.SendRequestByUserId(
    new Gs2.Gs2Guild.Request.SendRequestByUserIdRequest()
        .WithNamespaceName("namespace2")
        .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;
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("namespace2")
            .withUserId("user-0001")
            .withGuildModelName(null)
            .withTargetGuildName(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(self.hash2)
            .with_user_id('user-0001')
            .with_guild_model_name(None)
            .with_target_guild_name(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="namespace2",
    userId="user-0001",
    guildModelName=nil,
    targetGuildName=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;
sendMemberRequest = result.sendMemberRequest;

deleteRequest

Delete guild request

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name

Result

TypeDescription
itemSendMemberRequestDeleted Member Requests

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteRequest(
        (new DeleteRequestRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withAccessToken("accessToken-0001")
            .withGuildModelName("guild-0002")
            .withTargetGuildName("guild-0002")
    );
    SendMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteRequestRequest;
using Gs2.Gs2Guild.Result.DeleteRequestResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteRequestResult> asyncResult = null;
yield return client.DeleteRequest(
    new Gs2.Gs2Guild.Request.DeleteRequestRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_access_token(self.access_token_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="namespace1",
    accessToken="accessToken-0001",
    guildModelName="guild-0002",
    targetGuildName="guild-0002",
})

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

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

api_result_handler = client.delete_request_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteRequestByUserId

Delete guild request by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
guildModelNamestring~ 128 charsGuild Model Name
targetGuildNamestring~ 128 charsGuild name
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSendMemberRequestDeleted Member Requests

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("namespace2"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteRequestByUserId(
        (new DeleteRequestByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->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("namespace2")
            .withUserId("user-0001")
            .withGuildModelName(null)
            .withTargetGuildName(null)
            .withTimeOffsetToken(null)
    );
    SendMemberRequest item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteRequestByUserIdRequest;
using Gs2.Gs2Guild.Result.DeleteRequestByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteRequestByUserIdResult> asyncResult = null;
yield return client.DeleteRequestByUserId(
    new Gs2.Gs2Guild.Request.DeleteRequestByUserIdRequest()
        .WithNamespaceName("namespace2")
        .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("namespace2")
            .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(self.hash2)
            .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="namespace2",
    userId="user-0001",
    guildModelName=nil,
    targetGuildName=nil,
    timeOffsetToken=nil,
})

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

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

api_result_handler = client.delete_request_by_user_id_async({
    namespaceName="namespace2",
    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['message'])
end

result = api_result.result
item = result.item;

describeIgnoreUsers

Get list of received guild requests

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeIgnoreUsers(
        (new DescribeIgnoreUsersRequest())
            ->withNamespaceName(self::namespace1)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeIgnoreUsersRequest;
using Gs2.Gs2Guild.Result.DescribeIgnoreUsersResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeIgnoreUsersResult> asyncResult = null;
yield return client.DescribeIgnoreUsers(
    new Gs2.Gs2Guild.Request.DescribeIgnoreUsersRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .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="namespace1",
    guildModelName="guild-model-0001",
    accessToken=,
    pageToken=nil,
    limit=nil,
})

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

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

api_result_handler = client.describe_ignore_users_async({
    namespaceName="namespace1",
    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['message'])
end

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

describeIgnoreUsersByGuildName

Get list of received guild requests by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

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("namespace1"),
        GuildModelName: pointy.String("guild-0001"),
        GuildName: pointy.String("$guild1.name"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeIgnoreUsersByGuildName(
        (new DescribeIgnoreUsersByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withGuildName(self::$guild1.name)
            ->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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .withPageToken(null)
            .withLimit(null)
    );
    List<IgnoreUser> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DescribeIgnoreUsersByGuildNameRequest;
using Gs2.Gs2Guild.Result.DescribeIgnoreUsersByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DescribeIgnoreUsersByGuildNameResult> asyncResult = null;
yield return client.DescribeIgnoreUsersByGuildName(
    new Gs2.Gs2Guild.Request.DescribeIgnoreUsersByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .WithGuildModelName("guild-0001")
        .WithGuildName("$guild1.name")
        .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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_guild_name(self.guild1.name)
            .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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    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['message'])
end

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

getIgnoreUser

Get user ID to refuse to participate

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
userIdstring~ 128 charsUser Id

Result

TypeDescription
itemIgnoreUserRefuse to participate user

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getIgnoreUser(
        (new GetIgnoreUserRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken("accessToken-0001")
            .withUserId("user-0001")
    );
    IgnoreUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetIgnoreUserRequest;
using Gs2.Gs2Guild.Result.GetIgnoreUserResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetIgnoreUserResult> asyncResult = null;
yield return client.GetIgnoreUser(
    new Gs2.Gs2Guild.Request.GetIgnoreUserRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
    userId="user-0001",
})

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

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

api_result_handler = client.get_ignore_user_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

getIgnoreUserByGuildName

Obtain received guild requests by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserRefuse to participate user

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("namespace1"),
        GuildModelName: pointy.String("guild-0001"),
        GuildName: pointy.String("$guild1.name"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getIgnoreUserByGuildName(
        (new GetIgnoreUserByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withGuildName(self::$guild1.name)
            ->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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    IgnoreUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.GetIgnoreUserByGuildNameRequest;
using Gs2.Gs2Guild.Result.GetIgnoreUserByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.GetIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.GetIgnoreUserByGuildName(
    new Gs2.Gs2Guild.Request.GetIgnoreUserByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .WithGuildModelName("guild-0001")
        .WithGuildName("$guild1.name")
        .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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_guild_name(self.guild1.name)
            .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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

api_result_handler = client.get_ignore_user_by_guild_name_async({
    namespaceName="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    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['message'])
end

result = api_result.result
item = result.item;

addIgnoreUser

Add user ID to refuse to participate

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
userIdstring~ 128 charsUser Id

Result

TypeDescription
itemIgnoreUserRefuse to participate user
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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addIgnoreUser(
        (new AddIgnoreUserRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .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.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AddIgnoreUserRequest;
using Gs2.Gs2Guild.Result.AddIgnoreUserResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AddIgnoreUserResult> asyncResult = null;
yield return client.AddIgnoreUser(
    new Gs2.Gs2Guild.Request.AddIgnoreUserRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
    userId="user-0001",
})

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

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

api_result_handler = client.add_ignore_user_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

addIgnoreUserByGuildName

Add user ID to refuse to participate by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserRefuse to participate user
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("namespace1"),
        GuildModelName: pointy.String("guild-0001"),
        GuildName: pointy.String("$guild1.name"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addIgnoreUserByGuildName(
        (new AddIgnoreUserByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withGuildName(self::$guild1.name)
            ->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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    IgnoreUser item = result.getItem();
    Guild guild = result.getGuild();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.AddIgnoreUserByGuildNameRequest;
using Gs2.Gs2Guild.Result.AddIgnoreUserByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.AddIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.AddIgnoreUserByGuildName(
    new Gs2.Gs2Guild.Request.AddIgnoreUserByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .WithGuildModelName("guild-0001")
        .WithGuildName("$guild1.name")
        .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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_guild_name(self.guild1.name)
            .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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    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['message'])
end

result = api_result.result
item = result.item;
guild = result.guild;

deleteIgnoreUser

Delete user ID to refuse to participate

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
accessTokenstring~ 128 charsGuild name
userIdstring~ 128 charsUser Id

Result

TypeDescription
itemIgnoreUserRefuse to participate user

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("namespace1"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteIgnoreUser(
        (new DeleteIgnoreUserRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-model-0001")
            ->withAccessToken(self::$accessToken0001)
            ->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("namespace1")
            .withGuildModelName("guild-model-0001")
            .withAccessToken("accessToken-0001")
            .withUserId("user-0001")
    );
    IgnoreUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteIgnoreUserRequest;
using Gs2.Gs2Guild.Result.DeleteIgnoreUserResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteIgnoreUserResult> asyncResult = null;
yield return client.DeleteIgnoreUser(
    new Gs2.Gs2Guild.Request.DeleteIgnoreUserRequest()
        .WithNamespaceName("namespace1")
        .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("namespace1")
            .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(self.hash1)
            .with_guild_model_name('guild-model-0001')
            .with_access_token(self.access_token_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="namespace1",
    guildModelName="guild-model-0001",
    accessToken="accessToken-0001",
    userId="user-0001",
})

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

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

api_result_handler = client.delete_ignore_user_async({
    namespaceName="namespace1",
    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['message'])
end

result = api_result.result
item = result.item;

deleteIgnoreUserByGuildName

Delete user ID to refuse to participate by specifying a guild name

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
guildModelNamestring~ 128 charsGuild Model Name
guildNamestring~ 128 charsGuild name
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemIgnoreUserRefuse to participate user

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("namespace1"),
        GuildModelName: pointy.String("guild-0001"),
        GuildName: pointy.String("$guild1.name"),
        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 Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteIgnoreUserByGuildName(
        (new DeleteIgnoreUserByGuildNameRequest())
            ->withNamespaceName(self::namespace1)
            ->withGuildModelName("guild-0001")
            ->withGuildName(self::$guild1.name)
            ->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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    IgnoreUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Guild.Gs2GuildRestClient;
using Gs2.Gs2Guild.Request.DeleteIgnoreUserByGuildNameRequest;
using Gs2.Gs2Guild.Result.DeleteIgnoreUserByGuildNameResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2GuildRestClient(session);

AsyncResult<Gs2.Gs2Guild.Result.DeleteIgnoreUserByGuildNameResult> asyncResult = null;
yield return client.DeleteIgnoreUserByGuildName(
    new Gs2.Gs2Guild.Request.DeleteIgnoreUserByGuildNameRequest()
        .WithNamespaceName("namespace1")
        .WithGuildModelName("guild-0001")
        .WithGuildName("$guild1.name")
        .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("namespace1")
            .withGuildModelName("guild-0001")
            .withGuildName("$guild1.name")
            .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(self.hash1)
            .with_guild_model_name('guild-0001')
            .with_guild_name(self.guild1.name)
            .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="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

api_result_handler = client.delete_ignore_user_by_guild_name_async({
    namespaceName="namespace1",
    guildModelName="guild-0001",
    guildName="$guild1.name",
    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['message'])
end

result = api_result.result
item = result.item;