GS2-Guild SDK API リファレンス モデル Namespace ネームスペース
ネームスペースは一つのプロジェクトで同じサービスを異なる用途で複数利用できるようにするための仕組みです。 GS2 のサービスは基本的にネームスペースというレイヤーがあり、ネームスペースが異なれば同じサービスでもまったく別のデータ空間として取り扱われます。
そのため、各サービスの利用を開始するにあたってネームスペースを作成する必要があります。
GuildModelMaster ギルドモデルマスター
ギルドモデルとは、ギルドの加入可能最大人数の設定や、ギルド内での役職ごとの権限設定を持つエンティティです。
型 有効化条件 必須 デフォルト 値の制限 説明 guildModelId string ✓ ~ 1024文字 ギルドモデルマスターGRN name string ✓ ~ 128文字 ギルドモデル名 description string ~ 1024文字 説明文 metadata string ~ 1024文字 メタデータ defaultMaximumMemberCount int ✓ ~ 2147483646 ギルド作成時に適用されるギルドメンバーの最大数 maximumMemberCount int ✓ ~ 2147483646 ギルドメンバーの引き上げを行える最大値 inactivityPeriodDays int ✓ 7 1 ~ 365 ギルドメンバーから新しいギルドマスターを選出するためのギルドマスターの無活動期間(日) roles List<RoleModel> ✓ 1 ~ 10 items ギルド内の各役職ごとの権限設定リスト guildMasterRole string ✓ ~ 128文字 ギルドマスターが持つ権限 guildMemberDefaultRole string ✓ ~ 128文字 ギルドメンバーが初期状態に持つロール rejoinCoolTimeMinutes int ✓ 0 ~ 2147483646 ギルド離脱後に再度参加できるまでのクールタイム(分) maxConcurrentJoinGuilds int 1 ~ 10 同時に参加可能なギルドの最大数 maxConcurrentGuildMasterCount int 1 ~ 100 同時に存在可能なギルドマスターの最大人数 createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒) updatedAt long ✓ 現在時刻 最終更新日時 (UNIX時間 単位:ミリ秒) revision long 0 ~ 9223372036854775805 リビジョン
GuildModel ギルドモデルマスター
ギルドモデルとは、ギルドの加入可能最大人数の設定や、ギルド内での役職ごとの権限設定を持つエンティティです。
型 有効化条件 必須 デフォルト 値の制限 説明 guildModelId string ✓ ~ 1024文字 ギルドモデルGRN name string ✓ ~ 128文字 ギルドモデル名 metadata string ~ 2048文字 メタデータ defaultMaximumMemberCount int ✓ 1 ~ 2147483646 ギルド作成時に適用されるギルドメンバーの最大数 maximumMemberCount int ✓ 1 ~ 2147483646 ギルドメンバーの引き上げを行える最大値 inactivityPeriodDays int ✓ 7 1 ~ 365 ギルドメンバーから新しいギルドマスターを選出するためのギルドマスターの無活動期間(日) roles List<RoleModel> ✓ 1 ~ 10 items ギルド内の各役職ごとの権限設定リスト guildMasterRole string ✓ ~ 128文字 ギルドマスターが持つ権限 guildMemberDefaultRole string ✓ ~ 128文字 ギルドメンバーが初期状態に持つロール rejoinCoolTimeMinutes int ✓ 0 ~ 2147483646 ギルド離脱後に再度参加できるまでのクールタイム(分) maxConcurrentJoinGuilds int 1 ~ 10 同時に参加可能なギルドの最大数 maxConcurrentGuildMasterCount int 1 ~ 100 同時に存在可能なギルドマスターの最大人数
Inbox 受信ボックス
受信したメンバーリクエストのリスト
型 有効化条件 必須 デフォルト 値の制限 説明 inboxId string ✓ ~ 1024文字 受信したギルド加入リクエストGRN guildName string ✓ ~ 128文字 ギルド名 fromUserIds List<string> ~ 1000 items メンバーリクエストを送ってきたユーザーIDリスト createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒) updatedAt long ✓ 現在時刻 最終更新日時 (UNIX時間 単位:ミリ秒) revision long 0 ~ 9223372036854775805 リビジョン
SendBox 送信ボックス
送信したメンバーリクエストのリスト
型 有効化条件 必須 デフォルト 値の制限 説明 sendBoxId string ✓ ~ 1024文字 送信したギルド加入リクエストGRN userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildNames List<string> ~ 10 items メンバーリクエストの宛先ギルド名リスト createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒) updatedAt long ✓ 現在時刻 最終更新日時 (UNIX時間 単位:ミリ秒) revision long 0 ~ 9223372036854775805 リビジョン
Guild ギルド
初めて GetGuildGuild を呼び出した時に作成され、その時間から放置時間のカウントが始まります。 放置時間のカウントは報酬を受け取るとリセットされます。
GS2-Schedule のイベントが関連づけられている場合、イベントの開催前には Guild にアクセスできず、ギルドを作成することもできません。 イベントが関連づけられている場合、ギルド はイベントの繰り返し回数を保持します。 現在のイベントIDとギルド作成時のイベントIDが一致しない場合、現在のイベントの繰り返し回数とギルドが保持する繰り返し回数が一致しない場合、またはイベントの開始時刻より前にギルドが作成されている場合、待機時間 はリセットされます。
型 有効化条件 必須 デフォルト 値の制限 説明 guildId string ✓ ~ 1024文字 ギルドGRN guildModelName string ✓ ~ 128文字 ギルドモデル名 name string ✓ UUID ~ 36文字 ギルド名 displayName string ✓ ~ 64文字 表示名 attribute1 int ~ 2147483645 属性1 attribute2 int ~ 2147483645 属性2 attribute3 int ~ 2147483645 属性3 attribute4 int ~ 2147483645 属性4 attribute5 int ~ 2147483645 属性5 joinPolicy enum { “anybody”, “approval” } ✓ ~ 128文字 参加方針 customRoles List<RoleModel> ~ 10 items ギルドが個別に定義した各役職ごとの権限設定リスト guildMemberDefaultRole string ~ 128文字 ギルドメンバーが初期状態に持つカスタムロール currentMaximumMemberCount int ✓ 1 ~ 2147483646 ギルドメンバーの最大人数 members List<Member> ~ 10 items ギルドメンバーリスト createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒) updatedAt long ✓ 現在時刻 最終更新日時 (UNIX時間 単位:ミリ秒) revision long 0 ~ 9223372036854775805 リビジョン
joinPolicy に指定する列挙型の定義 定義 説明 anybody 自由参加 approval 承認制
JoinedGuild 参加中のギルド
型 有効化条件 必須 デフォルト 値の制限 説明 joinedGuildId string ✓ ~ 1024文字 参加中のギルドGRN guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒)
LastGuildMasterActivity 最後にギルドマスターがアクティビティを行った日時
型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID updatedAt long ✓ 現在時刻 最終更新日時 (UNIX時間 単位:ミリ秒)
CurrentGuildMaster 現在有効なマスターデータ
GS2ではマスターデータの管理にJSON形式のファイルを使用します。 ファイルをアップロードすることで、実際にサーバーに設定を反映することができます。
JSONファイルを作成する方法として、マネージメントコンソール上でのマスターデータエディタを提供していますが よりゲームの運営に相応しいツールを作成し、適切なフォーマットのJSONファイルを書き出すことでもサービスを利用可能です。
型 有効化条件 必須 デフォルト 値の制限 説明 namespaceId string ✓ ~ 1024文字 現在有効なギルド設定GRN settings string ✓ ~ 5242880文字 マスターデータ
RoleModel ロールモデル
ロールモデルはギルド内での役割を定義し、その役割ごと実行できる処理に関する権限を設定します。
型 有効化条件 必須 デフォルト 値の制限 説明 name string ✓ ~ 128文字 ロールモデル名 metadata string ~ 2048文字 メタデータ policyDocument string ✓ ~ 10240文字 ロールに適用する権限のポリシードキュメント
Member メンバー
ギルドメンバーの一覧を管理するエンティティ
型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID roleName string ✓ ~ 128文字 ロールモデル名 joinedAt long ✓ 現在時刻 参加日時 (UNIX時間 単位:ミリ秒)
ReceiveMemberRequest 受信したメンバーリクエスト
メンバーの登録申請を受け付けた状態であることを表すエンティティです。 該当ユーザーがほかのユーザーから受信したメンバーリクエストです。 該当ユーザーが承認を行うとメンバーリクエストは削除され、メンバーリストに登録されます。
型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 送信元 targetGuildName string ✓ ~ 128文字 送信先
SendMemberRequest 送信したメンバーリクエスト
メンバーの登録を申請中である状態を表すエンティティです。 該当ユーザーがほかのユーザーに対して送信したメンバーリクエストです。 送信先のユーザーが承認を行うとメンバーリクエストは削除され、メンバーリストに登録されます。
型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 送信元 targetGuildName string ✓ ~ 128文字 ギルド名
IgnoreUser 参加を拒否するユーザー
型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID createdAt long ✓ 現在時刻 作成日時 (UNIX時間 単位:ミリ秒)
VerifyActionResult 検証アクションの実行結果
型 有効化条件 必須 デフォルト 値の制限 説明 action enum { } ✓ ~ 128文字 検証アクションで実行するアクションの種類 verifyRequest string ✓ ~ 1048576文字 リクエストのJSON statusCode int ~ 999 ステータスコード verifyResult string ~ 1048576文字 結果内容
action に指定する列挙型の定義 ConsumeActionResult 消費アクションの実行結果
型 有効化条件 必須 デフォルト 値の制限 説明 action enum { } ✓ ~ 128文字 消費アクションで実行するアクションの種類 consumeRequest string ✓ ~ 1048576文字 リクエストのJSON statusCode int ~ 999 ステータスコード consumeResult string ~ 1048576文字 結果内容
action に指定する列挙型の定義 AcquireActionResult 入手アクションの実行結果
型 有効化条件 必須 デフォルト 値の制限 説明 action enum { } ✓ ~ 128文字 入手アクションで実行するアクションの種類 acquireRequest string ✓ ~ 1048576文字 リクエストのJSON statusCode int ~ 999 ステータスコード acquireResult string ~ 1048576文字 結果内容
action に指定する列挙型の定義 TransactionResult トランザクション実行結果
サーバーサイドでのトランザクションの自動実行機能を利用して実行されたトランザクションの実行結果
TransactionSetting トランザクション設定
型 有効化条件 必須 デフォルト 値の制限 説明 enableAutoRun bool ✓ false 発行したトランザクションをサーバーサイドで自動的に実行するか enableAtomicCommit bool {enableAutoRun} == true ✓ false トランザクションの実行をアトミックにコミットするか transactionUseDistributor bool {enableAtomicCommit} == true ✓ false トランザクションを非同期処理で実行する acquireActionUseJobQueue bool {enableAtomicCommit} == true ✓ false 入手アクションを実行する際に GS2-JobQueue を使用するか distributorNamespaceId string ✓ “grn:gs2:{region}:{ownerId}:distributor:default” ~ 1024文字 トランザクションの実行に使用する GS2-Distributor ネームスペース queueNamespaceId string ✓ “grn:gs2:{region}:{ownerId}:queue:default” ~ 1024文字 トランザクションの実行に使用する GS2-JobQueue のネームスペース
NotificationSetting プッシュ通知に関する設定
GS2 のマイクロサービス内で何らかのイベントが発生した際に、プッシュ通知を送信するための設定です。 ここでいうプッシュ通知は GS2-Gateway の提供する WebSocket インターフェースを経由した処理であり、スマートフォンのプッシュ通知とは性質が異なります。 たとえば、マッチメイキングが完了した時やフレンドリクエストが届いた時など、ゲームクライアントの操作とは関係なく状態が変化した際に GS2-Gateway を経由してプッシュ通知をすることで、ゲームクライアントは状態の変化を検知することができます。
GS2-Gateway のプッシュ通知は通知先のデバイスがオフラインだった時に追加の処理としてモバイルプッシュ通知を送信できます。 モバイルプッシュ通知をうまく利用すれば、マッチメイキング中にゲームを終了しても、モバイルプッシュ通知を使用してプレイヤーに通知し、ゲームに戻ってくるフローを実現できる可能性があります。
型 有効化条件 必須 デフォルト 値の制限 説明 gatewayNamespaceId string ✓ “grn:gs2:{region}:{ownerId}:gateway:default” ~ 1024文字 プッシュ通知に使用する GS2-Gateway のネームスペース enableTransferMobileNotification bool? false モバイルプッシュ通知へ転送するか sound string {enableTransferMobileNotification} == true ~ 1024文字 モバイルプッシュ通知で使用するサウンドファイル名
ScriptSetting スクリプト設定
GS2 ではマイクロサービスのイベントに関連づけて、カスタムスクリプトを実行することができます。 このモデルは、スクリプトの実行をトリガーするための設定を保持します。
スクリプトの実行方式は大きく2種類あり、それは「同期実行」と「非同期実行」です。 同期実行は、スクリプトの実行が完了するまで処理がブロックされます。 かわりに、スクリプトの実行結果を使ってAPIの実行を止めたり、APIの結果を改ざんすることができます。
一方、非同期実行は、スクリプトの実行が完了するまで処理がブロックされません。 かわりに、スクリプトの実行結果を使ってAPIの実行を止めたり、APIの結果を改ざんすることはできません。 しかし、非同期実行は、スクリプトの実行が完了するまで処理がブロックされないため、APIの応答に影響を与えないため、原則非同期実行を使用することをおすすめします。
非同期実行には実行方式が2種類あり、GS2-Script と Amazon EventBridge があります。 Amazon EventBridge を使用することで、Lua 以外の言語で処理を記述することができます。
型 有効化条件 必須 デフォルト 値の制限 説明 triggerScriptId string ~ 1024文字 スクリプトGRN doneTriggerTargetType enum { “none”, “gs2_script”, “aws” } ✓ “none” ~ 128文字 完了通知の通知先 doneTriggerScriptId string {doneTriggerTargetType} == “gs2_script” ~ 1024文字 スクリプトGRN doneTriggerQueueNamespaceId string {doneTriggerTargetType} == “gs2_script” ~ 1024文字 ネームスペースGRN
doneTriggerTargetType に指定する列挙型の定義 定義 説明 none なし gs2_script GS2-Script aws Amazon EventBridge
LogSetting ログの書き出し設定
ログデータの書き出し設定を管理します。この型は、ログデータを書き出すために使用されるログ名前空間の識別子(Namespace ID)を保持します。 ログ名前空間IDは、ログデータを集約し、保存する対象の GS2-Log の名前空間を指定します。 この設定を通じて、この名前空間以下のAPIリクエスト・レスポンスログデータが対象の GS2-Log へ出力されるようになります。 GS2-Log にはリアルタイムでログが提供され、システムの監視や分析、デバッグなどに利用できます。
型 有効化条件 必須 デフォルト 値の制限 説明 loggingNamespaceId string ✓ ~ 1024文字 ネームスペースGRN
GitHubCheckoutSetting GitHubからマスターデータをチェックアウトする設定
型 有効化条件 必須 デフォルト 値の制限 説明 apiKeyId string ✓ ~ 1024文字 GitHub のAPIキーGRN repositoryName string ✓ ~ 1024文字 リポジトリ名 sourcePath string ✓ ~ 1024文字 ソースコードのファイルパス referenceType enum { “commit_hash”, “branch”, “tag” } ✓ ~ 128文字 コードの取得元 commitHash string {referenceType} == “commit_hash” ✓ ~ 1024文字 コミットハッシュ branchName string {referenceType} == “branch” ✓ ~ 1024文字 ブランチ名 tagName string {referenceType} == “tag” ✓ ~ 1024文字 タグ名
referenceType に指定する列挙型の定義 定義 説明 commit_hash コミットハッシュ branch ブランチ tag タグ
メソッド describeNamespaces ネームスペースの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ネームスペースを新規作成
Request Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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: \n amespace1" ))
);
$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 ネームスペースの状態を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ネームスペースを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ネームスペースを更新
Request Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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: \n amespace1" ))
);
$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 ネームスペースを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのダンプを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのダンプが完了しているか確認
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのダンプを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのダンプが完了しているか確認
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのインポートを開始
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 型 説明 uploadToken string アップロード後に結果を反映する際に使用するトークン uploadUrl string ユーザーデータアップロード処理の実行に使用するURL
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのインポートを開始
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID uploadToken string ✓ ~ 1024文字 アップロード準備で受け取ったトークン timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 指定したユーザーIDに紐づくデータのインポートが完了しているか確認
Request 型 有効化条件 必須 デフォルト 値の制限 説明 userId string ✓ ~ 128文字 ユーザーID uploadToken string ✓ ~ 1024文字 アップロード準備で受け取ったトークン timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルマスターの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルマスターを新規作成
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 name string ✓ ~ 128文字 ギルドモデル名 description string ~ 1024文字 説明文 metadata string ~ 1024文字 メタデータ defaultMaximumMemberCount int ✓ ~ 2147483646 ギルド作成時に適用されるギルドメンバーの最大数 maximumMemberCount int ✓ ~ 2147483646 ギルドメンバーの引き上げを行える最大値 inactivityPeriodDays int ✓ 7 1 ~ 365 ギルドメンバーから新しいギルドマスターを選出するためのギルドマスターの無活動期間(日) roles List<RoleModel> ✓ 1 ~ 10 items ギルド内の各役職ごとの権限設定リスト guildMasterRole string ✓ ~ 128文字 ギルドマスターが持つ権限 guildMemberDefaultRole string ✓ ~ 128文字 ギルドメンバーが初期状態に持つロール rejoinCoolTimeMinutes int ✓ 0 ~ 2147483646 ギルド離脱後に再度参加できるまでのクールタイム(分) maxConcurrentJoinGuilds int 1 ~ 10 同時に参加可能なギルドの最大数 maxConcurrentGuildMasterCount int 1 ~ 100 同時に存在可能なギルドマスターの最大人数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルマスターを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルマスターを更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 description string ~ 1024文字 説明文 metadata string ~ 1024文字 メタデータ defaultMaximumMemberCount int ✓ ~ 2147483646 ギルド作成時に適用されるギルドメンバーの最大数 maximumMemberCount int ✓ ~ 2147483646 ギルドメンバーの引き上げを行える最大値 inactivityPeriodDays int ✓ 7 1 ~ 365 ギルドメンバーから新しいギルドマスターを選出するためのギルドマスターの無活動期間(日) roles List<RoleModel> ✓ 1 ~ 10 items ギルド内の各役職ごとの権限設定リスト guildMasterRole string ✓ ~ 128文字 ギルドマスターが持つ権限 guildMemberDefaultRole string ✓ ~ 128文字 ギルドメンバーが初期状態に持つロール rejoinCoolTimeMinutes int ✓ 0 ~ 2147483646 ギルド離脱後に再度参加できるまでのクールタイム(分) maxConcurrentJoinGuilds int 1 ~ 10 同時に参加可能なギルドの最大数 maxConcurrentGuildMasterCount int 1 ~ 100 同時に存在可能なギルドマスターの最大人数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルマスターを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドモデルを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ユーザーID displayName string ~ 64文字 検索するギルド表示名 attributes1 List<int> ~ 10 items 検索する属性1 attributes2 List<int> ~ 10 items 検索する属性2 attributes3 List<int> ~ 10 items 検索する属性3 attributes4 List<int> ~ 10 items 検索する属性4 attributes5 List<int> ~ 10 items 検索する属性5 joinPolicies List<string> ~ 10 items 検索するギルド参加方法リスト includeFullMembersGuild bool? false ギルドメンバンが満員のギルドを検索結果に含めるか orderBy enum { “number_of_players”, “attribute1_asc”, “attribute1_desc”, “attribute2_asc”, “attribute2_desc”, “attribute3_asc”, “attribute3_desc”, “attribute4_asc”, “attribute4_desc”, “attribute5_asc”, “attribute5_desc”, “last_updated” } ✓ “number_of_players” ~ 128文字 並び順 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
orderBy に指定する列挙型の定義 定義 説明 number_of_players 参加プレイヤー数 attribute1_asc 属性1昇順 attribute1_desc 属性1降順 attribute2_asc 属性2昇順 attribute2_desc 属性2降順 attribute3_asc 属性3昇順 attribute3_desc 属性3降順 attribute4_asc 属性4昇順 attribute4_desc 属性4降順 attribute5_asc 属性5昇順 attribute5_desc 属性5降順 last_updated 最終更新日時
Result 型 説明 items List<Guild> ギルドのリスト nextPageToken string リストの続きを取得するためのページトークン
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 userId string ✓ ~ 128文字 ユーザーID displayName string ~ 64文字 検索するギルド表示名 attributes1 List<int> ~ 10 items 検索する属性1 attributes2 List<int> ~ 10 items 検索する属性2 attributes3 List<int> ~ 10 items 検索する属性3 attributes4 List<int> ~ 10 items 検索する属性4 attributes5 List<int> ~ 10 items 検索する属性5 joinPolicies List<string> ~ 10 items 検索するギルド参加方法リスト includeFullMembersGuild bool? false ギルドメンバンが満員のギルドを検索結果に含めるか orderBy enum { “number_of_players”, “attribute1_asc”, “attribute1_desc”, “attribute2_asc”, “attribute2_desc”, “attribute3_asc”, “attribute3_desc”, “attribute4_asc”, “attribute4_desc”, “attribute5_asc”, “attribute5_desc”, “last_updated” } ✓ “number_of_players” ~ 128文字 並び順 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
orderBy に指定する列挙型の定義 定義 説明 number_of_players 参加プレイヤー数 attribute1_asc 属性1昇順 attribute1_desc 属性1降順 attribute2_asc 属性2昇順 attribute2_desc 属性2降順 attribute3_asc 属性3昇順 attribute3_desc 属性3降順 attribute4_asc 属性4昇順 attribute4_desc 属性4降順 attribute5_asc 属性5昇順 attribute5_desc 属性5降順 last_updated 最終更新日時
Result 型 説明 items List<Guild> ギルドのリスト nextPageToken string リストの続きを取得するためのページトークン
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドを作成
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 displayName string ✓ ~ 64文字 表示名 attribute1 int ~ 2147483645 属性1 attribute2 int ~ 2147483645 属性2 attribute3 int ~ 2147483645 属性3 attribute4 int ~ 2147483645 属性4 attribute5 int ~ 2147483645 属性5 joinPolicy enum { “anybody”, “approval” } ✓ ~ 128文字 参加方針 customRoles List<RoleModel> ~ 10 items ギルドが個別に定義した各役職ごとの権限設定リスト guildMemberDefaultRole string ~ 128文字 ギルドメンバーが初期状態に持つカスタムロール
joinPolicy に指定する列挙型の定義 定義 説明 anybody 自由参加 approval 承認制
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドを作成
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 displayName string ✓ ~ 64文字 表示名 attribute1 int ~ 2147483645 属性1 attribute2 int ~ 2147483645 属性2 attribute3 int ~ 2147483645 属性3 attribute4 int ~ 2147483645 属性4 attribute5 int ~ 2147483645 属性5 joinPolicy enum { “anybody”, “approval” } ✓ ~ 128文字 参加方針 customRoles List<RoleModel> ~ 10 items ギルドが個別に定義した各役職ごとの権限設定リスト guildMemberDefaultRole string ~ 128文字 ギルドメンバーが初期状態に持つカスタムロール timeOffsetToken string ~ 1024文字 タイムオフセットトークン
joinPolicy に指定する列挙型の定義 定義 説明 anybody 自由参加 approval 承認制
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドを更新
アクセストークンにはギルドユーザーに Assume したアクセストークンを指定してください
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ギルド名 guildModelName string ✓ ~ 128文字 ギルドモデル名 displayName string ✓ ~ 64文字 表示名 attribute1 int ~ 2147483645 属性1 attribute2 int ~ 2147483645 属性2 attribute3 int ~ 2147483645 属性3 attribute4 int ~ 2147483645 属性4 attribute5 int ~ 2147483645 属性5 joinPolicy enum { “anybody”, “approval” } ✓ ~ 128文字 参加方針 customRoles List<RoleModel> ~ 10 items ギルドが個別に定義した各役職ごとの権限設定リスト guildMemberDefaultRole string ~ 128文字 ギルドメンバーが初期状態に持つカスタムロール
joinPolicy に指定する列挙型の定義 定義 説明 anybody 自由参加 approval 承認制
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してギルドを更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildName string ✓ ~ 128文字 ギルド名 guildModelName string ✓ ~ 128文字 ギルドモデル名 displayName string ✓ ~ 64文字 表示名 attribute1 int ~ 2147483645 属性1 attribute2 int ~ 2147483645 属性2 attribute3 int ~ 2147483645 属性3 attribute4 int ~ 2147483645 属性4 attribute5 int ~ 2147483645 属性5 joinPolicy enum { “anybody”, “approval” } ✓ ~ 128文字 参加方針 customRoles List<RoleModel> ~ 10 items ギルドが個別に定義した各役職ごとの権限設定リスト guildMemberDefaultRole string ~ 128文字 ギルドメンバーが初期状態に持つカスタムロール
joinPolicy に指定する列挙型の定義 定義 説明 anybody 自由参加 approval 承認制
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーを除名
アクセストークンにはギルドユーザーに Assume したアクセストークンを指定してください
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 targetUserId string ✓ ~ 128文字 除名するユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してメンバーを除名
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 targetUserId string ✓ ~ 128文字 除名するユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーの役職を更新
アクセストークンにはギルドユーザーに Assume したアクセストークンを指定してください
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 targetUserId string ✓ ~ 128文字 更新するユーザーID roleName string ✓ ~ 128文字 ロールモデル名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してメンバーの役職を更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 targetUserId string ✓ ~ 128文字 更新するユーザーID roleName string ✓ ~ 128文字 ロールモデル名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーの役職を一括更新
アクセストークンにはギルドユーザーに Assume したアクセストークンを指定してください
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 members List<Member> ✓ 1 ~ 100 items 更新するメンバーリスト
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してメンバーの役職を一括更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 members List<Member> ✓ 1 ~ 100 items 更新するメンバーリスト
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してギルドを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最大参加可能人数を加算
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 value int 1 ~ 2147483646 最大人数の増加量
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最大参加可能人数を減算
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 value int 1 ~ 2147483646 最大人数の減少量
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最大参加可能人数を減算
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 value int 1 ~ 2147483646 最大人数の減少量
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 最大参加可能人数を検証
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 verifyType enum { “less”, “lessEqual”, “greater”, “greaterEqual”, “equal”, “notEqual” } ✓ ~ 128文字 検証の種類 value int 1 ~ 2147483646 最大人 multiplyValueSpecifyingQuantity bool ✓ false 数量指定した際に、検証に使用する値も乗算するか
verifyType に指定する列挙型の定義 定義 説明 less ランクが指定値未満であること lessEqual ランクが指定値以下であること greater ランクが指定値超過であること greaterEqual ランクが指定値以上であること equal ランクが指定値と一致すること notEqual ランクが指定値と一致しないこと
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最大参加可能人数を検証
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 verifyType enum { “less”, “lessEqual”, “greater”, “greaterEqual”, “equal”, “notEqual” } ✓ ~ 128文字 検証の種類 value int 1 ~ 2147483646 最大人 multiplyValueSpecifyingQuantity bool ✓ false 数量指定した際に、検証に使用する値も乗算するか
verifyType に指定する列挙型の定義 定義 説明 less ランクが指定値未満であること lessEqual ランクが指定値以下であること greater ランクが指定値超過であること greaterEqual ランクが指定値以上であること equal ランクが指定値と一致すること notEqual ランクが指定値と一致しないこと
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドメンバーにユーザーIDが含まれているかを検証
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 accessToken string ✓ ~ 128文字 ユーザーID verifyType enum { “include”, “notInclude” } ✓ ~ 128文字 検証の種類
verifyType に指定する列挙型の定義 定義 説明 include ギルドメンバーに指定したユーザーが含まれていること notInclude ギルドメンバーに指定したユーザーが含まれないこと
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドメンバーにユーザーIDが含まれているかを検証
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID verifyType enum { “include”, “notInclude” } ✓ ~ 128文字 検証の種類 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
verifyType に指定する列挙型の定義 定義 説明 include ギルドメンバーに指定したユーザーが含まれていること notInclude ギルドメンバーに指定したユーザーが含まれないこと
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最大参加可能人数を設定
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildName string ✓ ~ 128文字 ギルド名 guildModelName string ✓ ~ 128文字 ギルドモデル名 value int 1 ~ 2147483646 設定する最大人数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドユーザーとして振る舞うためのアクセストークンを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名
Result 型 説明 token string アクセストークン userId string ユーザーID expire long 有効期限 (UNIX時間 単位:ミリ秒)
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドユーザーとして振る舞うためのアクセストークンを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 型 説明 token string アクセストークン userId string ユーザーID expire long 有効期限 (UNIX時間 単位:ミリ秒)
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 入手アクションとして最大参加可能人数の加算を実行
Request 型 有効化条件 必須 デフォルト 値の制限 説明 stampSheet string ✓ ~ 5242880文字 トランザクション keyId string ✓ ~ 1024文字 暗号鍵GRN
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 消費アクションとして最大参加可能人数の減算を実行
Request 型 有効化条件 必須 デフォルト 値の制限 説明 stampTask string ✓ ~ 5242880文字 消費アクション keyId string ✓ ~ 1024文字 暗号鍵GRN
Result 型 説明 item Guild 更新したギルド newContextStack string 消費アクションの実行結果を記録したコンテキスト
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 入手アクションとして最大参加可能人数の設定を実行
Request 型 有効化条件 必須 デフォルト 値の制限 説明 stampSheet string ✓ ~ 5242880文字 トランザクション keyId string ✓ ~ 1024文字 暗号鍵GRN
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 検証アクションとして最大参加可能人数の検証を実行
Request 型 有効化条件 必須 デフォルト 値の制限 説明 stampTask string ✓ ~ 5242880文字 検証アクション keyId string ✓ ~ 1024文字 暗号鍵GRN
Result 型 説明 newContextStack string 検証アクションの実行結果を記録したコンテキスト
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 検証アクションとしてギルドメンバーにユーザーIDが含まれているかの検証を実行
Request 型 有効化条件 必須 デフォルト 値の制限 説明 stampTask string ✓ ~ 5242880文字 検証アクション keyId string ✓ ~ 1024文字 暗号鍵GRN
Result 型 説明 newContextStack string 検証アクションの実行結果を記録したコンテキスト
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加中のギルドの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ~ 128文字 ギルドモデル名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定して参加中のギルドの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ~ 128文字 ギルドモデル名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加中のギルドを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定して参加中のギルドを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルドから脱退
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してギルドから脱退
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ UUID ~ 36文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 最後にギルドマスターがアクティビティを行った日時を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して最後にギルドマスターがアクティビティを行った日時を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ;
ギルドマスターが一定期間ログインしていない場合、最も古参のギルドメンバーをギルドマスターに昇格
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ;
ギルド名を指定してギルドマスターが一定期間ログインしていない場合、最も古参のギルドメンバーをギルドマスターに昇格
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 現在有効なギルド設定のマスターデータをエクスポート
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 現在有効なギルド設定を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 現在有効なギルド設定を更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 settings string ✓ ~ 5242880文字 マスターデータ
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 現在有効なギルド設定を更新
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 checkoutSetting GitHubCheckoutSetting ✓ GitHubからマスターデータをチェックアウトしてくる設定
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 受信したメンバーリクエストの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して受信したメンバーリクエストの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 受信したメンバーリクエストを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して受信したメンバーリクエストを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーリクエストを承諾
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してメンバーリクエストを承諾
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーリクエストを拒否
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定してメンバーリクエストを拒否
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 fromUserId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 送信したメンバーリクエストの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定して送信したメンバーリクエストの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 送信したメンバーリクエストを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定して送信したメンバーリクエストを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーリクエストを送信
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してメンバーリクエストを送信
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 メンバーリクエストを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 accessToken string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ユーザーIDを指定してメンバーリクエストを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 userId string ✓ ~ 128文字 ユーザーID guildModelName string ✓ ~ 128文字 ギルドモデル名 targetGuildName string ✓ ~ 128文字 ギルド名 timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加を拒否するユーザーIDの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 型 説明 items List<IgnoreUser> 参加を拒否するユーザーIDリスト nextPageToken string リストの続きを取得するためのページトークン
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して参加を拒否するユーザーIDの一覧を取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン limit int ✓ 30 1 ~ 1000 データの取得件数
Result 型 説明 items List<IgnoreUser> 参加を拒否するユーザーIDリスト nextPageToken string リストの続きを取得するためのページトークン
実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加を拒否するユーザーIDを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して参加を拒否するユーザーIDを取得
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加を拒否するユーザーIDを追加
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して参加を拒否するユーザーIDを追加
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 参加を拒否するユーザーIDを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 accessToken string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ギルド名を指定して参加を拒否するユーザーIDを削除
Request 型 有効化条件 必須 デフォルト 値の制限 説明 namespaceName string ✓ ~ 128文字 ネームスペース名 guildModelName string ✓ ~ 128文字 ギルドモデル名 guildName string ✓ ~ 128文字 ギルド名 userId string ✓ ~ 128文字 ユーザーID timeOffsetToken string ~ 1024文字 タイムオフセットトークン
Result 実装例
Language:
Go
PHP
Java
C#
TypeScript
Python
GS2-Script
GS2-Script(Async) import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/guild"
import "github.com/openlyinc/pointy"
session := core . Gs2RestSession {
Credential : & core . BasicGs2Credential {
ClientId : "your client id" ,
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 ;