NAV
go python java php typescript csharp GS2-Script

GS2-Experience

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 現在のランクキャップ
createdAt long 作成日時
updatedAt long 最終更新日時

GitHubCheckoutSetting

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

ScriptSetting

説明
triggerScriptId string スクリプトGRN
doneTriggerTargetType string 完了通知の通知先
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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeNamespaces(
    new 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(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_namespaces(
        new experience.DescribeNamespacesRequest()
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('experience')

api_result = client.describe_namespaces({
    pageToken=nil,
    limit=nil,
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createNamespace(
    new 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(undefined)
            .withExperienceCapScriptId(undefined)
            .withChangeExperienceScript(undefined)
            .withChangeRankScript(undefined)
            .withChangeRankCapScript(undefined)
            .withOverflowExperienceScript(undefined)
            .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

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

try:
    result = client.create_namespace(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getNamespaceStatus(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getNamespace(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateNamespace(
    new 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

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

try:
    result = client.update_namespace(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteNamespace(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeExperienceModelMasters(
    new 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(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_experience_model_masters(
        new 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:
    os.exit(1);

client = gs2('experience')

api_result = client.describe_experience_model_masters({
    namespaceName='namespace1',
    pageToken=nil,
    limit=nil,
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createExperienceModelMaster(
    new 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(undefined)
            .withMetadata(undefined)
            .withDefaultExperience(undefined)
            .withDefaultRankCap(50)
            .withMaxRankCap(50)
            .withRankThresholdName('$threshold1.name')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_experience_model_master(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 経験値の初期値
defaultRankCap long ~ 9223372036854775807 ランクキャップの初期値
maxRankCap long ~ 9223372036854775807 ランクキャップの最大値
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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getExperienceModelMaster(
    new 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

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

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

client = gs2('experience')

api_result = client.get_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-model-0001',
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateExperienceModelMaster(
    new 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

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

try:
    result = client.update_experience_model_master(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 経験値の初期値
defaultRankCap long ~ 9223372036854775807 ランクキャップの初期値
maxRankCap long ~ 9223372036854775807 ランクキャップの最大値
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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteExperienceModelMaster(
    new 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

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

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

client = gs2('experience')

api_result = client.delete_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-model-0001',
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeExperienceModels(
    new 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

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

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

client = gs2('experience')

api_result = client.describe_experience_models({
    namespaceName='namespace2',
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getExperienceModel(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeThresholdMasters(
    new 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(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_threshold_masters(
        new 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:
    os.exit(1);

client = gs2('experience')

api_result = client.describe_threshold_masters({
    namespaceName='namespace1',
    pageToken=nil,
    limit=nil,
});

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createThresholdMaster(
    new 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(undefined)
            .withMetadata(undefined)
            .withValues([
                100,
            200,
            300
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_threshold_master(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getThresholdMaster(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateThresholdMaster(
    new 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

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

try:
    result = client.update_threshold_master(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteThresholdMaster(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.exportMaster(
    new 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

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

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

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getCurrentExperienceMaster(
    new 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

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

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

client = gs2('experience')

api_result = client.get_current_experience_master({
    namespaceName='namespace1',
});

if(api_result.isError) then
    # エラー発生時
    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(`{
          "version": "2019-01-11",
          "experienceModels": [
            {
              "name": "character_ssr",
              "metadata": "SSR",
              "defaultExperience": 0,
              "defaultRankCap": 50,
              "maxRankCap": 80,
              "rankThreshold": {
                "metadata": "CHARACTER",
                "values": [
                  100,
                  200,
                  300,
                  400,
                  500,
                  600,
                  700,
                  800,
                  900,
                  1000,
                  1100,
                  1200,
                  1300,
                  1400,
                  1500,
                  1600,
                  1700,
                  1800,
                  1900,
                  2000,
                  2100,
                  2200,
                  2300,
                  2400,
                  2500,
                  2600,
                  2700,
                  2800,
                  2900,
                  3000,
                  3100,
                  3200,
                  3300,
                  3400,
                  3500,
                  3600,
                  3700,
                  3800,
                  3900,
                  4000,
                  4100,
                  4200,
                  4300,
                  4400,
                  4500,
                  4600,
                  4700,
                  4800,
                  4900,
                  5000,
                  5100,
                  5200,
                  5300,
                  5400,
                  5500,
                  5600,
                  5700,
                  5800,
                  5900,
                  6000,
                  6100,
                  6200,
                  6300,
                  6400,
                  6500,
                  6600,
                  6700,
                  6800,
                  6900,
                  7000,
                  7100,
                  7200,
                  7300,
                  7400,
                  7500,
                  7600,
                  7700,
                  7800,
                  7900
                ]
              }
            },
            {
              "name": "character_sr",
              "metadata": "SR",
              "defaultExperience": 0,
              "defaultRankCap": 40,
              "maxRankCap": 70,
              "rankThreshold": {
                "metadata": "CHARACTER",
                "values": [
                  100,
                  200,
                  300,
                  400,
                  500,
                  600,
                  700,
                  800,
                  900,
                  1000,
                  1100,
                  1200,
                  1300,
                  1400,
                  1500,
                  1600,
                  1700,
                  1800,
                  1900,
                  2000,
                  2100,
                  2200,
                  2300,
                  2400,
                  2500,
                  2600,
                  2700,
                  2800,
                  2900,
                  3000,
                  3100,
                  3200,
                  3300,
                  3400,
                  3500,
                  3600,
                  3700,
                  3800,
                  3900,
                  4000,
                  4100,
                  4200,
                  4300,
                  4400,
                  4500,
                  4600,
                  4700,
                  4800,
                  4900,
                  5000,
                  5100,
                  5200,
                  5300,
                  5400,
                  5500,
                  5600,
                  5700,
                  5800,
                  5900,
                  6000,
                  6100,
                  6200,
                  6300,
                  6400,
                  6500,
                  6600,
                  6700,
                  6800,
                  6900,
                  7000,
                  7100,
                  7200,
                  7300,
                  7400,
                  7500,
                  7600,
                  7700,
                  7800,
                  7900
                ]
              }
            },
            {
              "name": "character_r",
              "metadata": "R",
              "defaultExperience": 0,
              "defaultRankCap": 30,
              "maxRankCap": 60,
              "rankThreshold": {
                "metadata": "CHARACTER",
                "values": [
                  100,
                  200,
                  300,
                  400,
                  500,
                  600,
                  700,
                  800,
                  900,
                  1000,
                  1100,
                  1200,
                  1300,
                  1400,
                  1500,
                  1600,
                  1700,
                  1800,
                  1900,
                  2000,
                  2100,
                  2200,
                  2300,
                  2400,
                  2500,
                  2600,
                  2700,
                  2800,
                  2900,
                  3000,
                  3100,
                  3200,
                  3300,
                  3400,
                  3500,
                  3600,
                  3700,
                  3800,
                  3900,
                  4000,
                  4100,
                  4200,
                  4300,
                  4400,
                  4500,
                  4600,
                  4700,
                  4800,
                  4900,
                  5000,
                  5100,
                  5200,
                  5300,
                  5400,
                  5500,
                  5600,
                  5700,
                  5800,
                  5900,
                  6000,
                  6100,
                  6200,
                  6300,
                  6400,
                  6500,
                  6600,
                  6700,
                  6800,
                  6900,
                  7000,
                  7100,
                  7200,
                  7300,
                  7400,
                  7500,
                  7600,
                  7700,
                  7800,
                  7900
                ]
              }
            },
            {
              "name": "equipment",
              "metadata": "EQUIPMENT",
              "defaultExperience": 0,
              "defaultRankCap": 30,
              "maxRankCap": 50,
              "rankThreshold": {
                "metadata": "EQUIPMENT",
                "values": [
                  200,
                  400,
                  600,
                  800,
                  1000,
                  1200,
                  1400,
                  1600,
                  1800,
                  2000,
                  2200,
                  2400,
                  2600,
                  2800,
                  3000,
                  3200,
                  3400,
                  3600,
                  3800,
                  4000,
                  4200,
                  4400,
                  4600,
                  4800,
                  5000,
                  5200,
                  5400,
                  5600,
                  5800,
                  6000,
                  6200,
                  6400,
                  6600,
                  6800,
                  7000,
                  7200,
                  7400,
                  7600,
                  7800,
                  8000,
                  8200,
                  8400,
                  8600,
                  8800,
                  9000,
                  9200,
                  9400,
                  9600,
                  9800
                ]
              }
            },
            {
              "name": "skill",
              "metadata": "SKILL",
              "defaultExperience": 0,
              "defaultRankCap": 10,
              "maxRankCap": 20,
              "rankThreshold": {
                "metadata": "SKILL",
                "values": [
                  300,
                  600,
                  900,
                  1200,
                  1500,
                  1800,
                  2100,
                  2400,
                  2700,
                  3000,
                  3300,
                  3600,
                  3900,
                  4200,
                  4500,
                  4800,
                  5100,
                  5400,
                  5700
                ]
              }
            }
          ]
        }`),
    }
)
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("{
              \"version\": \"2019-01-11\",
              \"experienceModels\": [
                {
                  \"name\": \"character_ssr\",
                  \"metadata\": \"SSR\",
                  \"defaultExperience\": 0,
                  \"defaultRankCap\": 50,
                  \"maxRankCap\": 80,
                  \"rankThreshold\": {
                    \"metadata\": \"CHARACTER\",
                    \"values\": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  \"name\": \"character_sr\",
                  \"metadata\": \"SR\",
                  \"defaultExperience\": 0,
                  \"defaultRankCap\": 40,
                  \"maxRankCap\": 70,
                  \"rankThreshold\": {
                    \"metadata\": \"CHARACTER\",
                    \"values\": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  \"name\": \"character_r\",
                  \"metadata\": \"R\",
                  \"defaultExperience\": 0,
                  \"defaultRankCap\": 30,
                  \"maxRankCap\": 60,
                  \"rankThreshold\": {
                    \"metadata\": \"CHARACTER\",
                    \"values\": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  \"name\": \"equipment\",
                  \"metadata\": \"EQUIPMENT\",
                  \"defaultExperience\": 0,
                  \"defaultRankCap\": 30,
                  \"maxRankCap\": 50,
                  \"rankThreshold\": {
                    \"metadata\": \"EQUIPMENT\",
                    \"values\": [
                      200,
                      400,
                      600,
                      800,
                      1000,
                      1200,
                      1400,
                      1600,
                      1800,
                      2000,
                      2200,
                      2400,
                      2600,
                      2800,
                      3000,
                      3200,
                      3400,
                      3600,
                      3800,
                      4000,
                      4200,
                      4400,
                      4600,
                      4800,
                      5000,
                      5200,
                      5400,
                      5600,
                      5800,
                      6000,
                      6200,
                      6400,
                      6600,
                      6800,
                      7000,
                      7200,
                      7400,
                      7600,
                      7800,
                      8000,
                      8200,
                      8400,
                      8600,
                      8800,
                      9000,
                      9200,
                      9400,
                      9600,
                      9800
                    ]
                  }
                },
                {
                  \"name\": \"skill\",
                  \"metadata\": \"SKILL\",
                  \"defaultExperience\": 0,
                  \"defaultRankCap\": 10,
                  \"maxRankCap\": 20,
                  \"rankThreshold\": {
                    \"metadata\": \"SKILL\",
                    \"values\": [
                      300,
                      600,
                      900,
                      1200,
                      1500,
                      1800,
                      2100,
                      2400,
                      2700,
                      3000,
                      3300,
                      3600,
                      3900,
                      4200,
                      4500,
                      4800,
                      5100,
                      5400,
                      5700
                    ]
                  }
                }
              ]
            }")
    );
    $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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return 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}"),
    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(`{
              "version": "2019-01-11",
              "experienceModels": [
                {
                  "name": "character_ssr",
                  "metadata": "SSR",
                  "defaultExperience": 0,
                  "defaultRankCap": 50,
                  "maxRankCap": 80,
                  "rankThreshold": {
                    "metadata": "CHARACTER",
                    "values": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  "name": "character_sr",
                  "metadata": "SR",
                  "defaultExperience": 0,
                  "defaultRankCap": 40,
                  "maxRankCap": 70,
                  "rankThreshold": {
                    "metadata": "CHARACTER",
                    "values": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  "name": "character_r",
                  "metadata": "R",
                  "defaultExperience": 0,
                  "defaultRankCap": 30,
                  "maxRankCap": 60,
                  "rankThreshold": {
                    "metadata": "CHARACTER",
                    "values": [
                      100,
                      200,
                      300,
                      400,
                      500,
                      600,
                      700,
                      800,
                      900,
                      1000,
                      1100,
                      1200,
                      1300,
                      1400,
                      1500,
                      1600,
                      1700,
                      1800,
                      1900,
                      2000,
                      2100,
                      2200,
                      2300,
                      2400,
                      2500,
                      2600,
                      2700,
                      2800,
                      2900,
                      3000,
                      3100,
                      3200,
                      3300,
                      3400,
                      3500,
                      3600,
                      3700,
                      3800,
                      3900,
                      4000,
                      4100,
                      4200,
                      4300,
                      4400,
                      4500,
                      4600,
                      4700,
                      4800,
                      4900,
                      5000,
                      5100,
                      5200,
                      5300,
                      5400,
                      5500,
                      5600,
                      5700,
                      5800,
                      5900,
                      6000,
                      6100,
                      6200,
                      6300,
                      6400,
                      6500,
                      6600,
                      6700,
                      6800,
                      6900,
                      7000,
                      7100,
                      7200,
                      7300,
                      7400,
                      7500,
                      7600,
                      7700,
                      7800,
                      7900
                    ]
                  }
                },
                {
                  "name": "equipment",
                  "metadata": "EQUIPMENT",
                  "defaultExperience": 0,
                  "defaultRankCap": 30,
                  "maxRankCap": 50,
                  "rankThreshold": {
                    "metadata": "EQUIPMENT",
                    "values": [
                      200,
                      400,
                      600,
                      800,
                      1000,
                      1200,
                      1400,
                      1600,
                      1800,
                      2000,
                      2200,
                      2400,
                      2600,
                      2800,
                      3000,
                      3200,
                      3400,
                      3600,
                      3800,
                      4000,
                      4200,
                      4400,
                      4600,
                      4800,
                      5000,
                      5200,
                      5400,
                      5600,
                      5800,
                      6000,
                      6200,
                      6400,
                      6600,
                      6800,
                      7000,
                      7200,
                      7400,
                      7600,
                      7800,
                      8000,
                      8200,
                      8400,
                      8600,
                      8800,
                      9000,
                      9200,
                      9400,
                      9600,
                      9800
                    ]
                  }
                },
                {
                  "name": "skill",
                  "metadata": "SKILL",
                  "defaultExperience": 0,
                  "defaultRankCap": 10,
                  "maxRankCap": 20,
                  "rankThreshold": {
                    "metadata": "SKILL",
                    "values": [
                      300,
                      600,
                      900,
                      1200,
                      1500,
                      1800,
                      2100,
                      2400,
                      2700,
                      3000,
                      3300,
                      3600,
                      3900,
                      4200,
                      4500,
                      4800,
                      5100,
                      5400,
                      5700
                    ]
                  }
                }
              ]
            }`)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_current_experience_master(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateCurrentExperienceMasterFromGitHub(
    new 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

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

try:
    result = client.update_current_experience_master_from_git_hub(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeStatuses(
    new 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(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_statuses(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeStatusesByUserId(
    new 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(undefined)
            .withExperienceName('character_ssr')
            .withUserId('user-0001')
            .withPageToken(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_statuses_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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文字 経験値の種類名
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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getStatus(
    new 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

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

try:
    result = client.get_status(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getStatusByUserId(
    new 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(undefined)
            .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

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

try:
    result = client.get_status_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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 ステータス

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getStatusWithSignature(
    new 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(undefined)
            .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

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

try:
    result = client.get_status_with_signature(
        new 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:
    os.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
    # エラー発生時
    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 署名

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.addExperienceByUserId(
    new 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

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

try:
    result = client.add_experience_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 獲得経験値

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.setExperienceByUserId(
    new 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

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

try:
    result = client.set_experience_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 累計獲得経験値

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.addRankCapByUserId(
    new 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

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

try:
    result = client.add_rank_cap_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 現在のランクキャップ

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.setRankCapByUserId(
    new 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(undefined)
            .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

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

try:
    result = client.set_rank_cap_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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 ~ 9223372036854775807 現在のランクキャップ

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteStatusByUserId(
    new 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

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

try:
    result = client.delete_status_by_user_id(
        new 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:
    os.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
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.addExperienceByStampSheet(
    new 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

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

try:
    result = client.add_experience_by_stamp_sheet(
        new experience.AddExperienceByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.addRankCapByStampSheet(
    new 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

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

try:
    result = client.add_rank_cap_by_stamp_sheet(
        new experience.AddRankCapByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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 Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setRankCapByStampSheet(
        (new SetRankCapByStampSheetRequest())
            ->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.SetRankCapByStampSheetRequest;
import io.gs2.experience.result.SetRankCapByStampSheetResult;

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

try {
    SetRankCapByStampSheetResult result = client.setRankCapByStampSheet(
        new SetRankCapByStampSheetRequest()
            .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.SetRankCapByStampSheetRequest;
using Gs2.Gs2Experience.Result.SetRankCapByStampSheetResult;

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.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.setRankCapByStampSheet(
    new SetRankCapByStampSheetRequest()
        .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.setRankCapByStampSheet(
        new Gs2Experience.SetRankCapByStampSheetRequest()
            .withStampSheet('$stampSheet')
            .withKeyId('$key1.keyId')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.set_rank_cap_by_stamp_sheet(
        new experience.SetRankCapByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('experience')

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

if(api_result.isError) then
    # エラー発生時
    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 更新後のステータス