NAV
go python java php typescript csharp GS2-Script

GS2-Experience

GS2 SDK のリファレンス

GS2 SDK リファレンス

モデル

Namespace

ネームスペース

ネームスペースは一つのプロジェクトで同じサービスを異なる用途で複数利用できるようにするための仕組みです。
GS2 のサービスは基本的にネームスペースというレイヤーがあり、ネームスペースが異なれば同じサービスでもまったく別のデータ空間として取り扱われます。

そのため、各サービスの利用を開始するにあたってネームスペースを作成する必要があります。

説明
namespaceId string ネームスペースGRN
name string ネームスペース名
description string 説明文
experienceCapScriptId string ランクキャップを動的に決定するスクリプト
changeExperienceScript ScriptSetting 経験値変化したときに実行するスクリプト
changeRankScript ScriptSetting ランク変化したときに実行するスクリプト
changeRankCapScript ScriptSetting ランクキャップ変化したときに実行するスクリプト
overflowExperienceScript ScriptSetting 経験値あふれしたときに実行するスクリプト
logSetting LogSetting ログの出力設定
createdAt long 作成日時
updatedAt long 最終更新日時

ExperienceModelMaster

経験値モデルマスター

経験値モデルとは、ランクアップに必要な経験値の閾値や、デフォルトのランクキャップ・最大ランクキャップ毎に設定するエンティティです。

説明
experienceModelId string 経験値モデルマスターGRN
name string 経験値モデル名
description string 説明文
metadata string メタデータ
defaultExperience long 経験値の初期値
defaultRankCap long ランクキャップの初期値
maxRankCap long ランクキャップの最大値
rankThresholdName string ランクアップ閾値
createdAt long 作成日時
updatedAt long 最終更新日時

ExperienceModel

経験値モデル

経験値モデルとは、ランクアップに必要な経験値の閾値や、デフォルトのランクキャップ・最大ランクキャップ毎に設定するエンティティです。

説明
experienceModelId string 経験値モデルGRN
name string 経験値モデル名
metadata string メタデータ
defaultExperience long 経験値の初期値
defaultRankCap long ランクキャップの初期値
maxRankCap long ランクキャップの最大値
rankThreshold Threshold ランクアップ閾値

ThresholdMaster

ランクアップ閾値マスター

ランクアップ閾値は経験値からランク(レベル)を決定するために必要な数列です。 [10, 20] という値を設定した場合、経験値の値が 1~9 の間はランク1 10~19 の間はランク2 経験値の値が 20 でランク3 となりそれ以上経験値を入手することが出来なくなります。

説明
thresholdId string ランクアップ閾値マスターGRN
name string ランクアップ閾値名
description string 説明文
metadata string メタデータ
values long[] ランクアップ経験値閾値リスト
createdAt long 作成日時
updatedAt long 最終更新日時

Threshold

説明
metadata string メタデータ
values long[] ランクアップ経験値閾値リスト

CurrentExperienceMaster

現在有効なマスターデータ

GS2ではマスターデータの管理にJSON形式のファイルを使用します。
ファイルをアップロードすることで、実際にサーバーに設定を反映することができます。

JSONファイルを作成する方法として、マネージメントコンソール上でのマスターデータエディタを提供していますが
よりゲームの運営に相応しいツールを作成し、適切なフォーマットのJSONファイルを書き出すことでもサービスを利用可能です。

JSONファイルの形式についてはドキュメントを参照ください。

説明
namespaceId string ネームスペースGRN
settings string マスターデータ

Status

ステータス

ステータスとはプロパティID毎に存在するエンティティで、
現在の経験値やランクキャップの値を保持します。

プロパティID とはステータス固有のIDで、開発者が任意の値を設定できます。
GS2 では経験値を有する GS2-Inventory のアイテムセットGRN や GS2-Dictionary のエントリーGRN の後ろに
経験値モデルとなるサフィックスを追加した値をプロパティIDとすることを推奨しています。

説明
statusId string ステータスGRN
experienceName string 経験値モデルの名前
userId string ユーザーID
propertyId string プロパティID
experienceValue long 累計獲得経験値
rankValue long 現在のランク
rankCapValue long 現在のランクキャップ
nextRankUpExperienceValue long 次のランクアップの計経験値量
createdAt long 作成日時
updatedAt long 最終更新日時

GitHubCheckoutSetting

説明
apiKeyId string GitHub のAPIキーGRN
repositoryName string リポジトリ名
sourcePath string ソースコードのファイルパス
referenceType enum ['commit_hash', 'branch', 'tag'] コードの取得元
commitHash string コミットハッシュ
branchName string ブランチ名
tagName string タグ名

ScriptSetting

説明
triggerScriptId string スクリプトGRN
doneTriggerTargetType enum ['none', 'gs2_script', 'aws'] 完了通知の通知先
doneTriggerScriptId string スクリプトGRN
doneTriggerQueueNamespaceId string ネームスペースGRN

LogSetting

説明
loggingNamespaceId string ネームスペースGRN

メソッド

describeNamespaces

describeNamespaces

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeNamespacesRequest;
import io.gs2.experience.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2ExperienceRestClient client = new Gs2ExperienceRestClient(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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeNamespacesRequest;
using Gs2.Gs2Experience.Result.DescribeNamespacesResult;

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

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

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

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

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

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

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;

ネームスペースの一覧を取得



Request

必須 デフォルト 値の制限 説明
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items Namespace[] ネームスペースのリスト
nextPageToken string リストの続きを取得するためのページトークン

createNamespace

createNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &experience.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        ExperienceCapScriptId: nil,
        ChangeExperienceScript: nil,
        ChangeRankScript: nil,
        ChangeRankCapScript: nil,
        OverflowExperienceScript: nil,
        LogSetting: &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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)
            ->withExperienceCapScriptId(null)
            ->withChangeExperienceScript(null)
            ->withChangeRankScript(null)
            ->withChangeRankCapScript(null)
            ->withOverflowExperienceScript(null)
            ->withLogSetting((new \Gs2\Experience\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateNamespaceRequest;
import io.gs2.experience.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withExperienceCapScriptId(null)
            .withChangeExperienceScript(null)
            .withChangeRankScript(null)
            .withChangeRankCapScript(null)
            .withOverflowExperienceScript(null)
            .withLogSetting(new io.gs2.experience.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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateNamespaceRequest;
using Gs2.Gs2Experience.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Experience.Request.CreateNamespaceRequest()
        .WithName("namespace1")
        .WithDescription(null)
        .WithExperienceCapScriptId(null)
        .WithChangeExperienceScript(null)
        .WithChangeRankScript(null)
        .WithChangeRankCapScript(null)
        .WithOverflowExperienceScript(null)
        .WithLogSetting(new Gs2.Gs2Experience.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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createNamespace(
        new Gs2Experience.CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withExperienceCapScriptId(null)
            .withChangeExperienceScript(null)
            .withChangeRankScript(null)
            .withChangeRankCapScript(null)
            .withOverflowExperienceScript(null)
            .withLogSetting(new Gs2Experience.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 experience

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

try:
    result = client.create_namespace(
        experience.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_experience_cap_script_id(None)
            .with_change_experience_script(None)
            .with_change_rank_script(None)
            .with_change_rank_cap_script(None)
            .with_overflow_experience_script(None)
            .with_log_setting(
                experience.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('experience')

api_result = client.create_namespace({
    name='namespace1',
    description=nil,
    experienceCapScriptId=nil,
    changeExperienceScript=nil,
    changeRankScript=nil,
    changeRankCapScript=nil,
    overflowExperienceScript=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;

ネームスペースを新規作成



Request

必須 デフォルト 値の制限 説明
name string ~ 32文字 ネームスペース名
description string ~ 1024文字 説明文
experienceCapScriptId string ~ 1024文字 ランクキャップを動的に決定するスクリプト
changeExperienceScript ScriptSetting 経験値変化したときに実行するスクリプト
changeRankScript ScriptSetting ランク変化したときに実行するスクリプト
changeRankCapScript ScriptSetting ランクキャップ変化したときに実行するスクリプト
overflowExperienceScript ScriptSetting 経験値あふれしたときに実行するスクリプト
logSetting LogSetting ログの出力設定

Result

説明
item Namespace 作成したネームスペース

getNamespaceStatus

getNamespaceStatus

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetNamespaceStatusRequest;
import io.gs2.experience.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2ExperienceRestClient client = new Gs2ExperienceRestClient(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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetNamespaceStatusRequest;
using Gs2.Gs2Experience.Result.GetNamespaceStatusResult;

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

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

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

try {
    const result = await client.getNamespaceStatus(
        new Gs2Experience.GetNamespaceStatusRequest()
            .withNamespaceName("namespace1")
    );
    const status = result.getStatus();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_namespace_status(
        experience.GetNamespaceStatusRequest()
            .with_namespace_name(self.hash1)
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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;

ネームスペースの状態を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
status string

getNamespace

getNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetNamespaceRequest;
import io.gs2.experience.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2ExperienceRestClient client = new Gs2ExperienceRestClient(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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetNamespaceRequest;
using Gs2.Gs2Experience.Result.GetNamespaceResult;

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

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

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

try {
    const result = await client.getNamespace(
        new Gs2Experience.GetNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_namespace(
        experience.GetNamespaceRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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;

ネームスペースを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
item Namespace ネームスペース

updateNamespace

updateNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &experience.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        ExperienceCapScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001"),
        ChangeExperienceScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"),
        },
        ChangeRankScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"),
        },
        ChangeRankCapScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"),
        },
        OverflowExperienceScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"),
        },
        LogSetting: &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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")
            ->withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1001")
            ->withChangeExperienceScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1002")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1003"))
            ->withChangeRankScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1004")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1005"))
            ->withChangeRankCapScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1006")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1007"))
            ->withOverflowExperienceScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1008")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1008"))
            ->withLogSetting((new \Gs2\Experience\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateNamespaceRequest;
import io.gs2.experience.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
            .withChangeExperienceScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
            .withChangeRankScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
            .withChangeRankCapScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
            .withOverflowExperienceScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
            .withLogSetting(new io.gs2.experience.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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateNamespaceRequest;
using Gs2.Gs2Experience.Result.UpdateNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Experience.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace1")
        .WithDescription("description1")
        .WithExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
        .WithChangeExperienceScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
        .WithChangeRankScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
        .WithChangeRankCapScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
        .WithOverflowExperienceScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
        .WithLogSetting(new Gs2.Gs2Experience.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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateNamespace(
        new Gs2Experience.UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
            .withChangeExperienceScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
            .withChangeRankScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
            .withChangeRankCapScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
            .withOverflowExperienceScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
            .withLogSetting(new Gs2Experience.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 experience

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

try:
    result = client.update_namespace(
        experience.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_experience_cap_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001')
            .with_change_experience_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003'))
            .with_change_rank_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005'))
            .with_change_rank_cap_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007'))
            .with_overflow_experience_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008'))
            .with_log_setting(
                experience.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('experience')

api_result = client.update_namespace({
    namespaceName='namespace1',
    description='description1',
    experienceCapScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001',
    changeExperienceScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003',
    },
    changeRankScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005',
    },
    changeRankCapScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007',
    },
    overflowExperienceScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008',
    },
    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;

ネームスペースを更新



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
description string ~ 1024文字 説明文
experienceCapScriptId string ~ 1024文字 ランクキャップを動的に決定するスクリプト
changeExperienceScript ScriptSetting 経験値変化したときに実行するスクリプト
changeRankScript ScriptSetting ランク変化したときに実行するスクリプト
changeRankCapScript ScriptSetting ランクキャップ変化したときに実行するスクリプト
overflowExperienceScript ScriptSetting 経験値あふれしたときに実行するスクリプト
logSetting LogSetting ログの出力設定

Result

説明
item Namespace 更新したネームスペース

deleteNamespace

deleteNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteNamespaceRequest;
import io.gs2.experience.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2ExperienceRestClient client = new Gs2ExperienceRestClient(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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteNamespaceRequest;
using Gs2.Gs2Experience.Result.DeleteNamespaceResult;

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

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

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

try {
    const result = await client.deleteNamespace(
        new Gs2Experience.DeleteNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.delete_namespace(
        experience.DeleteNamespaceRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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;

ネームスペースを削除



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
item Namespace 削除したネームスペース

describeExperienceModelMasters

describeExperienceModelMasters

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeExperienceModelMasters(
    &experience.DescribeExperienceModelMastersRequest {
        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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeExperienceModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeExperienceModelMasters(
        (new DescribeExperienceModelMastersRequest())
            ->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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeExperienceModelMastersRequest;
import io.gs2.experience.result.DescribeExperienceModelMastersResult;

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

try {
    DescribeExperienceModelMastersResult result = client.describeExperienceModelMasters(
        new DescribeExperienceModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ExperienceModelMaster> 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeExperienceModelMastersRequest;
using Gs2.Gs2Experience.Result.DescribeExperienceModelMastersResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeExperienceModelMastersResult> asyncResult = null;
yield return client.DescribeExperienceModelMasters(
    new Gs2.Gs2Experience.Request.DescribeExperienceModelMastersRequest()
        .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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeExperienceModelMasters(
        new Gs2Experience.DescribeExperienceModelMastersRequest()
            .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 experience

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

try:
    result = client.describe_experience_model_masters(
        experience.DescribeExperienceModelMastersRequest()
            .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('experience')

api_result = client.describe_experience_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;

経験値モデルマスターの一覧を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items ExperienceModelMaster[] 経験値モデルマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createExperienceModelMaster

createExperienceModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateExperienceModelMaster(
    &experience.CreateExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("experience-model-0001"),
        Description: nil,
        Metadata: nil,
        DefaultExperience: nil,
        DefaultRankCap: pointy.Int64(50),
        MaxRankCap: pointy.Int64(50),
        RankThresholdName: pointy.String("$threshold1.name"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\CreateExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createExperienceModelMaster(
        (new CreateExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("experience-model-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withDefaultExperience(null)
            ->withDefaultRankCap(50)
            ->withMaxRankCap(50)
            ->withRankThresholdName(self::$threshold1.name)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateExperienceModelMasterRequest;
import io.gs2.experience.result.CreateExperienceModelMasterResult;

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

try {
    CreateExperienceModelMasterResult result = client.createExperienceModelMaster(
        new CreateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("experience-model-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDefaultExperience(null)
            .withDefaultRankCap(50L)
            .withMaxRankCap(50L)
            .withRankThresholdName("$threshold1.name")
    );
    ExperienceModelMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.CreateExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateExperienceModelMasterResult> asyncResult = null;
yield return client.CreateExperienceModelMaster(
    new Gs2.Gs2Experience.Request.CreateExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("experience-model-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithDefaultExperience(null)
        .WithDefaultRankCap(50L)
        .WithMaxRankCap(50L)
        .WithRankThresholdName("$threshold1.name"),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createExperienceModelMaster(
        new Gs2Experience.CreateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("experience-model-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDefaultExperience(null)
            .withDefaultRankCap(50)
            .withMaxRankCap(50)
            .withRankThresholdName("$threshold1.name")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_experience_model_master(
        experience.CreateExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('experience-model-0001')
            .with_description(None)
            .with_metadata(None)
            .with_default_experience(None)
            .with_default_rank_cap(50)
            .with_max_rank_cap(50)
            .with_rank_threshold_name(self.threshold1.name)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.create_experience_model_master({
    namespaceName='namespace1',
    name='experience-model-0001',
    description=nil,
    metadata=nil,
    defaultExperience=nil,
    defaultRankCap=50,
    maxRankCap=50,
    rankThresholdName='$threshold1.name',
})

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

result = api_result.result
item = result.item;

経験値モデルマスターを新規作成



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
name string ~ 128文字 経験値モデル名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
defaultExperience long 0 ~ 9223372036854775806 経験値の初期値
defaultRankCap long ~ 9223372036854775806 ランクキャップの初期値
maxRankCap long ~ 9223372036854775806 ランクキャップの最大値
rankThresholdName string ~ 128文字 ランクアップ閾値

Result

説明
item ExperienceModelMaster 作成した経験値モデルマスター

getExperienceModelMaster

getExperienceModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetExperienceModelMaster(
    &experience.GetExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getExperienceModelMaster(
        (new GetExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetExperienceModelMasterRequest;
import io.gs2.experience.result.GetExperienceModelMasterResult;

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

try {
    GetExperienceModelMasterResult result = client.getExperienceModelMaster(
        new GetExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    ExperienceModelMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.GetExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetExperienceModelMasterResult> asyncResult = null;
yield return client.GetExperienceModelMaster(
    new Gs2.Gs2Experience.Request.GetExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getExperienceModelMaster(
        new Gs2Experience.GetExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_experience_model_master(
        experience.GetExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('experience-model-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-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;

経験値モデルマスターを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名

Result

説明
item ExperienceModelMaster 経験値モデルマスター

updateExperienceModelMaster

updateExperienceModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateExperienceModelMaster(
    &experience.UpdateExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-model-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("{\"hoge\": \"fuga\"}"),
        DefaultExperience: pointy.Int64(100),
        DefaultRankCap: pointy.Int64(60),
        MaxRankCap: pointy.Int64(80),
        RankThresholdName: pointy.String("$threshold2.name"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateExperienceModelMaster(
        (new UpdateExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-model-0001")
            ->withDescription("description1")
            ->withMetadata("{\"hoge\": \"fuga\"}")
            ->withDefaultExperience(100)
            ->withDefaultRankCap(60)
            ->withMaxRankCap(80)
            ->withRankThresholdName(self::$threshold2.name)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateExperienceModelMasterRequest;
import io.gs2.experience.result.UpdateExperienceModelMasterResult;

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

try {
    UpdateExperienceModelMasterResult result = client.updateExperienceModelMaster(
        new UpdateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
            .withDescription("description1")
            .withMetadata("{\"hoge\": \"fuga\"}")
            .withDefaultExperience(100L)
            .withDefaultRankCap(60L)
            .withMaxRankCap(80L)
            .withRankThresholdName("$threshold2.name")
    );
    ExperienceModelMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.UpdateExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateExperienceModelMasterResult> asyncResult = null;
yield return client.UpdateExperienceModelMaster(
    new Gs2.Gs2Experience.Request.UpdateExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-model-0001")
        .WithDescription("description1")
        .WithMetadata("{\"hoge\": \"fuga\"}")
        .WithDefaultExperience(100L)
        .WithDefaultRankCap(60L)
        .WithMaxRankCap(80L)
        .WithRankThresholdName("$threshold2.name"),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateExperienceModelMaster(
        new Gs2Experience.UpdateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
            .withDescription("description1")
            .withMetadata("{\"hoge\": \"fuga\"}")
            .withDefaultExperience(100)
            .withDefaultRankCap(60)
            .withMaxRankCap(80)
            .withRankThresholdName("$threshold2.name")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_experience_model_master(
        experience.UpdateExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('experience-model-0001')
            .with_description('description1')
            .with_metadata('{"hoge": "fuga"}')
            .with_default_experience(100)
            .with_default_rank_cap(60)
            .with_max_rank_cap(80)
            .with_rank_threshold_name(self.threshold2.name)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-model-0001',
    description='description1',
    metadata='{"hoge": "fuga"}',
    defaultExperience=100,
    defaultRankCap=60,
    maxRankCap=80,
    rankThresholdName='$threshold2.name',
})

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

result = api_result.result
item = result.item;

経験値モデルマスターを更新



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
defaultExperience long 0 ~ 9223372036854775806 経験値の初期値
defaultRankCap long ~ 9223372036854775806 ランクキャップの初期値
maxRankCap long ~ 9223372036854775806 ランクキャップの最大値
rankThresholdName string ~ 128文字 ランクアップ閾値

Result

説明
item ExperienceModelMaster 更新した経験値モデルマスター

deleteExperienceModelMaster

deleteExperienceModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteExperienceModelMaster(
    &experience.DeleteExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteExperienceModelMaster(
        (new DeleteExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteExperienceModelMasterRequest;
import io.gs2.experience.result.DeleteExperienceModelMasterResult;

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

try {
    DeleteExperienceModelMasterResult result = client.deleteExperienceModelMaster(
        new DeleteExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    ExperienceModelMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.DeleteExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteExperienceModelMasterResult> asyncResult = null;
yield return client.DeleteExperienceModelMaster(
    new Gs2.Gs2Experience.Request.DeleteExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteExperienceModelMaster(
        new Gs2Experience.DeleteExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.delete_experience_model_master(
        experience.DeleteExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('experience-model-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.delete_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-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;

経験値モデルマスターを削除



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名

Result

説明
item ExperienceModelMaster 削除した経験値モデルマスター

describeExperienceModels

describeExperienceModels

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeExperienceModels(
    &experience.DescribeExperienceModelsRequest {
        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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeExperienceModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeExperienceModels(
        (new DescribeExperienceModelsRequest())
            ->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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeExperienceModelsRequest;
import io.gs2.experience.result.DescribeExperienceModelsResult;

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

try {
    DescribeExperienceModelsResult result = client.describeExperienceModels(
        new DescribeExperienceModelsRequest()
            .withNamespaceName("namespace2")
    );
    List<ExperienceModel> 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeExperienceModelsRequest;
using Gs2.Gs2Experience.Result.DescribeExperienceModelsResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeExperienceModelsResult> asyncResult = null;
yield return client.DescribeExperienceModels(
    new Gs2.Gs2Experience.Request.DescribeExperienceModelsRequest()
        .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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeExperienceModels(
        new Gs2Experience.DescribeExperienceModelsRequest()
            .withNamespaceName("namespace2")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_experience_models(
        experience.DescribeExperienceModelsRequest()
            .with_namespace_name(self.hash2)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.describe_experience_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;

経験値モデルの一覧を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
items ExperienceModel[] 経験値モデルリスト

getExperienceModel

getExperienceModel

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetExperienceModel(
    &experience.GetExperienceModelRequest {
        NamespaceName: pointy.String("namespace2"),
        ExperienceName: pointy.String("experience-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetExperienceModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getExperienceModel(
        (new GetExperienceModelRequest())
            ->withNamespaceName(self::namespace2)
            ->withExperienceName("experience-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetExperienceModelRequest;
import io.gs2.experience.result.GetExperienceModelResult;

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

try {
    GetExperienceModelResult result = client.getExperienceModel(
        new GetExperienceModelRequest()
            .withNamespaceName("namespace2")
            .withExperienceName("experience-0001")
    );
    ExperienceModel 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetExperienceModelRequest;
using Gs2.Gs2Experience.Result.GetExperienceModelResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetExperienceModelResult> asyncResult = null;
yield return client.GetExperienceModel(
    new Gs2.Gs2Experience.Request.GetExperienceModelRequest()
        .WithNamespaceName("namespace2")
        .WithExperienceName("experience-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getExperienceModel(
        new Gs2Experience.GetExperienceModelRequest()
            .withNamespaceName("namespace2")
            .withExperienceName("experience-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_experience_model(
        experience.GetExperienceModelRequest()
            .with_namespace_name(self.hash2)
            .with_experience_name('experience-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_experience_model({
    namespaceName='namespace2',
    experienceName='experience-0001',
})

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

result = api_result.result
item = result.item;

経験値モデルを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名

Result

説明
item ExperienceModel 経験値モデル

describeThresholdMasters

describeThresholdMasters

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeThresholdMasters(
    &experience.DescribeThresholdMastersRequest {
        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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeThresholdMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeThresholdMasters(
        (new DescribeThresholdMastersRequest())
            ->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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeThresholdMastersRequest;
import io.gs2.experience.result.DescribeThresholdMastersResult;

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

try {
    DescribeThresholdMastersResult result = client.describeThresholdMasters(
        new DescribeThresholdMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ThresholdMaster> 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeThresholdMastersRequest;
using Gs2.Gs2Experience.Result.DescribeThresholdMastersResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeThresholdMastersResult> asyncResult = null;
yield return client.DescribeThresholdMasters(
    new Gs2.Gs2Experience.Request.DescribeThresholdMastersRequest()
        .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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeThresholdMasters(
        new Gs2Experience.DescribeThresholdMastersRequest()
            .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 experience

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

try:
    result = client.describe_threshold_masters(
        experience.DescribeThresholdMastersRequest()
            .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('experience')

api_result = client.describe_threshold_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;

ランクアップ閾値マスターの一覧を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items ThresholdMaster[] ランクアップ閾値マスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createThresholdMaster

createThresholdMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateThresholdMaster(
    &experience.CreateThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("threshold-0001"),
        Description: nil,
        Metadata: nil,
        Values: []int64{
            100,
        200,
        300,
        },
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\CreateThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createThresholdMaster(
        (new CreateThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("threshold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withValues([    100,
            200,
            300,
            ])
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateThresholdMasterRequest;
import io.gs2.experience.result.CreateThresholdMasterResult;

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

try {
    CreateThresholdMasterResult result = client.createThresholdMaster(
        new CreateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withName("threshold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withValues(Arrays.asList(
                100L,
            200L,
            300L
            ))
    );
    ThresholdMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateThresholdMasterRequest;
using Gs2.Gs2Experience.Result.CreateThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateThresholdMasterResult> asyncResult = null;
yield return client.CreateThresholdMaster(
    new Gs2.Gs2Experience.Request.CreateThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("threshold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithValues(new long[] {
            100L,
        200L,
        300L
        }),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createThresholdMaster(
        new Gs2Experience.CreateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withName("threshold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withValues([
                100,
            200,
            300
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_threshold_master(
        experience.CreateThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('threshold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_values([    100,
            200,
            300,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.create_threshold_master({
    namespaceName='namespace1',
    name='threshold-0001',
    description=nil,
    metadata=nil,
    values={
        100,
    200,
    300
    },
})

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

result = api_result.result
item = result.item;

ランクアップ閾値マスターを新規作成



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
name string ~ 128文字 ランクアップ閾値名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
values long[] ランクアップ経験値閾値リスト

Result

説明
item ThresholdMaster 作成したランクアップ閾値マスター

getThresholdMaster

getThresholdMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetThresholdMaster(
    &experience.GetThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getThresholdMaster(
        (new GetThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetThresholdMasterRequest;
import io.gs2.experience.result.GetThresholdMasterResult;

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

try {
    GetThresholdMasterResult result = client.getThresholdMaster(
        new GetThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    ThresholdMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetThresholdMasterRequest;
using Gs2.Gs2Experience.Result.GetThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetThresholdMasterResult> asyncResult = null;
yield return client.GetThresholdMaster(
    new Gs2.Gs2Experience.Request.GetThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getThresholdMaster(
        new Gs2Experience.GetThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_threshold_master(
        experience.GetThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_threshold_name('threshold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_threshold_master({
    namespaceName='namespace1',
    thresholdName='threshold-0001',
})

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

result = api_result.result
item = result.item;

ランクアップ閾値マスターを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
thresholdName string ~ 128文字 ランクアップ閾値名

Result

説明
item ThresholdMaster ランクアップ閾値マスター

updateThresholdMaster

updateThresholdMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateThresholdMaster(
    &experience.UpdateThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("{\"fuga\": \"piyo\"}"),
        Values: []int64{
            1100,
        1200,
        1300,
        },
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateThresholdMaster(
        (new UpdateThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-0001")
            ->withDescription("description1")
            ->withMetadata("{\"fuga\": \"piyo\"}")
            ->withValues([    1100,
            1200,
            1300,
            ])
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateThresholdMasterRequest;
import io.gs2.experience.result.UpdateThresholdMasterResult;

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

try {
    UpdateThresholdMasterResult result = client.updateThresholdMaster(
        new UpdateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
            .withDescription("description1")
            .withMetadata("{\"fuga\": \"piyo\"}")
            .withValues(Arrays.asList(
                1100L,
            1200L,
            1300L
            ))
    );
    ThresholdMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateThresholdMasterRequest;
using Gs2.Gs2Experience.Result.UpdateThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateThresholdMasterResult> asyncResult = null;
yield return client.UpdateThresholdMaster(
    new Gs2.Gs2Experience.Request.UpdateThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-0001")
        .WithDescription("description1")
        .WithMetadata("{\"fuga\": \"piyo\"}")
        .WithValues(new long[] {
            1100L,
        1200L,
        1300L
        }),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateThresholdMaster(
        new Gs2Experience.UpdateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
            .withDescription("description1")
            .withMetadata("{\"fuga\": \"piyo\"}")
            .withValues([
                1100,
            1200,
            1300
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_threshold_master(
        experience.UpdateThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_threshold_name('threshold-0001')
            .with_description('description1')
            .with_metadata('{"fuga": "piyo"}')
            .with_values([    1100,
            1200,
            1300,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_threshold_master({
    namespaceName='namespace1',
    thresholdName='threshold-0001',
    description='description1',
    metadata='{"fuga": "piyo"}',
    values={
        1100,
    1200,
    1300
    },
})

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

result = api_result.result
item = result.item;

ランクアップ閾値マスターを更新



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
thresholdName string ~ 128文字 ランクアップ閾値名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
values long[] ランクアップ経験値閾値リスト

Result

説明
item ThresholdMaster 更新したランクアップ閾値マスター

deleteThresholdMaster

deleteThresholdMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteThresholdMaster(
    &experience.DeleteThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteThresholdMaster(
        (new DeleteThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteThresholdMasterRequest;
import io.gs2.experience.result.DeleteThresholdMasterResult;

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

try {
    DeleteThresholdMasterResult result = client.deleteThresholdMaster(
        new DeleteThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    ThresholdMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteThresholdMasterRequest;
using Gs2.Gs2Experience.Result.DeleteThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteThresholdMasterResult> asyncResult = null;
yield return client.DeleteThresholdMaster(
    new Gs2.Gs2Experience.Request.DeleteThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteThresholdMaster(
        new Gs2Experience.DeleteThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.delete_threshold_master(
        experience.DeleteThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_threshold_name('threshold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.delete_threshold_master({
    namespaceName='namespace1',
    thresholdName='threshold-0001',
})

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

result = api_result.result
item = result.item;

ランクアップ閾値マスターを削除



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
thresholdName string ~ 128文字 ランクアップ閾値名

Result

説明
item ThresholdMaster 削除したランクアップ閾値マスター

exportMaster

exportMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &experience.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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.ExportMasterRequest;
import io.gs2.experience.result.ExportMasterResult;

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

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentExperienceMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.ExportMasterRequest;
using Gs2.Gs2Experience.Result.ExportMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Experience.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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.exportMaster(
        new Gs2Experience.ExportMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.export_master(
        experience.ExportMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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;

現在有効な経験値設定のマスターデータをエクスポート



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
item CurrentExperienceMaster 現在有効な経験値設定

getCurrentExperienceMaster

getCurrentExperienceMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetCurrentExperienceMaster(
    &experience.GetCurrentExperienceMasterRequest {
        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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetCurrentExperienceMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentExperienceMaster(
        (new GetCurrentExperienceMasterRequest())
            ->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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetCurrentExperienceMasterRequest;
import io.gs2.experience.result.GetCurrentExperienceMasterResult;

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

try {
    GetCurrentExperienceMasterResult result = client.getCurrentExperienceMaster(
        new GetCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentExperienceMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetCurrentExperienceMasterRequest;
using Gs2.Gs2Experience.Result.GetCurrentExperienceMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetCurrentExperienceMasterResult> asyncResult = null;
yield return client.GetCurrentExperienceMaster(
    new Gs2.Gs2Experience.Request.GetCurrentExperienceMasterRequest()
        .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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getCurrentExperienceMaster(
        new Gs2Experience.GetCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_current_experience_master(
        experience.GetCurrentExperienceMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_current_experience_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;

現在有効な経験値設定を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
item CurrentExperienceMaster 現在有効な経験値設定

updateCurrentExperienceMaster

updateCurrentExperienceMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentExperienceMaster(
    &experience.UpdateCurrentExperienceMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateCurrentExperienceMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentExperienceMaster(
        (new UpdateCurrentExperienceMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateCurrentExperienceMasterRequest;
import io.gs2.experience.result.UpdateCurrentExperienceMasterResult;

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

try {
    UpdateCurrentExperienceMasterResult result = client.updateCurrentExperienceMaster(
        new UpdateCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    CurrentExperienceMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterRequest;
using Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterResult> asyncResult = null;
yield return client.UpdateCurrentExperienceMaster(
    new Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterRequest()
        .WithNamespaceName("namespace1")
        .WithSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}"),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateCurrentExperienceMaster(
        new Gs2Experience.UpdateCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_current_experience_master(
        experience.UpdateCurrentExperienceMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{\n  "version": "2019-01-11",\n  "experienceModels": [\n    {\n      "name": "character_ssr",\n      "metadata": "SSR",\n      "defaultExperience": 0,\n      "defaultRankCap": 50,\n      "maxRankCap": 80,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_sr",\n      "metadata": "SR",\n      "defaultExperience": 0,\n      "defaultRankCap": 40,\n      "maxRankCap": 70,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_r",\n      "metadata": "R",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 60,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 50,\n      "rankThreshold": {\n        "metadata": "EQUIPMENT",\n        "values": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      "name": "skill",\n      "metadata": "SKILL",\n      "defaultExperience": 0,\n      "defaultRankCap": 10,\n      "maxRankCap": 20,\n      "rankThreshold": {\n        "metadata": "SKILL",\n        "values": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_current_experience_master({
    namespaceName='namespace1',
    settings='{\n  "version": "2019-01-11",\n  "experienceModels": [\n    {\n      "name": "character_ssr",\n      "metadata": "SSR",\n      "defaultExperience": 0,\n      "defaultRankCap": 50,\n      "maxRankCap": 80,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_sr",\n      "metadata": "SR",\n      "defaultExperience": 0,\n      "defaultRankCap": 40,\n      "maxRankCap": 70,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_r",\n      "metadata": "R",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 60,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 50,\n      "rankThreshold": {\n        "metadata": "EQUIPMENT",\n        "values": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      "name": "skill",\n      "metadata": "SKILL",\n      "defaultExperience": 0,\n      "defaultRankCap": 10,\n      "maxRankCap": 20,\n      "rankThreshold": {\n        "metadata": "SKILL",\n        "values": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}',
})

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

result = api_result.result
item = result.item;

現在有効な経験値設定を更新



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
settings string ~ 5242880文字 マスターデータ

Result

説明
item CurrentExperienceMaster 更新した現在有効な経験値設定

updateCurrentExperienceMasterFromGitHub

updateCurrentExperienceMasterFromGitHub

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentExperienceMasterFromGitHub(
    &experience.UpdateCurrentExperienceMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace1"),
        CheckoutSetting: {'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': '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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateCurrentExperienceMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentExperienceMasterFromGitHub(
        (new UpdateCurrentExperienceMasterFromGitHubRequest())
            ->withNamespaceName(self::namespace1)
            ->withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': '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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateCurrentExperienceMasterFromGitHubRequest;
import io.gs2.experience.result.UpdateCurrentExperienceMasterFromGitHubResult;

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

try {
    UpdateCurrentExperienceMasterFromGitHubResult result = client.updateCurrentExperienceMasterFromGitHub(
        new UpdateCurrentExperienceMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    CurrentExperienceMaster 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterFromGitHubRequest;
using Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterFromGitHubResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentExperienceMasterFromGitHub(
    new Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterFromGitHubRequest()
        .WithNamespaceName("namespace1")
        .WithCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': '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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateCurrentExperienceMasterFromGitHub(
        new Gs2Experience.UpdateCurrentExperienceMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_current_experience_master_from_git_hub(
        experience.UpdateCurrentExperienceMasterFromGitHubRequest()
            .with_namespace_name(self.hash1)
            .with_checkout_setting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_current_experience_master_from_git_hub({
    namespaceName='namespace1',
    checkoutSetting={'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'},
})

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

result = api_result.result
item = result.item;

現在有効な経験値設定を更新



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
checkoutSetting GitHubCheckoutSetting GitHubからマスターデータをチェックアウトしてくる設定

Result

説明
item CurrentExperienceMaster 更新した現在有効な経験値設定

describeStatuses

describeStatuses

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeStatuses(
    &experience.DescribeStatusesRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("character_ssr"),
        AccessToken: pointy.String("$access_token_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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeStatusesRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeStatuses(
        (new DescribeStatusesRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("character_ssr")
            ->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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeStatusesRequest;
import io.gs2.experience.result.DescribeStatusesResult;

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

try {
    DescribeStatusesResult result = client.describeStatuses(
        new DescribeStatusesRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("character_ssr")
            .withAccessToken("$access_token_0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Status> 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeStatusesRequest;
using Gs2.Gs2Experience.Result.DescribeStatusesResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeStatusesResult> asyncResult = null;
yield return client.DescribeStatuses(
    new Gs2.Gs2Experience.Request.DescribeStatusesRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("character_ssr")
        .WithAccessToken("$access_token_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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeStatuses(
        new Gs2Experience.DescribeStatusesRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("character_ssr")
            .withAccessToken("$access_token_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 experience

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

try:
    result = client.describe_statuses(
        experience.DescribeStatusesRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('character_ssr')
            .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('experience')

api_result = client.describe_statuses({
    namespaceName='namespace1',
    experienceName='character_ssr',
    accessToken='$access_token_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;

ステータスの一覧を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名
accessToken string ~ 128文字 ユーザーID
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items Status[] ステータスのリスト
nextPageToken string リストの続きを取得するためのページトークン

describeStatusesByUserId

describeStatusesByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeStatusesByUserId(
    &experience.DescribeStatusesByUserIdRequest {
        NamespaceName: nil,
        ExperienceName: pointy.String("character_ssr"),
        UserId: pointy.String("user-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeStatusesByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeStatusesByUserId(
        (new DescribeStatusesByUserIdRequest())
            ->withNamespaceName(null)
            ->withExperienceName("character_ssr")
            ->withUserId("user-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeStatusesByUserIdRequest;
import io.gs2.experience.result.DescribeStatusesByUserIdResult;

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

try {
    DescribeStatusesByUserIdResult result = client.describeStatusesByUserId(
        new DescribeStatusesByUserIdRequest()
            .withNamespaceName(null)
            .withExperienceName("character_ssr")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Status> 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeStatusesByUserIdRequest;
using Gs2.Gs2Experience.Result.DescribeStatusesByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeStatusesByUserIdResult> asyncResult = null;
yield return client.DescribeStatusesByUserId(
    new Gs2.Gs2Experience.Request.DescribeStatusesByUserIdRequest()
        .WithNamespaceName(null)
        .WithExperienceName("character_ssr")
        .WithUserId("user-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeStatusesByUserId(
        new Gs2Experience.DescribeStatusesByUserIdRequest()
            .withNamespaceName(null)
            .withExperienceName("character_ssr")
            .withUserId("user-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 experience

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

try:
    result = client.describe_statuses_by_user_id(
        experience.DescribeStatusesByUserIdRequest()
            .with_namespace_name(None)
            .with_experience_name('character_ssr')
            .with_user_id('user-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('experience')

api_result = client.describe_statuses_by_user_id({
    namespaceName=nil,
    experienceName='character_ssr',
    userId='user-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;

ユーザーIDを指定してステータスの一覧を取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
experienceName string ~ 128文字 経験値モデル名
userId string ~ 128文字 ユーザーID
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items Status[] ステータスのリスト
nextPageToken string リストの続きを取得するためのページトークン

getStatus

getStatus

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatus(
    &experience.GetStatusRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatus(
        (new GetStatusRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusRequest;
import io.gs2.experience.result.GetStatusResult;

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

try {
    GetStatusResult result = client.getStatus(
        new GetStatusRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusRequest;
using Gs2.Gs2Experience.Result.GetStatusResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusResult> asyncResult = null;
yield return client.GetStatus(
    new Gs2.Gs2Experience.Request.GetStatusRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("$access_token_0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatus(
        new Gs2Experience.GetStatusRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status(
        experience.GetStatusRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

ステータスを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID

Result

説明
item Status ステータス

getStatusByUserId

getStatusByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusByUserId(
    &experience.GetStatusByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusByUserId(
        (new GetStatusByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusByUserIdRequest;
import io.gs2.experience.result.GetStatusByUserIdResult;

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

try {
    GetStatusByUserIdResult result = client.getStatusByUserId(
        new GetStatusByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusByUserIdRequest;
using Gs2.Gs2Experience.Result.GetStatusByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusByUserIdResult> asyncResult = null;
yield return client.GetStatusByUserId(
    new Gs2.Gs2Experience.Request.GetStatusByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusByUserId(
        new Gs2Experience.GetStatusByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_by_user_id(
        experience.GetStatusByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

ユーザーIDを指定してステータスを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID

Result

説明
item Status ステータス

getStatusWithSignature

getStatusWithSignature

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusWithSignature(
    &experience.GetStatusWithSignatureRequest {
        NamespaceName: nil,
        AccessToken: pointy.String("$access_token_0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusWithSignatureRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusWithSignature(
        (new GetStatusWithSignatureRequest())
            ->withNamespaceName(null)
            ->withAccessToken(self::$accessToken0001)
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusWithSignatureRequest;
import io.gs2.experience.result.GetStatusWithSignatureResult;

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

try {
    GetStatusWithSignatureResult result = client.getStatusWithSignature(
        new GetStatusWithSignatureRequest()
            .withNamespaceName(null)
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusWithSignatureRequest;
using Gs2.Gs2Experience.Result.GetStatusWithSignatureResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusWithSignatureResult> asyncResult = null;
yield return client.GetStatusWithSignature(
    new Gs2.Gs2Experience.Request.GetStatusWithSignatureRequest()
        .WithNamespaceName(null)
        .WithAccessToken("$access_token_0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusWithSignature(
        new Gs2Experience.GetStatusWithSignatureRequest()
            .withNamespaceName(null)
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_with_signature(
        experience.GetStatusWithSignatureRequest()
            .with_namespace_name(None)
            .with_access_token(self.access_token_0001)
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_with_signature({
    namespaceName=nil,
    accessToken='$access_token_0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

署名情報と共にステータスを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
keyId string ~ 1024文字 暗号鍵GRN

Result

説明
item Status ステータス
body string 検証対象のオブジェクト
signature string 署名

getStatusWithSignatureByUserId

getStatusWithSignatureByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusWithSignatureByUserId(
    &experience.GetStatusWithSignatureByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusWithSignatureByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusWithSignatureByUserId(
        (new GetStatusWithSignatureByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusWithSignatureByUserIdRequest;
import io.gs2.experience.result.GetStatusWithSignatureByUserIdResult;

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

try {
    GetStatusWithSignatureByUserIdResult result = client.getStatusWithSignatureByUserId(
        new GetStatusWithSignatureByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusWithSignatureByUserIdRequest;
using Gs2.Gs2Experience.Result.GetStatusWithSignatureByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetStatusWithSignatureByUserId(
    new Gs2.Gs2Experience.Request.GetStatusWithSignatureByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusWithSignatureByUserId(
        new Gs2Experience.GetStatusWithSignatureByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_with_signature_by_user_id(
        experience.GetStatusWithSignatureByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_with_signature_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

ユーザーIDを指定して署名情報と共にステータスを取得



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
keyId string ~ 1024文字 暗号鍵GRN

Result

説明
item Status ステータス
body string 検証対象のオブジェクト
signature string 署名

addExperienceByUserId

addExperienceByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddExperienceByUserId(
    &experience.AddExperienceByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        ExperienceValue: pointy.Int64(10),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddExperienceByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addExperienceByUserId(
        (new AddExperienceByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withExperienceValue(10)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddExperienceByUserIdRequest;
import io.gs2.experience.result.AddExperienceByUserIdResult;

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

try {
    AddExperienceByUserIdResult result = client.addExperienceByUserId(
        new AddExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(10L)
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddExperienceByUserIdRequest;
using Gs2.Gs2Experience.Result.AddExperienceByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddExperienceByUserIdResult> asyncResult = null;
yield return client.AddExperienceByUserId(
    new Gs2.Gs2Experience.Request.AddExperienceByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithExperienceValue(10L),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addExperienceByUserId(
        new Gs2Experience.AddExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(10)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_experience_by_user_id(
        experience.AddExperienceByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_experience_value(10)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.add_experience_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    experienceValue=10,
})

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

result = api_result.result
item = result.item;

経験値を加算



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
experienceValue long 0 ~ 9223372036854775806 獲得経験値

Result

説明
item Status 加算後のステータス

setExperienceByUserId

setExperienceByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetExperienceByUserId(
    &experience.SetExperienceByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        ExperienceValue: pointy.Int64(100),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetExperienceByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setExperienceByUserId(
        (new SetExperienceByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withExperienceValue(100)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.SetExperienceByUserIdRequest;
import io.gs2.experience.result.SetExperienceByUserIdResult;

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

try {
    SetExperienceByUserIdResult result = client.setExperienceByUserId(
        new SetExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(100L)
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.SetExperienceByUserIdRequest;
using Gs2.Gs2Experience.Result.SetExperienceByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.SetExperienceByUserIdResult> asyncResult = null;
yield return client.SetExperienceByUserId(
    new Gs2.Gs2Experience.Request.SetExperienceByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithExperienceValue(100L),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.setExperienceByUserId(
        new Gs2Experience.SetExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(100)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.set_experience_by_user_id(
        experience.SetExperienceByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_experience_value(100)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.set_experience_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    experienceValue=100,
})

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

result = api_result.result
item = result.item;

累計獲得経験値を設定



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
experienceValue long 0 ~ 9223372036854775806 累計獲得経験値

Result

説明
item Status 更新後のステータス

addRankCapByUserId

addRankCapByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddRankCapByUserId(
    &experience.AddRankCapByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        RankCapValue: pointy.Int64(30),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddRankCapByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addRankCapByUserId(
        (new AddRankCapByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withRankCapValue(30)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddRankCapByUserIdRequest;
import io.gs2.experience.result.AddRankCapByUserIdResult;

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

try {
    AddRankCapByUserIdResult result = client.addRankCapByUserId(
        new AddRankCapByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30L)
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddRankCapByUserIdRequest;
using Gs2.Gs2Experience.Result.AddRankCapByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddRankCapByUserIdResult> asyncResult = null;
yield return client.AddRankCapByUserId(
    new Gs2.Gs2Experience.Request.AddRankCapByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithRankCapValue(30L),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addRankCapByUserId(
        new Gs2Experience.AddRankCapByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_rank_cap_by_user_id(
        experience.AddRankCapByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_rank_cap_value(30)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.add_rank_cap_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    rankCapValue=30,
})

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

result = api_result.result
item = result.item;

ランクキャップを加算



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
rankCapValue long ~ 9223372036854775806 現在のランクキャップ

Result

説明
item Status 加算後のステータス

setRankCapByUserId

setRankCapByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetRankCapByUserId(
    &experience.SetRankCapByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        RankCapValue: pointy.Int64(30),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetRankCapByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setRankCapByUserId(
        (new SetRankCapByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withRankCapValue(30)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.SetRankCapByUserIdRequest;
import io.gs2.experience.result.SetRankCapByUserIdResult;

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

try {
    SetRankCapByUserIdResult result = client.setRankCapByUserId(
        new SetRankCapByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30L)
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.SetRankCapByUserIdRequest;
using Gs2.Gs2Experience.Result.SetRankCapByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.SetRankCapByUserIdResult> asyncResult = null;
yield return client.SetRankCapByUserId(
    new Gs2.Gs2Experience.Request.SetRankCapByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithRankCapValue(30L),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.setRankCapByUserId(
        new Gs2Experience.SetRankCapByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.set_rank_cap_by_user_id(
        experience.SetRankCapByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_rank_cap_value(30)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.set_rank_cap_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    rankCapValue=30,
})

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

result = api_result.result
item = result.item;

ランクキャップを設定



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID
rankCapValue long ~ 9223372036854775806 現在のランクキャップ

Result

説明
item Status 更新後のステータス

deleteStatusByUserId

deleteStatusByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteStatusByUserId(
    &experience.DeleteStatusByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteStatusByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteStatusByUserId(
        (new DeleteStatusByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteStatusByUserIdRequest;
import io.gs2.experience.result.DeleteStatusByUserIdResult;

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

try {
    DeleteStatusByUserIdResult result = client.deleteStatusByUserId(
        new DeleteStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteStatusByUserIdRequest;
using Gs2.Gs2Experience.Result.DeleteStatusByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteStatusByUserIdResult> asyncResult = null;
yield return client.DeleteStatusByUserId(
    new Gs2.Gs2Experience.Request.DeleteStatusByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteStatusByUserId(
        new Gs2Experience.DeleteStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.delete_status_by_user_id(
        experience.DeleteStatusByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.delete_status_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

ステータスを削除



Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
experienceName string ~ 128文字 経験値モデルの名前
propertyId string ~ 1024文字 プロパティID

Result

説明
item Status 削除したステータス

addExperienceByStampSheet

addExperienceByStampSheet

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddExperienceByStampSheet(
    &experience.AddExperienceByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddExperienceByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addExperienceByStampSheet(
        (new AddExperienceByStampSheetRequest())
            ->withStampSheet(self::$stampSheet)
            ->withKeyId(self::$key1.keyId)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddExperienceByStampSheetRequest;
import io.gs2.experience.result.AddExperienceByStampSheetResult;

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

try {
    AddExperienceByStampSheetResult result = client.addExperienceByStampSheet(
        new AddExperienceByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddExperienceByStampSheetRequest;
using Gs2.Gs2Experience.Result.AddExperienceByStampSheetResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddExperienceByStampSheetResult> asyncResult = null;
yield return client.AddExperienceByStampSheet(
    new Gs2.Gs2Experience.Request.AddExperienceByStampSheetRequest()
        .WithStampSheet("$stampSheet")
        .WithKeyId("$key1.keyId"),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addExperienceByStampSheet(
        new Gs2Experience.AddExperienceByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_experience_by_stamp_sheet(
        experience.AddExperienceByStampSheetRequest()
            .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('experience')

api_result = client.add_experience_by_stamp_sheet({
    stampSheet='$stampSheet',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;

スタンプシートを使用して経験値を加算



Request

必須 デフォルト 値の制限 説明
stampSheet string ~ 5242880文字 スタンプシート
keyId string ~ 1024文字 暗号鍵GRN

Result

説明
item Status 加算後のステータス

addRankCapByStampSheet

addRankCapByStampSheet

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddRankCapByStampSheet(
    &experience.AddRankCapByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddRankCapByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addRankCapByStampSheet(
        (new AddRankCapByStampSheetRequest())
            ->withStampSheet(self::$stampSheet)
            ->withKeyId(self::$key1.keyId)
    );
    $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.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddRankCapByStampSheetRequest;
import io.gs2.experience.result.AddRankCapByStampSheetResult;

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

try {
    AddRankCapByStampSheetResult result = client.addRankCapByStampSheet(
        new AddRankCapByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    Status 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.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddRankCapByStampSheetRequest;
using Gs2.Gs2Experience.Result.AddRankCapByStampSheetResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddRankCapByStampSheetResult> asyncResult = null;
yield return client.AddRankCapByStampSheet(
    new Gs2.Gs2Experience.Request.AddRankCapByStampSheetRequest()
        .WithStampSheet("$stampSheet")
        .WithKeyId("$key1.keyId"),
    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 Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addRankCapByStampSheet(
        new Gs2Experience.AddRankCapByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_rank_cap_by_stamp_sheet(
        experience.AddRankCapByStampSheetRequest()
            .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('experience')

api_result = client.add_rank_cap_by_stamp_sheet({
    stampSheet='$stampSheet',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;

スタンプシートを使用してランクキャップを加算



Request

必須 デフォルト 値の制限 説明
stampSheet string ~ 5242880文字 スタンプシート
keyId string ~ 1024文字 暗号鍵GRN

Result

説明
item Status 加算後のステータス

setRankCapByStampSheet

setRankCapByStampSheet

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/experience"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetRankCapByStampSheet(
    &experience.SetRankCapByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
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\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetRankCapByStampSheetRequest;

$session = new