NAV
go python java php typescript csharp GS2-Script

GS2-Stamina

GS2-SDK のリファレンス

モデル

Namespace

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

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

説明
namespaceId string ネームスペースGRN
name string ネームスペース名
description string 説明文
overflowTriggerScript ScriptSetting 回復処理時にあふれたスタミナに対して処理をする GS2-Script
logSetting LogSetting ログの出力設定
createdAt long 作成日時
updatedAt long 最終更新日時

StaminaModelMaster

スタミナマスターはスタミナの種類を定義するエンティティです。 スタミナの最大値や、回復間隔、回復量といったパラメータを定義できます。 GS2-Experience と連動させて、最大値や回復量をコントロールすることもできます。

説明
staminaModelId string スタミナモデルマスターGRN
name string スタミナの種類名
metadata string メタデータ
description string 説明文
recoverIntervalMinutes int スタミナを回復する速度(分)
recoverValue int 時間経過後に回復する量
initialCapacity int スタミナの最大値の初期値
isOverflow bool 最大値を超えて回復するか
maxCapacity int 溢れた状況での最大値
maxStaminaTableName string GS2-Experience のランクによって最大スタミナ値を決定するスタミナ最大値テーブル名
recoverIntervalTableName string GS2-Experience のランクによってスタミナの回復間隔を決定する回復間隔テーブル名
recoverValueTableName string GS2-Experience のランクによってスタミナの回復量を決定する回復量テーブル名
createdAt long 作成日時
updatedAt long 最終更新日時

MaxStaminaTableMaster

GS2-Experience のランクごとにスタミナの最大値を定義するエンティティです。

説明
maxStaminaTableId string スタミナの最大値テーブルマスターGRN
name string 最大スタミナ値テーブル名
metadata string メタデータ
description string 説明文
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナの最大値テーブル
createdAt long 作成日時
updatedAt long 最終更新日時

RecoverIntervalTableMaster

GS2-Experience のランクごとにスタミナの回復間隔を定義するエンティティです。

説明
recoverIntervalTableId string スタミナ回復間隔テーブルマスターGRN
name string スタミナ回復間隔テーブル名
metadata string メタデータ
description string 説明文
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復間隔テーブル
createdAt long 作成日時
updatedAt long 最終更新日時

RecoverValueTableMaster

GS2-Experience のランクごとにスタミナの回復量を定義するエンティティです。

説明
recoverValueTableId string スタミナ回復量テーブルマスターGRN
name string スタミナ回復量テーブル名
metadata string メタデータ
description string 説明文
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復量テーブル
createdAt long 作成日時
updatedAt long 最終更新日時

CurrentStaminaMaster

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

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

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

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

StaminaModel

スタミナマスターはスタミナの種類を定義するエンティティです。 スタミナの最大値や、回復間隔、回復量といったパラメータを定義できます。 GS2-Experience と連動させて、最大値や回復量をコントロールすることもできます。

説明
staminaModelId string スタミナモデルGRN
name string スタミナの種類名
metadata string メタデータ
recoverIntervalMinutes int スタミナを回復する速度(分)
recoverValue int 時間経過後に回復する量
initialCapacity int スタミナの最大値の初期値
isOverflow bool 最大値を超えて回復するか
maxCapacity int 溢れた状況での最大値
maxStaminaTable MaxStaminaTable GS2-Experience と連携する際に使用するスタミナ最大値テーブル
recoverIntervalTable RecoverIntervalTable GS2-Experience と連携する際に使用する回復間隔テーブル
recoverValueTable RecoverValueTable GS2-Experience と連携する際に使用する回復量テーブル

MaxStaminaTable

GS2-Experience のランクごとにスタミナの最大値を定義するエンティティです。

説明
maxStaminaTableId string スタミナの最大値テーブルGRN
name string 最大スタミナ値テーブル名
metadata string メタデータ
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナの最大値テーブル

RecoverIntervalTable

GS2-Experience のランクごとにスタミナの回復間隔を定義するエンティティです。

説明
recoverIntervalTableId string スタミナ回復間隔テーブルGRN
name string スタミナ回復間隔テーブル名
metadata string メタデータ
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復間隔テーブル

RecoverValueTable

GS2-Experience のランクごとにスタミナの回復量を定義するエンティティです。

説明
recoverValueTableId string スタミナ回復量テーブルGRN
name string スタミナ回復量テーブル名
metadata string メタデータ
experienceModelId string 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復量テーブル

Stamina

ゲームプレイヤー毎に現在のスタミナ値を保持するエンティティです。

説明
staminaId string スタミナGRN
staminaName string スタミナモデルの名前
userId string ユーザーID
value int 最終更新時におけるスタミナ値
maxValue int スタミナの最大値
recoverIntervalMinutes int スタミナの回復間隔(分)
recoverValue int スタミナの回復量
overflowValue int スタミナの最大値を超えて格納されているスタミナ値
nextRecoverAt long 次回スタミナが回復する時間
lastRecoveredAt long 作成日時
createdAt long 作成日時
updatedAt long 最終更新日時

GitHubCheckoutSetting

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

LogSetting

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

ScriptSetting

説明
triggerScriptId string スクリプトGRN
doneTriggerTargetType string 完了通知の通知先
doneTriggerScriptId string スクリプトGRN
doneTriggerQueueNamespaceId string ネームスペースGRN

メソッド

describeNamespaces

describeNamespaces

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

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

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

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

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

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2StaminaRestClient(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 Gs2Stamina from '@/gs2/stamina';

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

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

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

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

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/stamina"
import "github.com/openlyinc/pointy"

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &stamina.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        OverflowTriggerScript: &stamina.ScriptSetting{
            TriggerScriptId: pointy.String("$script1.scriptId"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1"),
        },
        LogSetting: &stamina.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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\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)
            ->withOverflowTriggerScript((new \Gs2\Stamina\Model\ScriptSetting())
                ->withTriggerScriptId(self::$script1.scriptId)
                ->withDoneTriggerScriptId('grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1'))
            ->withLogSetting((new \Gs2\Stamina\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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.CreateNamespaceRequest;
import io.gs2.stamina.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withOverflowTriggerScript(new io.gs2.stamina.model.ScriptSetting()
                .withTriggerScriptId("$script1.scriptId")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1"))
            .withLogSetting(new io.gs2.stamina.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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.CreateNamespaceRequest;
using Gs2.Gs2Stamina.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createNamespace(
    new CreateNamespaceRequest()
        .withName("namespace1")
        .withDescription(null)
        .withOverflowTriggerScript(new Gs2.Gs2Stamina.Model.ScriptSetting()
            .WithTriggerScriptId("$script1.scriptId")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1"))
        .withLogSetting(new Gs2.Gs2Stamina.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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.createNamespace(
        new Gs2Stamina.CreateNamespaceRequest()
            .withName('namespace1')
            .withDescription(undefined)
            .withOverflowTriggerScript(new Gs2Stamina.Model.ScriptSetting()
                .withTriggerScriptId('$script1.scriptId')
                .withDoneTriggerScriptId('grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1'))
            .withLogSetting(new Gs2Stamina.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 stamina

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

try:
    result = client.create_namespace(
        new stamina.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_overflow_trigger_script(
                stamina.ScriptSetting()
                    .with_trigger_script_id(self.script1.script_id)
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1'))
            .with_log_setting(
                stamina.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('stamina')

api_result = client.create_namespace({
    name='namespace1',
    description=nil,
    overflowTriggerScript={
        triggerScriptId='$script1.scriptId',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:queue:namespace1',
    },
    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文字 説明文
overflowTriggerScript ScriptSetting 回復処理時にあふれたスタミナに対して処理をする GS2-Script
logSetting LogSetting ログの出力設定

Result

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

getNamespaceStatus

getNamespaceStatus

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

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

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

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

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

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2StaminaRestClient(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 Gs2Stamina from '@/gs2/stamina';

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

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

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

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

client = gs2('stamina')

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/stamina"
import "github.com/openlyinc/pointy"

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

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

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

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

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2StaminaRestClient(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 Gs2Stamina from '@/gs2/stamina';

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

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

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

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

client = gs2('stamina')

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/stamina"
import "github.com/openlyinc/pointy"

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &stamina.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        OverflowTriggerScript: nil,
        LogSetting: &stamina.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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\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')
            ->withOverflowTriggerScript(null)
            ->withLogSetting((new \Gs2\Stamina\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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateNamespaceRequest;
import io.gs2.stamina.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withOverflowTriggerScript(null)
            .withLogSetting(new io.gs2.stamina.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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.UpdateNamespaceRequest;
using Gs2.Gs2Stamina.Result.UpdateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateNamespace(
    new UpdateNamespaceRequest()
        .withNamespaceName("namespace1")
        .withDescription("description1")
        .withOverflowTriggerScript(null)
        .withLogSetting(new Gs2.Gs2Stamina.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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.updateNamespace(
        new Gs2Stamina.UpdateNamespaceRequest()
            .withNamespaceName('namespace1')
            .withDescription('description1')
            .withOverflowTriggerScript(undefined)
            .withLogSetting(new Gs2Stamina.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 stamina

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

try:
    result = client.update_namespace(
        new stamina.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_overflow_trigger_script(None)
            .with_log_setting(
                stamina.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('stamina')

api_result = client.update_namespace({
    namespaceName='namespace1',
    description='description1',
    overflowTriggerScript=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

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
description string ~ 1024文字 説明文
overflowTriggerScript ScriptSetting 回復処理時にあふれたスタミナに対して処理をする GS2-Script
logSetting LogSetting ログの出力設定

Result

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

deleteNamespace

deleteNamespace

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

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

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

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

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

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2StaminaRestClient(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 Gs2Stamina from '@/gs2/stamina';

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

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

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

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

client = gs2('stamina')

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 削除したネームスペース

describeStaminaModelMasters

describeStaminaModelMasters

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DescribeStaminaModelMasters(
    &stamina.DescribeStaminaModelMastersRequest {
        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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DescribeStaminaModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeStaminaModelMasters(
        (new DescribeStaminaModelMastersRequest())
            ->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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DescribeStaminaModelMastersRequest;
import io.gs2.stamina.result.DescribeStaminaModelMastersResult;

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

try {
    DescribeStaminaModelMastersResult result = client.describeStaminaModelMasters(
        new DescribeStaminaModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<StaminaModelMaster> 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DescribeStaminaModelMastersRequest;
using Gs2.Gs2Stamina.Result.DescribeStaminaModelMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeStaminaModelMasters(
    new DescribeStaminaModelMastersRequest()
        .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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.describeStaminaModelMasters(
        new Gs2Stamina.DescribeStaminaModelMastersRequest()
            .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 stamina

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

try:
    result = client.describe_stamina_model_masters(
        new stamina.DescribeStaminaModelMastersRequest()
            .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('stamina')

api_result = client.describe_stamina_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 StaminaModelMaster[] スタミナモデルマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createStaminaModelMaster

createStaminaModelMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.CreateStaminaModelMaster(
    &stamina.CreateStaminaModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("stamina-0001"),
        Description: nil,
        Metadata: nil,
        RecoverIntervalMinutes: pointy.Int32(15),
        RecoverValue: nil,
        InitialCapacity: pointy.Int32(50),
        IsOverflow: pointy.Bool(false),
        MaxCapacity: nil,
        MaxStaminaTableName: pointy.String("$maxStaminaTable1.name"),
        RecoverIntervalTableName: pointy.String("$recoverIntervalTable1.name"),
        RecoverValueTableName: pointy.String("$recoverValueTable1.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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\CreateStaminaModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createStaminaModelMaster(
        (new CreateStaminaModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName('stamina-0001')
            ->withDescription(null)
            ->withMetadata(null)
            ->withRecoverIntervalMinutes(15)
            ->withRecoverValue(null)
            ->withInitialCapacity(50)
            ->withIsOverflow(False)
            ->withMaxCapacity(null)
            ->withMaxStaminaTableName(self::$maxStaminaTable1.name)
            ->withRecoverIntervalTableName(self::$recoverIntervalTable1.name)
            ->withRecoverValueTableName(self::$recoverValueTable1.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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.CreateStaminaModelMasterRequest;
import io.gs2.stamina.result.CreateStaminaModelMasterResult;

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

try {
    CreateStaminaModelMasterResult result = client.createStaminaModelMaster(
        new CreateStaminaModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("stamina-0001")
            .withDescription(null)
            .withMetadata(null)
            .withRecoverIntervalMinutes(15)
            .withRecoverValue(null)
            .withInitialCapacity(50)
            .withIsOverflow(false)
            .withMaxCapacity(null)
            .withMaxStaminaTableName("$maxStaminaTable1.name")
            .withRecoverIntervalTableName("$recoverIntervalTable1.name")
            .withRecoverValueTableName("$recoverValueTable1.name")
    );
    StaminaModelMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.CreateStaminaModelMasterRequest;
using Gs2.Gs2Stamina.Result.CreateStaminaModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createStaminaModelMaster(
    new CreateStaminaModelMasterRequest()
        .withNamespaceName("namespace1")
        .withName("stamina-0001")
        .withDescription(null)
        .withMetadata(null)
        .withRecoverIntervalMinutes(15)
        .withRecoverValue(null)
        .withInitialCapacity(50)
        .withIsOverflow(false)
        .withMaxCapacity(null)
        .withMaxStaminaTableName("$maxStaminaTable1.name")
        .withRecoverIntervalTableName("$recoverIntervalTable1.name")
        .withRecoverValueTableName("$recoverValueTable1.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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.createStaminaModelMaster(
        new Gs2Stamina.CreateStaminaModelMasterRequest()
            .withNamespaceName('namespace1')
            .withName('stamina-0001')
            .withDescription(undefined)
            .withMetadata(undefined)
            .withRecoverIntervalMinutes(15)
            .withRecoverValue(undefined)
            .withInitialCapacity(50)
            .withIsOverflow(false)
            .withMaxCapacity(undefined)
            .withMaxStaminaTableName('$maxStaminaTable1.name')
            .withRecoverIntervalTableName('$recoverIntervalTable1.name')
            .withRecoverValueTableName('$recoverValueTable1.name')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_stamina_model_master(
        new stamina.CreateStaminaModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('stamina-0001')
            .with_description(None)
            .with_metadata(None)
            .with_recover_interval_minutes(15)
            .with_recover_value(None)
            .with_initial_capacity(50)
            .with_is_overflow(False)
            .with_max_capacity(None)
            .with_max_stamina_table_name(self.max_stamina_table1.name)
            .with_recover_interval_table_name(self.recover_interval_table1.name)
            .with_recover_value_table_name(self.recover_value_table1.name)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.create_stamina_model_master({
    namespaceName='namespace1',
    name='stamina-0001',
    description=nil,
    metadata=nil,
    recoverIntervalMinutes=15,
    recoverValue=nil,
    initialCapacity=50,
    isOverflow=false,
    maxCapacity=nil,
    maxStaminaTableName='$maxStaminaTable1.name',
    recoverIntervalTableName='$recoverIntervalTable1.name',
    recoverValueTableName='$recoverValueTable1.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 ~ 128文字 メタデータ
recoverIntervalMinutes int ~ 9223372036854775807 スタミナを回復する速度(分)
recoverValue int 1 ~ 9223372036854775807 時間経過後に回復する量
initialCapacity int ~ 9223372036854775807 スタミナの最大値の初期値
isOverflow bool 最大値を超えて回復するか
maxCapacity int {isOverflow} ~ 9223372036854775807 溢れた状況での最大値
maxStaminaTableName string ~ 128文字 GS2-Experience のランクによって最大スタミナ値を決定するスタミナ最大値テーブル名
recoverIntervalTableName string ~ 128文字 GS2-Experience のランクによってスタミナの回復間隔を決定する回復間隔テーブル名
recoverValueTableName string ~ 128文字 GS2-Experience のランクによってスタミナの回復量を決定する回復量テーブル名

Result

説明
item StaminaModelMaster 作成したスタミナモデルマスター

getStaminaModelMaster

getStaminaModelMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.GetStaminaModelMaster(
    &stamina.GetStaminaModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        StaminaName: pointy.String("stamina-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\GetStaminaModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStaminaModelMaster(
        (new GetStaminaModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withStaminaName('stamina-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.GetStaminaModelMasterRequest;
import io.gs2.stamina.result.GetStaminaModelMasterResult;

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

try {
    GetStaminaModelMasterResult result = client.getStaminaModelMaster(
        new GetStaminaModelMasterRequest()
            .withNamespaceName("namespace1")
            .withStaminaName("stamina-0001")
    );
    StaminaModelMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.GetStaminaModelMasterRequest;
using Gs2.Gs2Stamina.Result.GetStaminaModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getStaminaModelMaster(
    new GetStaminaModelMasterRequest()
        .withNamespaceName("namespace1")
        .withStaminaName("stamina-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.getStaminaModelMaster(
        new Gs2Stamina.GetStaminaModelMasterRequest()
            .withNamespaceName('namespace1')
            .withStaminaName('stamina-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.get_stamina_model_master(
        new stamina.GetStaminaModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_stamina_name('stamina-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.get_stamina_model_master({
    namespaceName='namespace1',
    staminaName='stamina-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文字 ネームスペース名
staminaName string ~ 128文字 スタミナの種類名

Result

説明
item StaminaModelMaster スタミナモデルマスター

updateStaminaModelMaster

updateStaminaModelMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateStaminaModelMaster(
    &stamina.UpdateStaminaModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        StaminaName: pointy.String("stamina-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("STAMINA_MODEL_MASTER_0001"),
        RecoverIntervalMinutes: pointy.Int32(20),
        RecoverValue: pointy.Int32(2),
        InitialCapacity: pointy.Int32(60),
        IsOverflow: pointy.Bool(true),
        MaxCapacity: pointy.Int32(999),
        MaxStaminaTableName: pointy.String("$maxStaminaTable2.name"),
        RecoverIntervalTableName: pointy.String("$recoverIntervalTable2.name"),
        RecoverValueTableName: pointy.String("$recoverValueTable2.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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\UpdateStaminaModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateStaminaModelMaster(
        (new UpdateStaminaModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withStaminaName('stamina-0001')
            ->withDescription('description1')
            ->withMetadata('STAMINA_MODEL_MASTER_0001')
            ->withRecoverIntervalMinutes(20)
            ->withRecoverValue(2)
            ->withInitialCapacity(60)
            ->withIsOverflow(True)
            ->withMaxCapacity(999)
            ->withMaxStaminaTableName(self::$maxStaminaTable2.name)
            ->withRecoverIntervalTableName(self::$recoverIntervalTable2.name)
            ->withRecoverValueTableName(self::$recoverValueTable2.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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateStaminaModelMasterRequest;
import io.gs2.stamina.result.UpdateStaminaModelMasterResult;

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

try {
    UpdateStaminaModelMasterResult result = client.updateStaminaModelMaster(
        new UpdateStaminaModelMasterRequest()
            .withNamespaceName("namespace1")
            .withStaminaName("stamina-0001")
            .withDescription("description1")
            .withMetadata("STAMINA_MODEL_MASTER_0001")
            .withRecoverIntervalMinutes(20)
            .withRecoverValue(2)
            .withInitialCapacity(60)
            .withIsOverflow(true)
            .withMaxCapacity(999)
            .withMaxStaminaTableName("$maxStaminaTable2.name")
            .withRecoverIntervalTableName("$recoverIntervalTable2.name")
            .withRecoverValueTableName("$recoverValueTable2.name")
    );
    StaminaModelMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.UpdateStaminaModelMasterRequest;
using Gs2.Gs2Stamina.Result.UpdateStaminaModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateStaminaModelMaster(
    new UpdateStaminaModelMasterRequest()
        .withNamespaceName("namespace1")
        .withStaminaName("stamina-0001")
        .withDescription("description1")
        .withMetadata("STAMINA_MODEL_MASTER_0001")
        .withRecoverIntervalMinutes(20)
        .withRecoverValue(2)
        .withInitialCapacity(60)
        .withIsOverflow(true)
        .withMaxCapacity(999)
        .withMaxStaminaTableName("$maxStaminaTable2.name")
        .withRecoverIntervalTableName("$recoverIntervalTable2.name")
        .withRecoverValueTableName("$recoverValueTable2.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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.updateStaminaModelMaster(
        new Gs2Stamina.UpdateStaminaModelMasterRequest()
            .withNamespaceName('namespace1')
            .withStaminaName('stamina-0001')
            .withDescription('description1')
            .withMetadata('STAMINA_MODEL_MASTER_0001')
            .withRecoverIntervalMinutes(20)
            .withRecoverValue(2)
            .withInitialCapacity(60)
            .withIsOverflow(true)
            .withMaxCapacity(999)
            .withMaxStaminaTableName('$maxStaminaTable2.name')
            .withRecoverIntervalTableName('$recoverIntervalTable2.name')
            .withRecoverValueTableName('$recoverValueTable2.name')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_stamina_model_master(
        new stamina.UpdateStaminaModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_stamina_name('stamina-0001')
            .with_description('description1')
            .with_metadata('STAMINA_MODEL_MASTER_0001')
            .with_recover_interval_minutes(20)
            .with_recover_value(2)
            .with_initial_capacity(60)
            .with_is_overflow(True)
            .with_max_capacity(999)
            .with_max_stamina_table_name(self.max_stamina_table2.name)
            .with_recover_interval_table_name(self.recover_interval_table2.name)
            .with_recover_value_table_name(self.recover_value_table2.name)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.update_stamina_model_master({
    namespaceName='namespace1',
    staminaName='stamina-0001',
    description='description1',
    metadata='STAMINA_MODEL_MASTER_0001',
    recoverIntervalMinutes=20,
    recoverValue=2,
    initialCapacity=60,
    isOverflow=true,
    maxCapacity=999,
    maxStaminaTableName='$maxStaminaTable2.name',
    recoverIntervalTableName='$recoverIntervalTable2.name',
    recoverValueTableName='$recoverValueTable2.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文字 ネームスペース名
staminaName string ~ 128文字 スタミナの種類名
description string ~ 1024文字 説明文
metadata string ~ 128文字 メタデータ
recoverIntervalMinutes int ~ 9223372036854775807 スタミナを回復する速度(分)
recoverValue int 1 ~ 9223372036854775807 時間経過後に回復する量
initialCapacity int ~ 9223372036854775807 スタミナの最大値の初期値
isOverflow bool 最大値を超えて回復するか
maxCapacity int {isOverflow} ~ 9223372036854775807 溢れた状況での最大値
maxStaminaTableName string ~ 128文字 GS2-Experience のランクによって最大スタミナ値を決定するスタミナ最大値テーブル名
recoverIntervalTableName string ~ 128文字 GS2-Experience のランクによってスタミナの回復間隔を決定する回復間隔テーブル名
recoverValueTableName string ~ 128文字 GS2-Experience のランクによってスタミナの回復量を決定する回復量テーブル名

Result

説明
item StaminaModelMaster 更新したスタミナモデルマスター

deleteStaminaModelMaster

deleteStaminaModelMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DeleteStaminaModelMaster(
    &stamina.DeleteStaminaModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        StaminaName: pointy.String("stamina-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DeleteStaminaModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteStaminaModelMaster(
        (new DeleteStaminaModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withStaminaName('stamina-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DeleteStaminaModelMasterRequest;
import io.gs2.stamina.result.DeleteStaminaModelMasterResult;

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

try {
    DeleteStaminaModelMasterResult result = client.deleteStaminaModelMaster(
        new DeleteStaminaModelMasterRequest()
            .withNamespaceName("namespace1")
            .withStaminaName("stamina-0001")
    );
    StaminaModelMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DeleteStaminaModelMasterRequest;
using Gs2.Gs2Stamina.Result.DeleteStaminaModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteStaminaModelMaster(
    new DeleteStaminaModelMasterRequest()
        .withNamespaceName("namespace1")
        .withStaminaName("stamina-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.deleteStaminaModelMaster(
        new Gs2Stamina.DeleteStaminaModelMasterRequest()
            .withNamespaceName('namespace1')
            .withStaminaName('stamina-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.delete_stamina_model_master(
        new stamina.DeleteStaminaModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_stamina_name('stamina-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.delete_stamina_model_master({
    namespaceName='namespace1',
    staminaName='stamina-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文字 ネームスペース名
staminaName string ~ 128文字 スタミナの種類名

Result

説明
item StaminaModelMaster 削除したスタミナモデルマスター

describeMaxStaminaTableMasters

describeMaxStaminaTableMasters

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DescribeMaxStaminaTableMasters(
    &stamina.DescribeMaxStaminaTableMastersRequest {
        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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DescribeMaxStaminaTableMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeMaxStaminaTableMasters(
        (new DescribeMaxStaminaTableMastersRequest())
            ->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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DescribeMaxStaminaTableMastersRequest;
import io.gs2.stamina.result.DescribeMaxStaminaTableMastersResult;

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

try {
    DescribeMaxStaminaTableMastersResult result = client.describeMaxStaminaTableMasters(
        new DescribeMaxStaminaTableMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<MaxStaminaTableMaster> 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DescribeMaxStaminaTableMastersRequest;
using Gs2.Gs2Stamina.Result.DescribeMaxStaminaTableMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeMaxStaminaTableMasters(
    new DescribeMaxStaminaTableMastersRequest()
        .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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.describeMaxStaminaTableMasters(
        new Gs2Stamina.DescribeMaxStaminaTableMastersRequest()
            .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 stamina

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

try:
    result = client.describe_max_stamina_table_masters(
        new stamina.DescribeMaxStaminaTableMastersRequest()
            .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('stamina')

api_result = client.describe_max_stamina_table_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 MaxStaminaTableMaster[] スタミナの最大値テーブルマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createMaxStaminaTableMaster

createMaxStaminaTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.CreateMaxStaminaTableMaster(
    &stamina.CreateMaxStaminaTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("max-stamina-table-0001"),
        Description: nil,
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-0001"),
        Values: []int32{
            50,
        150,
        250,
        350,
        450,
        550,
        650,
        750,
        850,
        950,
        1050,
        1150,
        1250,
        1350,
        1450,
        1550,
        1650,
        1750,
        1850,
        1950,
        2050,
        2150,
        2250,
        2350,
        2450,
        2550,
        2650,
        2750,
        2850,
        2950,
        3050,
        3150,
        3250,
        3350,
        3450,
        3550,
        3650,
        3750,
        3850,
        3950,
        4050,
        4150,
        4250,
        4350,
        4450,
        4550,
        4650,
        4750,
        4850,
        4950,
        5050,
        5150,
        5250,
        5350,
        5450,
        5550,
        5650,
        5750,
        5850,
        5950,
        6050,
        6150,
        6250,
        6350,
        6450,
        6550,
        6650,
        6750,
        6850,
        6950,
        7050,
        7150,
        7250,
        7350,
        7450,
        7550,
        7650,
        7750,
        7850,
        7950,
        8050,
        8150,
        8250,
        8350,
        8450,
        8550,
        8650,
        8750,
        8850,
        8950,
        9050,
        9150,
        9250,
        9350,
        9450,
        9550,
        9650,
        9750,
        9850,
        9950,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\CreateMaxStaminaTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createMaxStaminaTableMaster(
        (new CreateMaxStaminaTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName('max-stamina-table-0001')
            ->withDescription(null)
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-0001')
            ->withValues([    50,
            150,
            250,
            350,
            450,
            550,
            650,
            750,
            850,
            950,
            1050,
            1150,
            1250,
            1350,
            1450,
            1550,
            1650,
            1750,
            1850,
            1950,
            2050,
            2150,
            2250,
            2350,
            2450,
            2550,
            2650,
            2750,
            2850,
            2950,
            3050,
            3150,
            3250,
            3350,
            3450,
            3550,
            3650,
            3750,
            3850,
            3950,
            4050,
            4150,
            4250,
            4350,
            4450,
            4550,
            4650,
            4750,
            4850,
            4950,
            5050,
            5150,
            5250,
            5350,
            5450,
            5550,
            5650,
            5750,
            5850,
            5950,
            6050,
            6150,
            6250,
            6350,
            6450,
            6550,
            6650,
            6750,
            6850,
            6950,
            7050,
            7150,
            7250,
            7350,
            7450,
            7550,
            7650,
            7750,
            7850,
            7950,
            8050,
            8150,
            8250,
            8350,
            8450,
            8550,
            8650,
            8750,
            8850,
            8950,
            9050,
            9150,
            9250,
            9350,
            9450,
            9550,
            9650,
            9750,
            9850,
            9950,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.CreateMaxStaminaTableMasterRequest;
import io.gs2.stamina.result.CreateMaxStaminaTableMasterResult;

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

try {
    CreateMaxStaminaTableMasterResult result = client.createMaxStaminaTableMaster(
        new CreateMaxStaminaTableMasterRequest()
            .withNamespaceName("namespace1")
            .withName("max-stamina-table-0001")
            .withDescription(null)
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-0001")
            .withValues(Arrays.asList(
                50,
            150,
            250,
            350,
            450,
            550,
            650,
            750,
            850,
            950,
            1050,
            1150,
            1250,
            1350,
            1450,
            1550,
            1650,
            1750,
            1850,
            1950,
            2050,
            2150,
            2250,
            2350,
            2450,
            2550,
            2650,
            2750,
            2850,
            2950,
            3050,
            3150,
            3250,
            3350,
            3450,
            3550,
            3650,
            3750,
            3850,
            3950,
            4050,
            4150,
            4250,
            4350,
            4450,
            4550,
            4650,
            4750,
            4850,
            4950,
            5050,
            5150,
            5250,
            5350,
            5450,
            5550,
            5650,
            5750,
            5850,
            5950,
            6050,
            6150,
            6250,
            6350,
            6450,
            6550,
            6650,
            6750,
            6850,
            6950,
            7050,
            7150,
            7250,
            7350,
            7450,
            7550,
            7650,
            7750,
            7850,
            7950,
            8050,
            8150,
            8250,
            8350,
            8450,
            8550,
            8650,
            8750,
            8850,
            8950,
            9050,
            9150,
            9250,
            9350,
            9450,
            9550,
            9650,
            9750,
            9850,
            9950
            ))
    );
    MaxStaminaTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.CreateMaxStaminaTableMasterRequest;
using Gs2.Gs2Stamina.Result.CreateMaxStaminaTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createMaxStaminaTableMaster(
    new CreateMaxStaminaTableMasterRequest()
        .withNamespaceName("namespace1")
        .withName("max-stamina-table-0001")
        .withDescription(null)
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-0001")
        .withValues(new int[] {
            50,
        150,
        250,
        350,
        450,
        550,
        650,
        750,
        850,
        950,
        1050,
        1150,
        1250,
        1350,
        1450,
        1550,
        1650,
        1750,
        1850,
        1950,
        2050,
        2150,
        2250,
        2350,
        2450,
        2550,
        2650,
        2750,
        2850,
        2950,
        3050,
        3150,
        3250,
        3350,
        3450,
        3550,
        3650,
        3750,
        3850,
        3950,
        4050,
        4150,
        4250,
        4350,
        4450,
        4550,
        4650,
        4750,
        4850,
        4950,
        5050,
        5150,
        5250,
        5350,
        5450,
        5550,
        5650,
        5750,
        5850,
        5950,
        6050,
        6150,
        6250,
        6350,
        6450,
        6550,
        6650,
        6750,
        6850,
        6950,
        7050,
        7150,
        7250,
        7350,
        7450,
        7550,
        7650,
        7750,
        7850,
        7950,
        8050,
        8150,
        8250,
        8350,
        8450,
        8550,
        8650,
        8750,
        8850,
        8950,
        9050,
        9150,
        9250,
        9350,
        9450,
        9550,
        9650,
        9750,
        9850,
        9950
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.createMaxStaminaTableMaster(
        new Gs2Stamina.CreateMaxStaminaTableMasterRequest()
            .withNamespaceName('namespace1')
            .withName('max-stamina-table-0001')
            .withDescription(undefined)
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-0001')
            .withValues([
                50,
            150,
            250,
            350,
            450,
            550,
            650,
            750,
            850,
            950,
            1050,
            1150,
            1250,
            1350,
            1450,
            1550,
            1650,
            1750,
            1850,
            1950,
            2050,
            2150,
            2250,
            2350,
            2450,
            2550,
            2650,
            2750,
            2850,
            2950,
            3050,
            3150,
            3250,
            3350,
            3450,
            3550,
            3650,
            3750,
            3850,
            3950,
            4050,
            4150,
            4250,
            4350,
            4450,
            4550,
            4650,
            4750,
            4850,
            4950,
            5050,
            5150,
            5250,
            5350,
            5450,
            5550,
            5650,
            5750,
            5850,
            5950,
            6050,
            6150,
            6250,
            6350,
            6450,
            6550,
            6650,
            6750,
            6850,
            6950,
            7050,
            7150,
            7250,
            7350,
            7450,
            7550,
            7650,
            7750,
            7850,
            7950,
            8050,
            8150,
            8250,
            8350,
            8450,
            8550,
            8650,
            8750,
            8850,
            8950,
            9050,
            9150,
            9250,
            9350,
            9450,
            9550,
            9650,
            9750,
            9850,
            9950
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_max_stamina_table_master(
        new stamina.CreateMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('max-stamina-table-0001')
            .with_description(None)
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-0001')
            .with_values([    50,
            150,
            250,
            350,
            450,
            550,
            650,
            750,
            850,
            950,
            1050,
            1150,
            1250,
            1350,
            1450,
            1550,
            1650,
            1750,
            1850,
            1950,
            2050,
            2150,
            2250,
            2350,
            2450,
            2550,
            2650,
            2750,
            2850,
            2950,
            3050,
            3150,
            3250,
            3350,
            3450,
            3550,
            3650,
            3750,
            3850,
            3950,
            4050,
            4150,
            4250,
            4350,
            4450,
            4550,
            4650,
            4750,
            4850,
            4950,
            5050,
            5150,
            5250,
            5350,
            5450,
            5550,
            5650,
            5750,
            5850,
            5950,
            6050,
            6150,
            6250,
            6350,
            6450,
            6550,
            6650,
            6750,
            6850,
            6950,
            7050,
            7150,
            7250,
            7350,
            7450,
            7550,
            7650,
            7750,
            7850,
            7950,
            8050,
            8150,
            8250,
            8350,
            8450,
            8550,
            8650,
            8750,
            8850,
            8950,
            9050,
            9150,
            9250,
            9350,
            9450,
            9550,
            9650,
            9750,
            9850,
            9950,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.create_max_stamina_table_master({
    namespaceName='namespace1',
    name='max-stamina-table-0001',
    description=nil,
    metadata=nil,
    experienceModelId='experienceModelId-0001',
    values={
        50,
    150,
    250,
    350,
    450,
    550,
    650,
    750,
    850,
    950,
    1050,
    1150,
    1250,
    1350,
    1450,
    1550,
    1650,
    1750,
    1850,
    1950,
    2050,
    2150,
    2250,
    2350,
    2450,
    2550,
    2650,
    2750,
    2850,
    2950,
    3050,
    3150,
    3250,
    3350,
    3450,
    3550,
    3650,
    3750,
    3850,
    3950,
    4050,
    4150,
    4250,
    4350,
    4450,
    4550,
    4650,
    4750,
    4850,
    4950,
    5050,
    5150,
    5250,
    5350,
    5450,
    5550,
    5650,
    5750,
    5850,
    5950,
    6050,
    6150,
    6250,
    6350,
    6450,
    6550,
    6650,
    6750,
    6850,
    6950,
    7050,
    7150,
    7250,
    7350,
    7450,
    7550,
    7650,
    7750,
    7850,
    7950,
    8050,
    8150,
    8250,
    8350,
    8450,
    8550,
    8650,
    8750,
    8850,
    8950,
    9050,
    9150,
    9250,
    9350,
    9450,
    9550,
    9650,
    9750,
    9850,
    9950
    },
});

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 ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナの最大値テーブル

Result

説明
item MaxStaminaTableMaster 作成したスタミナの最大値テーブルマスター

getMaxStaminaTableMaster

getMaxStaminaTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.GetMaxStaminaTableMaster(
    &stamina.GetMaxStaminaTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        MaxStaminaTableName: pointy.String("max-stamina-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\GetMaxStaminaTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getMaxStaminaTableMaster(
        (new GetMaxStaminaTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withMaxStaminaTableName('max-stamina-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.GetMaxStaminaTableMasterRequest;
import io.gs2.stamina.result.GetMaxStaminaTableMasterResult;

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

try {
    GetMaxStaminaTableMasterResult result = client.getMaxStaminaTableMaster(
        new GetMaxStaminaTableMasterRequest()
            .withNamespaceName("namespace1")
            .withMaxStaminaTableName("max-stamina-table-0001")
    );
    MaxStaminaTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.GetMaxStaminaTableMasterRequest;
using Gs2.Gs2Stamina.Result.GetMaxStaminaTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getMaxStaminaTableMaster(
    new GetMaxStaminaTableMasterRequest()
        .withNamespaceName("namespace1")
        .withMaxStaminaTableName("max-stamina-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.getMaxStaminaTableMaster(
        new Gs2Stamina.GetMaxStaminaTableMasterRequest()
            .withNamespaceName('namespace1')
            .withMaxStaminaTableName('max-stamina-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.get_max_stamina_table_master(
        new stamina.GetMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_max_stamina_table_name('max-stamina-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.get_max_stamina_table_master({
    namespaceName='namespace1',
    maxStaminaTableName='max-stamina-table-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文字 ネームスペース名
maxStaminaTableName string ~ 128文字 最大スタミナ値テーブル名

Result

説明
item MaxStaminaTableMaster スタミナの最大値テーブルマスター

updateMaxStaminaTableMaster

updateMaxStaminaTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateMaxStaminaTableMaster(
    &stamina.UpdateMaxStaminaTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        MaxStaminaTableName: pointy.String("max-stamina-table-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-1001"),
        Values: []int32{
            50,
        200,
        350,
        500,
        650,
        800,
        950,
        1100,
        1250,
        1400,
        1550,
        1700,
        1850,
        2000,
        2150,
        2300,
        2450,
        2600,
        2750,
        2900,
        3050,
        3200,
        3350,
        3500,
        3650,
        3800,
        3950,
        4100,
        4250,
        4400,
        4550,
        4700,
        4850,
        5000,
        5150,
        5300,
        5450,
        5600,
        5750,
        5900,
        6050,
        6200,
        6350,
        6500,
        6650,
        6800,
        6950,
        7100,
        7250,
        7400,
        7550,
        7700,
        7850,
        8000,
        8150,
        8300,
        8450,
        8600,
        8750,
        8900,
        9050,
        9200,
        9350,
        9500,
        9650,
        9800,
        9950,
        10100,
        10250,
        10400,
        10550,
        10700,
        10850,
        11000,
        11150,
        11300,
        11450,
        11600,
        11750,
        11900,
        12050,
        12200,
        12350,
        12500,
        12650,
        12800,
        12950,
        13100,
        13250,
        13400,
        13550,
        13700,
        13850,
        14000,
        14150,
        14300,
        14450,
        14600,
        14750,
        14900,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\UpdateMaxStaminaTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateMaxStaminaTableMaster(
        (new UpdateMaxStaminaTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withMaxStaminaTableName('max-stamina-table-0001')
            ->withDescription('description1')
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-1001')
            ->withValues([    50,
            200,
            350,
            500,
            650,
            800,
            950,
            1100,
            1250,
            1400,
            1550,
            1700,
            1850,
            2000,
            2150,
            2300,
            2450,
            2600,
            2750,
            2900,
            3050,
            3200,
            3350,
            3500,
            3650,
            3800,
            3950,
            4100,
            4250,
            4400,
            4550,
            4700,
            4850,
            5000,
            5150,
            5300,
            5450,
            5600,
            5750,
            5900,
            6050,
            6200,
            6350,
            6500,
            6650,
            6800,
            6950,
            7100,
            7250,
            7400,
            7550,
            7700,
            7850,
            8000,
            8150,
            8300,
            8450,
            8600,
            8750,
            8900,
            9050,
            9200,
            9350,
            9500,
            9650,
            9800,
            9950,
            10100,
            10250,
            10400,
            10550,
            10700,
            10850,
            11000,
            11150,
            11300,
            11450,
            11600,
            11750,
            11900,
            12050,
            12200,
            12350,
            12500,
            12650,
            12800,
            12950,
            13100,
            13250,
            13400,
            13550,
            13700,
            13850,
            14000,
            14150,
            14300,
            14450,
            14600,
            14750,
            14900,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateMaxStaminaTableMasterRequest;
import io.gs2.stamina.result.UpdateMaxStaminaTableMasterResult;

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

try {
    UpdateMaxStaminaTableMasterResult result = client.updateMaxStaminaTableMaster(
        new UpdateMaxStaminaTableMasterRequest()
            .withNamespaceName("namespace1")
            .withMaxStaminaTableName("max-stamina-table-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-1001")
            .withValues(Arrays.asList(
                50,
            200,
            350,
            500,
            650,
            800,
            950,
            1100,
            1250,
            1400,
            1550,
            1700,
            1850,
            2000,
            2150,
            2300,
            2450,
            2600,
            2750,
            2900,
            3050,
            3200,
            3350,
            3500,
            3650,
            3800,
            3950,
            4100,
            4250,
            4400,
            4550,
            4700,
            4850,
            5000,
            5150,
            5300,
            5450,
            5600,
            5750,
            5900,
            6050,
            6200,
            6350,
            6500,
            6650,
            6800,
            6950,
            7100,
            7250,
            7400,
            7550,
            7700,
            7850,
            8000,
            8150,
            8300,
            8450,
            8600,
            8750,
            8900,
            9050,
            9200,
            9350,
            9500,
            9650,
            9800,
            9950,
            10100,
            10250,
            10400,
            10550,
            10700,
            10850,
            11000,
            11150,
            11300,
            11450,
            11600,
            11750,
            11900,
            12050,
            12200,
            12350,
            12500,
            12650,
            12800,
            12950,
            13100,
            13250,
            13400,
            13550,
            13700,
            13850,
            14000,
            14150,
            14300,
            14450,
            14600,
            14750,
            14900
            ))
    );
    MaxStaminaTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.UpdateMaxStaminaTableMasterRequest;
using Gs2.Gs2Stamina.Result.UpdateMaxStaminaTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateMaxStaminaTableMaster(
    new UpdateMaxStaminaTableMasterRequest()
        .withNamespaceName("namespace1")
        .withMaxStaminaTableName("max-stamina-table-0001")
        .withDescription("description1")
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-1001")
        .withValues(new int[] {
            50,
        200,
        350,
        500,
        650,
        800,
        950,
        1100,
        1250,
        1400,
        1550,
        1700,
        1850,
        2000,
        2150,
        2300,
        2450,
        2600,
        2750,
        2900,
        3050,
        3200,
        3350,
        3500,
        3650,
        3800,
        3950,
        4100,
        4250,
        4400,
        4550,
        4700,
        4850,
        5000,
        5150,
        5300,
        5450,
        5600,
        5750,
        5900,
        6050,
        6200,
        6350,
        6500,
        6650,
        6800,
        6950,
        7100,
        7250,
        7400,
        7550,
        7700,
        7850,
        8000,
        8150,
        8300,
        8450,
        8600,
        8750,
        8900,
        9050,
        9200,
        9350,
        9500,
        9650,
        9800,
        9950,
        10100,
        10250,
        10400,
        10550,
        10700,
        10850,
        11000,
        11150,
        11300,
        11450,
        11600,
        11750,
        11900,
        12050,
        12200,
        12350,
        12500,
        12650,
        12800,
        12950,
        13100,
        13250,
        13400,
        13550,
        13700,
        13850,
        14000,
        14150,
        14300,
        14450,
        14600,
        14750,
        14900
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.updateMaxStaminaTableMaster(
        new Gs2Stamina.UpdateMaxStaminaTableMasterRequest()
            .withNamespaceName('namespace1')
            .withMaxStaminaTableName('max-stamina-table-0001')
            .withDescription('description1')
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-1001')
            .withValues([
                50,
            200,
            350,
            500,
            650,
            800,
            950,
            1100,
            1250,
            1400,
            1550,
            1700,
            1850,
            2000,
            2150,
            2300,
            2450,
            2600,
            2750,
            2900,
            3050,
            3200,
            3350,
            3500,
            3650,
            3800,
            3950,
            4100,
            4250,
            4400,
            4550,
            4700,
            4850,
            5000,
            5150,
            5300,
            5450,
            5600,
            5750,
            5900,
            6050,
            6200,
            6350,
            6500,
            6650,
            6800,
            6950,
            7100,
            7250,
            7400,
            7550,
            7700,
            7850,
            8000,
            8150,
            8300,
            8450,
            8600,
            8750,
            8900,
            9050,
            9200,
            9350,
            9500,
            9650,
            9800,
            9950,
            10100,
            10250,
            10400,
            10550,
            10700,
            10850,
            11000,
            11150,
            11300,
            11450,
            11600,
            11750,
            11900,
            12050,
            12200,
            12350,
            12500,
            12650,
            12800,
            12950,
            13100,
            13250,
            13400,
            13550,
            13700,
            13850,
            14000,
            14150,
            14300,
            14450,
            14600,
            14750,
            14900
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_max_stamina_table_master(
        new stamina.UpdateMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_max_stamina_table_name('max-stamina-table-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-1001')
            .with_values([    50,
            200,
            350,
            500,
            650,
            800,
            950,
            1100,
            1250,
            1400,
            1550,
            1700,
            1850,
            2000,
            2150,
            2300,
            2450,
            2600,
            2750,
            2900,
            3050,
            3200,
            3350,
            3500,
            3650,
            3800,
            3950,
            4100,
            4250,
            4400,
            4550,
            4700,
            4850,
            5000,
            5150,
            5300,
            5450,
            5600,
            5750,
            5900,
            6050,
            6200,
            6350,
            6500,
            6650,
            6800,
            6950,
            7100,
            7250,
            7400,
            7550,
            7700,
            7850,
            8000,
            8150,
            8300,
            8450,
            8600,
            8750,
            8900,
            9050,
            9200,
            9350,
            9500,
            9650,
            9800,
            9950,
            10100,
            10250,
            10400,
            10550,
            10700,
            10850,
            11000,
            11150,
            11300,
            11450,
            11600,
            11750,
            11900,
            12050,
            12200,
            12350,
            12500,
            12650,
            12800,
            12950,
            13100,
            13250,
            13400,
            13550,
            13700,
            13850,
            14000,
            14150,
            14300,
            14450,
            14600,
            14750,
            14900,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.update_max_stamina_table_master({
    namespaceName='namespace1',
    maxStaminaTableName='max-stamina-table-0001',
    description='description1',
    metadata=nil,
    experienceModelId='experienceModelId-1001',
    values={
        50,
    200,
    350,
    500,
    650,
    800,
    950,
    1100,
    1250,
    1400,
    1550,
    1700,
    1850,
    2000,
    2150,
    2300,
    2450,
    2600,
    2750,
    2900,
    3050,
    3200,
    3350,
    3500,
    3650,
    3800,
    3950,
    4100,
    4250,
    4400,
    4550,
    4700,
    4850,
    5000,
    5150,
    5300,
    5450,
    5600,
    5750,
    5900,
    6050,
    6200,
    6350,
    6500,
    6650,
    6800,
    6950,
    7100,
    7250,
    7400,
    7550,
    7700,
    7850,
    8000,
    8150,
    8300,
    8450,
    8600,
    8750,
    8900,
    9050,
    9200,
    9350,
    9500,
    9650,
    9800,
    9950,
    10100,
    10250,
    10400,
    10550,
    10700,
    10850,
    11000,
    11150,
    11300,
    11450,
    11600,
    11750,
    11900,
    12050,
    12200,
    12350,
    12500,
    12650,
    12800,
    12950,
    13100,
    13250,
    13400,
    13550,
    13700,
    13850,
    14000,
    14150,
    14300,
    14450,
    14600,
    14750,
    14900
    },
});

if(api_result.isError) then
    # エラー発生時
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

スタミナの最大値テーブルマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
maxStaminaTableName string ~ 128文字 最大スタミナ値テーブル名
description string ~ 1024文字 説明文
metadata string ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナの最大値テーブル

Result

説明
item MaxStaminaTableMaster 更新したスタミナの最大値テーブルマスター

deleteMaxStaminaTableMaster

deleteMaxStaminaTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DeleteMaxStaminaTableMaster(
    &stamina.DeleteMaxStaminaTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        MaxStaminaTableName: pointy.String("max-stamina-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DeleteMaxStaminaTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteMaxStaminaTableMaster(
        (new DeleteMaxStaminaTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withMaxStaminaTableName('max-stamina-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DeleteMaxStaminaTableMasterRequest;
import io.gs2.stamina.result.DeleteMaxStaminaTableMasterResult;

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

try {
    DeleteMaxStaminaTableMasterResult result = client.deleteMaxStaminaTableMaster(
        new DeleteMaxStaminaTableMasterRequest()
            .withNamespaceName("namespace1")
            .withMaxStaminaTableName("max-stamina-table-0001")
    );
    MaxStaminaTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DeleteMaxStaminaTableMasterRequest;
using Gs2.Gs2Stamina.Result.DeleteMaxStaminaTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteMaxStaminaTableMaster(
    new DeleteMaxStaminaTableMasterRequest()
        .withNamespaceName("namespace1")
        .withMaxStaminaTableName("max-stamina-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.deleteMaxStaminaTableMaster(
        new Gs2Stamina.DeleteMaxStaminaTableMasterRequest()
            .withNamespaceName('namespace1')
            .withMaxStaminaTableName('max-stamina-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.delete_max_stamina_table_master(
        new stamina.DeleteMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_max_stamina_table_name('max-stamina-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.delete_max_stamina_table_master({
    namespaceName='namespace1',
    maxStaminaTableName='max-stamina-table-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文字 ネームスペース名
maxStaminaTableName string ~ 128文字 最大スタミナ値テーブル名

Result

説明
item MaxStaminaTableMaster 削除したスタミナの最大値テーブルマスター

describeRecoverIntervalTableMasters

describeRecoverIntervalTableMasters

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DescribeRecoverIntervalTableMasters(
    &stamina.DescribeRecoverIntervalTableMastersRequest {
        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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DescribeRecoverIntervalTableMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeRecoverIntervalTableMasters(
        (new DescribeRecoverIntervalTableMastersRequest())
            ->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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DescribeRecoverIntervalTableMastersRequest;
import io.gs2.stamina.result.DescribeRecoverIntervalTableMastersResult;

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

try {
    DescribeRecoverIntervalTableMastersResult result = client.describeRecoverIntervalTableMasters(
        new DescribeRecoverIntervalTableMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<RecoverIntervalTableMaster> 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DescribeRecoverIntervalTableMastersRequest;
using Gs2.Gs2Stamina.Result.DescribeRecoverIntervalTableMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeRecoverIntervalTableMasters(
    new DescribeRecoverIntervalTableMastersRequest()
        .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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.describeRecoverIntervalTableMasters(
        new Gs2Stamina.DescribeRecoverIntervalTableMastersRequest()
            .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 stamina

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

try:
    result = client.describe_recover_interval_table_masters(
        new stamina.DescribeRecoverIntervalTableMastersRequest()
            .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('stamina')

api_result = client.describe_recover_interval_table_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 RecoverIntervalTableMaster[] スタミナ回復間隔テーブルマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createRecoverIntervalTableMaster

createRecoverIntervalTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.CreateRecoverIntervalTableMaster(
    &stamina.CreateRecoverIntervalTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("recover-interval-table-0001"),
        Description: nil,
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-0001"),
        Values: []int32{
            40,
        140,
        240,
        340,
        440,
        540,
        640,
        740,
        840,
        940,
        1040,
        1140,
        1240,
        1340,
        1440,
        1540,
        1640,
        1740,
        1840,
        1940,
        2040,
        2140,
        2240,
        2340,
        2440,
        2540,
        2640,
        2740,
        2840,
        2940,
        3040,
        3140,
        3240,
        3340,
        3440,
        3540,
        3640,
        3740,
        3840,
        3940,
        4040,
        4140,
        4240,
        4340,
        4440,
        4540,
        4640,
        4740,
        4840,
        4940,
        5040,
        5140,
        5240,
        5340,
        5440,
        5540,
        5640,
        5740,
        5840,
        5940,
        6040,
        6140,
        6240,
        6340,
        6440,
        6540,
        6640,
        6740,
        6840,
        6940,
        7040,
        7140,
        7240,
        7340,
        7440,
        7540,
        7640,
        7740,
        7840,
        7940,
        8040,
        8140,
        8240,
        8340,
        8440,
        8540,
        8640,
        8740,
        8840,
        8940,
        9040,
        9140,
        9240,
        9340,
        9440,
        9540,
        9640,
        9740,
        9840,
        9940,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\CreateRecoverIntervalTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createRecoverIntervalTableMaster(
        (new CreateRecoverIntervalTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName('recover-interval-table-0001')
            ->withDescription(null)
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-0001')
            ->withValues([    40,
            140,
            240,
            340,
            440,
            540,
            640,
            740,
            840,
            940,
            1040,
            1140,
            1240,
            1340,
            1440,
            1540,
            1640,
            1740,
            1840,
            1940,
            2040,
            2140,
            2240,
            2340,
            2440,
            2540,
            2640,
            2740,
            2840,
            2940,
            3040,
            3140,
            3240,
            3340,
            3440,
            3540,
            3640,
            3740,
            3840,
            3940,
            4040,
            4140,
            4240,
            4340,
            4440,
            4540,
            4640,
            4740,
            4840,
            4940,
            5040,
            5140,
            5240,
            5340,
            5440,
            5540,
            5640,
            5740,
            5840,
            5940,
            6040,
            6140,
            6240,
            6340,
            6440,
            6540,
            6640,
            6740,
            6840,
            6940,
            7040,
            7140,
            7240,
            7340,
            7440,
            7540,
            7640,
            7740,
            7840,
            7940,
            8040,
            8140,
            8240,
            8340,
            8440,
            8540,
            8640,
            8740,
            8840,
            8940,
            9040,
            9140,
            9240,
            9340,
            9440,
            9540,
            9640,
            9740,
            9840,
            9940,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.CreateRecoverIntervalTableMasterRequest;
import io.gs2.stamina.result.CreateRecoverIntervalTableMasterResult;

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

try {
    CreateRecoverIntervalTableMasterResult result = client.createRecoverIntervalTableMaster(
        new CreateRecoverIntervalTableMasterRequest()
            .withNamespaceName("namespace1")
            .withName("recover-interval-table-0001")
            .withDescription(null)
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-0001")
            .withValues(Arrays.asList(
                40,
            140,
            240,
            340,
            440,
            540,
            640,
            740,
            840,
            940,
            1040,
            1140,
            1240,
            1340,
            1440,
            1540,
            1640,
            1740,
            1840,
            1940,
            2040,
            2140,
            2240,
            2340,
            2440,
            2540,
            2640,
            2740,
            2840,
            2940,
            3040,
            3140,
            3240,
            3340,
            3440,
            3540,
            3640,
            3740,
            3840,
            3940,
            4040,
            4140,
            4240,
            4340,
            4440,
            4540,
            4640,
            4740,
            4840,
            4940,
            5040,
            5140,
            5240,
            5340,
            5440,
            5540,
            5640,
            5740,
            5840,
            5940,
            6040,
            6140,
            6240,
            6340,
            6440,
            6540,
            6640,
            6740,
            6840,
            6940,
            7040,
            7140,
            7240,
            7340,
            7440,
            7540,
            7640,
            7740,
            7840,
            7940,
            8040,
            8140,
            8240,
            8340,
            8440,
            8540,
            8640,
            8740,
            8840,
            8940,
            9040,
            9140,
            9240,
            9340,
            9440,
            9540,
            9640,
            9740,
            9840,
            9940
            ))
    );
    RecoverIntervalTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.CreateRecoverIntervalTableMasterRequest;
using Gs2.Gs2Stamina.Result.CreateRecoverIntervalTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createRecoverIntervalTableMaster(
    new CreateRecoverIntervalTableMasterRequest()
        .withNamespaceName("namespace1")
        .withName("recover-interval-table-0001")
        .withDescription(null)
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-0001")
        .withValues(new int[] {
            40,
        140,
        240,
        340,
        440,
        540,
        640,
        740,
        840,
        940,
        1040,
        1140,
        1240,
        1340,
        1440,
        1540,
        1640,
        1740,
        1840,
        1940,
        2040,
        2140,
        2240,
        2340,
        2440,
        2540,
        2640,
        2740,
        2840,
        2940,
        3040,
        3140,
        3240,
        3340,
        3440,
        3540,
        3640,
        3740,
        3840,
        3940,
        4040,
        4140,
        4240,
        4340,
        4440,
        4540,
        4640,
        4740,
        4840,
        4940,
        5040,
        5140,
        5240,
        5340,
        5440,
        5540,
        5640,
        5740,
        5840,
        5940,
        6040,
        6140,
        6240,
        6340,
        6440,
        6540,
        6640,
        6740,
        6840,
        6940,
        7040,
        7140,
        7240,
        7340,
        7440,
        7540,
        7640,
        7740,
        7840,
        7940,
        8040,
        8140,
        8240,
        8340,
        8440,
        8540,
        8640,
        8740,
        8840,
        8940,
        9040,
        9140,
        9240,
        9340,
        9440,
        9540,
        9640,
        9740,
        9840,
        9940
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.createRecoverIntervalTableMaster(
        new Gs2Stamina.CreateRecoverIntervalTableMasterRequest()
            .withNamespaceName('namespace1')
            .withName('recover-interval-table-0001')
            .withDescription(undefined)
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-0001')
            .withValues([
                40,
            140,
            240,
            340,
            440,
            540,
            640,
            740,
            840,
            940,
            1040,
            1140,
            1240,
            1340,
            1440,
            1540,
            1640,
            1740,
            1840,
            1940,
            2040,
            2140,
            2240,
            2340,
            2440,
            2540,
            2640,
            2740,
            2840,
            2940,
            3040,
            3140,
            3240,
            3340,
            3440,
            3540,
            3640,
            3740,
            3840,
            3940,
            4040,
            4140,
            4240,
            4340,
            4440,
            4540,
            4640,
            4740,
            4840,
            4940,
            5040,
            5140,
            5240,
            5340,
            5440,
            5540,
            5640,
            5740,
            5840,
            5940,
            6040,
            6140,
            6240,
            6340,
            6440,
            6540,
            6640,
            6740,
            6840,
            6940,
            7040,
            7140,
            7240,
            7340,
            7440,
            7540,
            7640,
            7740,
            7840,
            7940,
            8040,
            8140,
            8240,
            8340,
            8440,
            8540,
            8640,
            8740,
            8840,
            8940,
            9040,
            9140,
            9240,
            9340,
            9440,
            9540,
            9640,
            9740,
            9840,
            9940
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_recover_interval_table_master(
        new stamina.CreateRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('recover-interval-table-0001')
            .with_description(None)
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-0001')
            .with_values([    40,
            140,
            240,
            340,
            440,
            540,
            640,
            740,
            840,
            940,
            1040,
            1140,
            1240,
            1340,
            1440,
            1540,
            1640,
            1740,
            1840,
            1940,
            2040,
            2140,
            2240,
            2340,
            2440,
            2540,
            2640,
            2740,
            2840,
            2940,
            3040,
            3140,
            3240,
            3340,
            3440,
            3540,
            3640,
            3740,
            3840,
            3940,
            4040,
            4140,
            4240,
            4340,
            4440,
            4540,
            4640,
            4740,
            4840,
            4940,
            5040,
            5140,
            5240,
            5340,
            5440,
            5540,
            5640,
            5740,
            5840,
            5940,
            6040,
            6140,
            6240,
            6340,
            6440,
            6540,
            6640,
            6740,
            6840,
            6940,
            7040,
            7140,
            7240,
            7340,
            7440,
            7540,
            7640,
            7740,
            7840,
            7940,
            8040,
            8140,
            8240,
            8340,
            8440,
            8540,
            8640,
            8740,
            8840,
            8940,
            9040,
            9140,
            9240,
            9340,
            9440,
            9540,
            9640,
            9740,
            9840,
            9940,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.create_recover_interval_table_master({
    namespaceName='namespace1',
    name='recover-interval-table-0001',
    description=nil,
    metadata=nil,
    experienceModelId='experienceModelId-0001',
    values={
        40,
    140,
    240,
    340,
    440,
    540,
    640,
    740,
    840,
    940,
    1040,
    1140,
    1240,
    1340,
    1440,
    1540,
    1640,
    1740,
    1840,
    1940,
    2040,
    2140,
    2240,
    2340,
    2440,
    2540,
    2640,
    2740,
    2840,
    2940,
    3040,
    3140,
    3240,
    3340,
    3440,
    3540,
    3640,
    3740,
    3840,
    3940,
    4040,
    4140,
    4240,
    4340,
    4440,
    4540,
    4640,
    4740,
    4840,
    4940,
    5040,
    5140,
    5240,
    5340,
    5440,
    5540,
    5640,
    5740,
    5840,
    5940,
    6040,
    6140,
    6240,
    6340,
    6440,
    6540,
    6640,
    6740,
    6840,
    6940,
    7040,
    7140,
    7240,
    7340,
    7440,
    7540,
    7640,
    7740,
    7840,
    7940,
    8040,
    8140,
    8240,
    8340,
    8440,
    8540,
    8640,
    8740,
    8840,
    8940,
    9040,
    9140,
    9240,
    9340,
    9440,
    9540,
    9640,
    9740,
    9840,
    9940
    },
});

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 ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復間隔テーブル

Result

説明
item RecoverIntervalTableMaster 作成したスタミナ回復間隔テーブルマスター

getRecoverIntervalTableMaster

getRecoverIntervalTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.GetRecoverIntervalTableMaster(
    &stamina.GetRecoverIntervalTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverIntervalTableName: pointy.String("recover-interval-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\GetRecoverIntervalTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getRecoverIntervalTableMaster(
        (new GetRecoverIntervalTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverIntervalTableName('recover-interval-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.GetRecoverIntervalTableMasterRequest;
import io.gs2.stamina.result.GetRecoverIntervalTableMasterResult;

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

try {
    GetRecoverIntervalTableMasterResult result = client.getRecoverIntervalTableMaster(
        new GetRecoverIntervalTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverIntervalTableName("recover-interval-table-0001")
    );
    RecoverIntervalTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.GetRecoverIntervalTableMasterRequest;
using Gs2.Gs2Stamina.Result.GetRecoverIntervalTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getRecoverIntervalTableMaster(
    new GetRecoverIntervalTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverIntervalTableName("recover-interval-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.getRecoverIntervalTableMaster(
        new Gs2Stamina.GetRecoverIntervalTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverIntervalTableName('recover-interval-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.get_recover_interval_table_master(
        new stamina.GetRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_interval_table_name('recover-interval-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.get_recover_interval_table_master({
    namespaceName='namespace1',
    recoverIntervalTableName='recover-interval-table-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文字 ネームスペース名
recoverIntervalTableName string ~ 128文字 スタミナ回復間隔テーブル名

Result

説明
item RecoverIntervalTableMaster スタミナ回復間隔テーブルマスター

updateRecoverIntervalTableMaster

updateRecoverIntervalTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateRecoverIntervalTableMaster(
    &stamina.UpdateRecoverIntervalTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverIntervalTableName: pointy.String("recover-interval-table-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-1001"),
        Values: []int32{
            40,
        190,
        340,
        490,
        640,
        790,
        940,
        1090,
        1240,
        1390,
        1540,
        1690,
        1840,
        1990,
        2140,
        2290,
        2440,
        2590,
        2740,
        2890,
        3040,
        3190,
        3340,
        3490,
        3640,
        3790,
        3940,
        4090,
        4240,
        4390,
        4540,
        4690,
        4840,
        4990,
        5140,
        5290,
        5440,
        5590,
        5740,
        5890,
        6040,
        6190,
        6340,
        6490,
        6640,
        6790,
        6940,
        7090,
        7240,
        7390,
        7540,
        7690,
        7840,
        7990,
        8140,
        8290,
        8440,
        8590,
        8740,
        8890,
        9040,
        9190,
        9340,
        9490,
        9640,
        9790,
        9940,
        10090,
        10240,
        10390,
        10540,
        10690,
        10840,
        10990,
        11140,
        11290,
        11440,
        11590,
        11740,
        11890,
        12040,
        12190,
        12340,
        12490,
        12640,
        12790,
        12940,
        13090,
        13240,
        13390,
        13540,
        13690,
        13840,
        13990,
        14140,
        14290,
        14440,
        14590,
        14740,
        14890,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\UpdateRecoverIntervalTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateRecoverIntervalTableMaster(
        (new UpdateRecoverIntervalTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverIntervalTableName('recover-interval-table-0001')
            ->withDescription('description1')
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-1001')
            ->withValues([    40,
            190,
            340,
            490,
            640,
            790,
            940,
            1090,
            1240,
            1390,
            1540,
            1690,
            1840,
            1990,
            2140,
            2290,
            2440,
            2590,
            2740,
            2890,
            3040,
            3190,
            3340,
            3490,
            3640,
            3790,
            3940,
            4090,
            4240,
            4390,
            4540,
            4690,
            4840,
            4990,
            5140,
            5290,
            5440,
            5590,
            5740,
            5890,
            6040,
            6190,
            6340,
            6490,
            6640,
            6790,
            6940,
            7090,
            7240,
            7390,
            7540,
            7690,
            7840,
            7990,
            8140,
            8290,
            8440,
            8590,
            8740,
            8890,
            9040,
            9190,
            9340,
            9490,
            9640,
            9790,
            9940,
            10090,
            10240,
            10390,
            10540,
            10690,
            10840,
            10990,
            11140,
            11290,
            11440,
            11590,
            11740,
            11890,
            12040,
            12190,
            12340,
            12490,
            12640,
            12790,
            12940,
            13090,
            13240,
            13390,
            13540,
            13690,
            13840,
            13990,
            14140,
            14290,
            14440,
            14590,
            14740,
            14890,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateRecoverIntervalTableMasterRequest;
import io.gs2.stamina.result.UpdateRecoverIntervalTableMasterResult;

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

try {
    UpdateRecoverIntervalTableMasterResult result = client.updateRecoverIntervalTableMaster(
        new UpdateRecoverIntervalTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverIntervalTableName("recover-interval-table-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-1001")
            .withValues(Arrays.asList(
                40,
            190,
            340,
            490,
            640,
            790,
            940,
            1090,
            1240,
            1390,
            1540,
            1690,
            1840,
            1990,
            2140,
            2290,
            2440,
            2590,
            2740,
            2890,
            3040,
            3190,
            3340,
            3490,
            3640,
            3790,
            3940,
            4090,
            4240,
            4390,
            4540,
            4690,
            4840,
            4990,
            5140,
            5290,
            5440,
            5590,
            5740,
            5890,
            6040,
            6190,
            6340,
            6490,
            6640,
            6790,
            6940,
            7090,
            7240,
            7390,
            7540,
            7690,
            7840,
            7990,
            8140,
            8290,
            8440,
            8590,
            8740,
            8890,
            9040,
            9190,
            9340,
            9490,
            9640,
            9790,
            9940,
            10090,
            10240,
            10390,
            10540,
            10690,
            10840,
            10990,
            11140,
            11290,
            11440,
            11590,
            11740,
            11890,
            12040,
            12190,
            12340,
            12490,
            12640,
            12790,
            12940,
            13090,
            13240,
            13390,
            13540,
            13690,
            13840,
            13990,
            14140,
            14290,
            14440,
            14590,
            14740,
            14890
            ))
    );
    RecoverIntervalTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.UpdateRecoverIntervalTableMasterRequest;
using Gs2.Gs2Stamina.Result.UpdateRecoverIntervalTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateRecoverIntervalTableMaster(
    new UpdateRecoverIntervalTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverIntervalTableName("recover-interval-table-0001")
        .withDescription("description1")
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-1001")
        .withValues(new int[] {
            40,
        190,
        340,
        490,
        640,
        790,
        940,
        1090,
        1240,
        1390,
        1540,
        1690,
        1840,
        1990,
        2140,
        2290,
        2440,
        2590,
        2740,
        2890,
        3040,
        3190,
        3340,
        3490,
        3640,
        3790,
        3940,
        4090,
        4240,
        4390,
        4540,
        4690,
        4840,
        4990,
        5140,
        5290,
        5440,
        5590,
        5740,
        5890,
        6040,
        6190,
        6340,
        6490,
        6640,
        6790,
        6940,
        7090,
        7240,
        7390,
        7540,
        7690,
        7840,
        7990,
        8140,
        8290,
        8440,
        8590,
        8740,
        8890,
        9040,
        9190,
        9340,
        9490,
        9640,
        9790,
        9940,
        10090,
        10240,
        10390,
        10540,
        10690,
        10840,
        10990,
        11140,
        11290,
        11440,
        11590,
        11740,
        11890,
        12040,
        12190,
        12340,
        12490,
        12640,
        12790,
        12940,
        13090,
        13240,
        13390,
        13540,
        13690,
        13840,
        13990,
        14140,
        14290,
        14440,
        14590,
        14740,
        14890
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.updateRecoverIntervalTableMaster(
        new Gs2Stamina.UpdateRecoverIntervalTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverIntervalTableName('recover-interval-table-0001')
            .withDescription('description1')
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-1001')
            .withValues([
                40,
            190,
            340,
            490,
            640,
            790,
            940,
            1090,
            1240,
            1390,
            1540,
            1690,
            1840,
            1990,
            2140,
            2290,
            2440,
            2590,
            2740,
            2890,
            3040,
            3190,
            3340,
            3490,
            3640,
            3790,
            3940,
            4090,
            4240,
            4390,
            4540,
            4690,
            4840,
            4990,
            5140,
            5290,
            5440,
            5590,
            5740,
            5890,
            6040,
            6190,
            6340,
            6490,
            6640,
            6790,
            6940,
            7090,
            7240,
            7390,
            7540,
            7690,
            7840,
            7990,
            8140,
            8290,
            8440,
            8590,
            8740,
            8890,
            9040,
            9190,
            9340,
            9490,
            9640,
            9790,
            9940,
            10090,
            10240,
            10390,
            10540,
            10690,
            10840,
            10990,
            11140,
            11290,
            11440,
            11590,
            11740,
            11890,
            12040,
            12190,
            12340,
            12490,
            12640,
            12790,
            12940,
            13090,
            13240,
            13390,
            13540,
            13690,
            13840,
            13990,
            14140,
            14290,
            14440,
            14590,
            14740,
            14890
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_recover_interval_table_master(
        new stamina.UpdateRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_interval_table_name('recover-interval-table-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-1001')
            .with_values([    40,
            190,
            340,
            490,
            640,
            790,
            940,
            1090,
            1240,
            1390,
            1540,
            1690,
            1840,
            1990,
            2140,
            2290,
            2440,
            2590,
            2740,
            2890,
            3040,
            3190,
            3340,
            3490,
            3640,
            3790,
            3940,
            4090,
            4240,
            4390,
            4540,
            4690,
            4840,
            4990,
            5140,
            5290,
            5440,
            5590,
            5740,
            5890,
            6040,
            6190,
            6340,
            6490,
            6640,
            6790,
            6940,
            7090,
            7240,
            7390,
            7540,
            7690,
            7840,
            7990,
            8140,
            8290,
            8440,
            8590,
            8740,
            8890,
            9040,
            9190,
            9340,
            9490,
            9640,
            9790,
            9940,
            10090,
            10240,
            10390,
            10540,
            10690,
            10840,
            10990,
            11140,
            11290,
            11440,
            11590,
            11740,
            11890,
            12040,
            12190,
            12340,
            12490,
            12640,
            12790,
            12940,
            13090,
            13240,
            13390,
            13540,
            13690,
            13840,
            13990,
            14140,
            14290,
            14440,
            14590,
            14740,
            14890,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.update_recover_interval_table_master({
    namespaceName='namespace1',
    recoverIntervalTableName='recover-interval-table-0001',
    description='description1',
    metadata=nil,
    experienceModelId='experienceModelId-1001',
    values={
        40,
    190,
    340,
    490,
    640,
    790,
    940,
    1090,
    1240,
    1390,
    1540,
    1690,
    1840,
    1990,
    2140,
    2290,
    2440,
    2590,
    2740,
    2890,
    3040,
    3190,
    3340,
    3490,
    3640,
    3790,
    3940,
    4090,
    4240,
    4390,
    4540,
    4690,
    4840,
    4990,
    5140,
    5290,
    5440,
    5590,
    5740,
    5890,
    6040,
    6190,
    6340,
    6490,
    6640,
    6790,
    6940,
    7090,
    7240,
    7390,
    7540,
    7690,
    7840,
    7990,
    8140,
    8290,
    8440,
    8590,
    8740,
    8890,
    9040,
    9190,
    9340,
    9490,
    9640,
    9790,
    9940,
    10090,
    10240,
    10390,
    10540,
    10690,
    10840,
    10990,
    11140,
    11290,
    11440,
    11590,
    11740,
    11890,
    12040,
    12190,
    12340,
    12490,
    12640,
    12790,
    12940,
    13090,
    13240,
    13390,
    13540,
    13690,
    13840,
    13990,
    14140,
    14290,
    14440,
    14590,
    14740,
    14890
    },
});

if(api_result.isError) then
    # エラー発生時
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

スタミナ回復間隔テーブルマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
recoverIntervalTableName string ~ 128文字 スタミナ回復間隔テーブル名
description string ~ 1024文字 説明文
metadata string ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復間隔テーブル

Result

説明
item RecoverIntervalTableMaster 更新したスタミナ回復間隔テーブルマスター

deleteRecoverIntervalTableMaster

deleteRecoverIntervalTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DeleteRecoverIntervalTableMaster(
    &stamina.DeleteRecoverIntervalTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverIntervalTableName: pointy.String("recover-interval-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DeleteRecoverIntervalTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteRecoverIntervalTableMaster(
        (new DeleteRecoverIntervalTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverIntervalTableName('recover-interval-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DeleteRecoverIntervalTableMasterRequest;
import io.gs2.stamina.result.DeleteRecoverIntervalTableMasterResult;

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

try {
    DeleteRecoverIntervalTableMasterResult result = client.deleteRecoverIntervalTableMaster(
        new DeleteRecoverIntervalTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverIntervalTableName("recover-interval-table-0001")
    );
    RecoverIntervalTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DeleteRecoverIntervalTableMasterRequest;
using Gs2.Gs2Stamina.Result.DeleteRecoverIntervalTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteRecoverIntervalTableMaster(
    new DeleteRecoverIntervalTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverIntervalTableName("recover-interval-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.deleteRecoverIntervalTableMaster(
        new Gs2Stamina.DeleteRecoverIntervalTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverIntervalTableName('recover-interval-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.delete_recover_interval_table_master(
        new stamina.DeleteRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_interval_table_name('recover-interval-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.delete_recover_interval_table_master({
    namespaceName='namespace1',
    recoverIntervalTableName='recover-interval-table-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文字 ネームスペース名
recoverIntervalTableName string ~ 128文字 スタミナ回復間隔テーブル名

Result

説明
item RecoverIntervalTableMaster 削除したスタミナ回復間隔テーブルマスター

describeRecoverValueTableMasters

describeRecoverValueTableMasters

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DescribeRecoverValueTableMasters(
    &stamina.DescribeRecoverValueTableMastersRequest {
        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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DescribeRecoverValueTableMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeRecoverValueTableMasters(
        (new DescribeRecoverValueTableMastersRequest())
            ->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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DescribeRecoverValueTableMastersRequest;
import io.gs2.stamina.result.DescribeRecoverValueTableMastersResult;

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

try {
    DescribeRecoverValueTableMastersResult result = client.describeRecoverValueTableMasters(
        new DescribeRecoverValueTableMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<RecoverValueTableMaster> 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DescribeRecoverValueTableMastersRequest;
using Gs2.Gs2Stamina.Result.DescribeRecoverValueTableMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeRecoverValueTableMasters(
    new DescribeRecoverValueTableMastersRequest()
        .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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.describeRecoverValueTableMasters(
        new Gs2Stamina.DescribeRecoverValueTableMastersRequest()
            .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 stamina

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

try:
    result = client.describe_recover_value_table_masters(
        new stamina.DescribeRecoverValueTableMastersRequest()
            .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('stamina')

api_result = client.describe_recover_value_table_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 RecoverValueTableMaster[] スタミナ回復量テーブルマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createRecoverValueTableMaster

createRecoverValueTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.CreateRecoverValueTableMaster(
    &stamina.CreateRecoverValueTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("recover-value-table-0001"),
        Description: nil,
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-0001"),
        Values: []int32{
            30,
        130,
        230,
        330,
        430,
        530,
        630,
        730,
        830,
        930,
        1030,
        1130,
        1230,
        1330,
        1430,
        1530,
        1630,
        1730,
        1830,
        1930,
        2030,
        2130,
        2230,
        2330,
        2430,
        2530,
        2630,
        2730,
        2830,
        2930,
        3030,
        3130,
        3230,
        3330,
        3430,
        3530,
        3630,
        3730,
        3830,
        3930,
        4030,
        4130,
        4230,
        4330,
        4430,
        4530,
        4630,
        4730,
        4830,
        4930,
        5030,
        5130,
        5230,
        5330,
        5430,
        5530,
        5630,
        5730,
        5830,
        5930,
        6030,
        6130,
        6230,
        6330,
        6430,
        6530,
        6630,
        6730,
        6830,
        6930,
        7030,
        7130,
        7230,
        7330,
        7430,
        7530,
        7630,
        7730,
        7830,
        7930,
        8030,
        8130,
        8230,
        8330,
        8430,
        8530,
        8630,
        8730,
        8830,
        8930,
        9030,
        9130,
        9230,
        9330,
        9430,
        9530,
        9630,
        9730,
        9830,
        9930,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\CreateRecoverValueTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createRecoverValueTableMaster(
        (new CreateRecoverValueTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName('recover-value-table-0001')
            ->withDescription(null)
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-0001')
            ->withValues([    30,
            130,
            230,
            330,
            430,
            530,
            630,
            730,
            830,
            930,
            1030,
            1130,
            1230,
            1330,
            1430,
            1530,
            1630,
            1730,
            1830,
            1930,
            2030,
            2130,
            2230,
            2330,
            2430,
            2530,
            2630,
            2730,
            2830,
            2930,
            3030,
            3130,
            3230,
            3330,
            3430,
            3530,
            3630,
            3730,
            3830,
            3930,
            4030,
            4130,
            4230,
            4330,
            4430,
            4530,
            4630,
            4730,
            4830,
            4930,
            5030,
            5130,
            5230,
            5330,
            5430,
            5530,
            5630,
            5730,
            5830,
            5930,
            6030,
            6130,
            6230,
            6330,
            6430,
            6530,
            6630,
            6730,
            6830,
            6930,
            7030,
            7130,
            7230,
            7330,
            7430,
            7530,
            7630,
            7730,
            7830,
            7930,
            8030,
            8130,
            8230,
            8330,
            8430,
            8530,
            8630,
            8730,
            8830,
            8930,
            9030,
            9130,
            9230,
            9330,
            9430,
            9530,
            9630,
            9730,
            9830,
            9930,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.CreateRecoverValueTableMasterRequest;
import io.gs2.stamina.result.CreateRecoverValueTableMasterResult;

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

try {
    CreateRecoverValueTableMasterResult result = client.createRecoverValueTableMaster(
        new CreateRecoverValueTableMasterRequest()
            .withNamespaceName("namespace1")
            .withName("recover-value-table-0001")
            .withDescription(null)
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-0001")
            .withValues(Arrays.asList(
                30,
            130,
            230,
            330,
            430,
            530,
            630,
            730,
            830,
            930,
            1030,
            1130,
            1230,
            1330,
            1430,
            1530,
            1630,
            1730,
            1830,
            1930,
            2030,
            2130,
            2230,
            2330,
            2430,
            2530,
            2630,
            2730,
            2830,
            2930,
            3030,
            3130,
            3230,
            3330,
            3430,
            3530,
            3630,
            3730,
            3830,
            3930,
            4030,
            4130,
            4230,
            4330,
            4430,
            4530,
            4630,
            4730,
            4830,
            4930,
            5030,
            5130,
            5230,
            5330,
            5430,
            5530,
            5630,
            5730,
            5830,
            5930,
            6030,
            6130,
            6230,
            6330,
            6430,
            6530,
            6630,
            6730,
            6830,
            6930,
            7030,
            7130,
            7230,
            7330,
            7430,
            7530,
            7630,
            7730,
            7830,
            7930,
            8030,
            8130,
            8230,
            8330,
            8430,
            8530,
            8630,
            8730,
            8830,
            8930,
            9030,
            9130,
            9230,
            9330,
            9430,
            9530,
            9630,
            9730,
            9830,
            9930
            ))
    );
    RecoverValueTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.CreateRecoverValueTableMasterRequest;
using Gs2.Gs2Stamina.Result.CreateRecoverValueTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createRecoverValueTableMaster(
    new CreateRecoverValueTableMasterRequest()
        .withNamespaceName("namespace1")
        .withName("recover-value-table-0001")
        .withDescription(null)
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-0001")
        .withValues(new int[] {
            30,
        130,
        230,
        330,
        430,
        530,
        630,
        730,
        830,
        930,
        1030,
        1130,
        1230,
        1330,
        1430,
        1530,
        1630,
        1730,
        1830,
        1930,
        2030,
        2130,
        2230,
        2330,
        2430,
        2530,
        2630,
        2730,
        2830,
        2930,
        3030,
        3130,
        3230,
        3330,
        3430,
        3530,
        3630,
        3730,
        3830,
        3930,
        4030,
        4130,
        4230,
        4330,
        4430,
        4530,
        4630,
        4730,
        4830,
        4930,
        5030,
        5130,
        5230,
        5330,
        5430,
        5530,
        5630,
        5730,
        5830,
        5930,
        6030,
        6130,
        6230,
        6330,
        6430,
        6530,
        6630,
        6730,
        6830,
        6930,
        7030,
        7130,
        7230,
        7330,
        7430,
        7530,
        7630,
        7730,
        7830,
        7930,
        8030,
        8130,
        8230,
        8330,
        8430,
        8530,
        8630,
        8730,
        8830,
        8930,
        9030,
        9130,
        9230,
        9330,
        9430,
        9530,
        9630,
        9730,
        9830,
        9930
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.createRecoverValueTableMaster(
        new Gs2Stamina.CreateRecoverValueTableMasterRequest()
            .withNamespaceName('namespace1')
            .withName('recover-value-table-0001')
            .withDescription(undefined)
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-0001')
            .withValues([
                30,
            130,
            230,
            330,
            430,
            530,
            630,
            730,
            830,
            930,
            1030,
            1130,
            1230,
            1330,
            1430,
            1530,
            1630,
            1730,
            1830,
            1930,
            2030,
            2130,
            2230,
            2330,
            2430,
            2530,
            2630,
            2730,
            2830,
            2930,
            3030,
            3130,
            3230,
            3330,
            3430,
            3530,
            3630,
            3730,
            3830,
            3930,
            4030,
            4130,
            4230,
            4330,
            4430,
            4530,
            4630,
            4730,
            4830,
            4930,
            5030,
            5130,
            5230,
            5330,
            5430,
            5530,
            5630,
            5730,
            5830,
            5930,
            6030,
            6130,
            6230,
            6330,
            6430,
            6530,
            6630,
            6730,
            6830,
            6930,
            7030,
            7130,
            7230,
            7330,
            7430,
            7530,
            7630,
            7730,
            7830,
            7930,
            8030,
            8130,
            8230,
            8330,
            8430,
            8530,
            8630,
            8730,
            8830,
            8930,
            9030,
            9130,
            9230,
            9330,
            9430,
            9530,
            9630,
            9730,
            9830,
            9930
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_recover_value_table_master(
        new stamina.CreateRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('recover-value-table-0001')
            .with_description(None)
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-0001')
            .with_values([    30,
            130,
            230,
            330,
            430,
            530,
            630,
            730,
            830,
            930,
            1030,
            1130,
            1230,
            1330,
            1430,
            1530,
            1630,
            1730,
            1830,
            1930,
            2030,
            2130,
            2230,
            2330,
            2430,
            2530,
            2630,
            2730,
            2830,
            2930,
            3030,
            3130,
            3230,
            3330,
            3430,
            3530,
            3630,
            3730,
            3830,
            3930,
            4030,
            4130,
            4230,
            4330,
            4430,
            4530,
            4630,
            4730,
            4830,
            4930,
            5030,
            5130,
            5230,
            5330,
            5430,
            5530,
            5630,
            5730,
            5830,
            5930,
            6030,
            6130,
            6230,
            6330,
            6430,
            6530,
            6630,
            6730,
            6830,
            6930,
            7030,
            7130,
            7230,
            7330,
            7430,
            7530,
            7630,
            7730,
            7830,
            7930,
            8030,
            8130,
            8230,
            8330,
            8430,
            8530,
            8630,
            8730,
            8830,
            8930,
            9030,
            9130,
            9230,
            9330,
            9430,
            9530,
            9630,
            9730,
            9830,
            9930,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.create_recover_value_table_master({
    namespaceName='namespace1',
    name='recover-value-table-0001',
    description=nil,
    metadata=nil,
    experienceModelId='experienceModelId-0001',
    values={
        30,
    130,
    230,
    330,
    430,
    530,
    630,
    730,
    830,
    930,
    1030,
    1130,
    1230,
    1330,
    1430,
    1530,
    1630,
    1730,
    1830,
    1930,
    2030,
    2130,
    2230,
    2330,
    2430,
    2530,
    2630,
    2730,
    2830,
    2930,
    3030,
    3130,
    3230,
    3330,
    3430,
    3530,
    3630,
    3730,
    3830,
    3930,
    4030,
    4130,
    4230,
    4330,
    4430,
    4530,
    4630,
    4730,
    4830,
    4930,
    5030,
    5130,
    5230,
    5330,
    5430,
    5530,
    5630,
    5730,
    5830,
    5930,
    6030,
    6130,
    6230,
    6330,
    6430,
    6530,
    6630,
    6730,
    6830,
    6930,
    7030,
    7130,
    7230,
    7330,
    7430,
    7530,
    7630,
    7730,
    7830,
    7930,
    8030,
    8130,
    8230,
    8330,
    8430,
    8530,
    8630,
    8730,
    8830,
    8930,
    9030,
    9130,
    9230,
    9330,
    9430,
    9530,
    9630,
    9730,
    9830,
    9930
    },
});

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 ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復量テーブル

Result

説明
item RecoverValueTableMaster 作成したスタミナ回復量テーブルマスター

getRecoverValueTableMaster

getRecoverValueTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.GetRecoverValueTableMaster(
    &stamina.GetRecoverValueTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverValueTableName: pointy.String("recover-value-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\GetRecoverValueTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getRecoverValueTableMaster(
        (new GetRecoverValueTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverValueTableName('recover-value-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.GetRecoverValueTableMasterRequest;
import io.gs2.stamina.result.GetRecoverValueTableMasterResult;

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

try {
    GetRecoverValueTableMasterResult result = client.getRecoverValueTableMaster(
        new GetRecoverValueTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverValueTableName("recover-value-table-0001")
    );
    RecoverValueTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.GetRecoverValueTableMasterRequest;
using Gs2.Gs2Stamina.Result.GetRecoverValueTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getRecoverValueTableMaster(
    new GetRecoverValueTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverValueTableName("recover-value-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.getRecoverValueTableMaster(
        new Gs2Stamina.GetRecoverValueTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverValueTableName('recover-value-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.get_recover_value_table_master(
        new stamina.GetRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_value_table_name('recover-value-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.get_recover_value_table_master({
    namespaceName='namespace1',
    recoverValueTableName='recover-value-table-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文字 ネームスペース名
recoverValueTableName string ~ 128文字 スタミナ回復量テーブル名

Result

説明
item RecoverValueTableMaster スタミナ回復量テーブルマスター

updateRecoverValueTableMaster

updateRecoverValueTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateRecoverValueTableMaster(
    &stamina.UpdateRecoverValueTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverValueTableName: pointy.String("recover-value-table-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        ExperienceModelId: pointy.String("experienceModelId-1001"),
        Values: []int32{
            30,
        180,
        330,
        480,
        630,
        780,
        930,
        1080,
        1230,
        1380,
        1530,
        1680,
        1830,
        1980,
        2130,
        2280,
        2430,
        2580,
        2730,
        2880,
        3030,
        3180,
        3330,
        3480,
        3630,
        3780,
        3930,
        4080,
        4230,
        4380,
        4530,
        4680,
        4830,
        4980,
        5130,
        5280,
        5430,
        5580,
        5730,
        5880,
        6030,
        6180,
        6330,
        6480,
        6630,
        6780,
        6930,
        7080,
        7230,
        7380,
        7530,
        7680,
        7830,
        7980,
        8130,
        8280,
        8430,
        8580,
        8730,
        8880,
        9030,
        9180,
        9330,
        9480,
        9630,
        9780,
        9930,
        10080,
        10230,
        10380,
        10530,
        10680,
        10830,
        10980,
        11130,
        11280,
        11430,
        11580,
        11730,
        11880,
        12030,
        12180,
        12330,
        12480,
        12630,
        12780,
        12930,
        13080,
        13230,
        13380,
        13530,
        13680,
        13830,
        13980,
        14130,
        14280,
        14430,
        14580,
        14730,
        14880,
        },
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\UpdateRecoverValueTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateRecoverValueTableMaster(
        (new UpdateRecoverValueTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverValueTableName('recover-value-table-0001')
            ->withDescription('description1')
            ->withMetadata(null)
            ->withExperienceModelId('experienceModelId-1001')
            ->withValues([    30,
            180,
            330,
            480,
            630,
            780,
            930,
            1080,
            1230,
            1380,
            1530,
            1680,
            1830,
            1980,
            2130,
            2280,
            2430,
            2580,
            2730,
            2880,
            3030,
            3180,
            3330,
            3480,
            3630,
            3780,
            3930,
            4080,
            4230,
            4380,
            4530,
            4680,
            4830,
            4980,
            5130,
            5280,
            5430,
            5580,
            5730,
            5880,
            6030,
            6180,
            6330,
            6480,
            6630,
            6780,
            6930,
            7080,
            7230,
            7380,
            7530,
            7680,
            7830,
            7980,
            8130,
            8280,
            8430,
            8580,
            8730,
            8880,
            9030,
            9180,
            9330,
            9480,
            9630,
            9780,
            9930,
            10080,
            10230,
            10380,
            10530,
            10680,
            10830,
            10980,
            11130,
            11280,
            11430,
            11580,
            11730,
            11880,
            12030,
            12180,
            12330,
            12480,
            12630,
            12780,
            12930,
            13080,
            13230,
            13380,
            13530,
            13680,
            13830,
            13980,
            14130,
            14280,
            14430,
            14580,
            14730,
            14880,
            ])
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateRecoverValueTableMasterRequest;
import io.gs2.stamina.result.UpdateRecoverValueTableMasterResult;

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

try {
    UpdateRecoverValueTableMasterResult result = client.updateRecoverValueTableMaster(
        new UpdateRecoverValueTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverValueTableName("recover-value-table-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withExperienceModelId("experienceModelId-1001")
            .withValues(Arrays.asList(
                30,
            180,
            330,
            480,
            630,
            780,
            930,
            1080,
            1230,
            1380,
            1530,
            1680,
            1830,
            1980,
            2130,
            2280,
            2430,
            2580,
            2730,
            2880,
            3030,
            3180,
            3330,
            3480,
            3630,
            3780,
            3930,
            4080,
            4230,
            4380,
            4530,
            4680,
            4830,
            4980,
            5130,
            5280,
            5430,
            5580,
            5730,
            5880,
            6030,
            6180,
            6330,
            6480,
            6630,
            6780,
            6930,
            7080,
            7230,
            7380,
            7530,
            7680,
            7830,
            7980,
            8130,
            8280,
            8430,
            8580,
            8730,
            8880,
            9030,
            9180,
            9330,
            9480,
            9630,
            9780,
            9930,
            10080,
            10230,
            10380,
            10530,
            10680,
            10830,
            10980,
            11130,
            11280,
            11430,
            11580,
            11730,
            11880,
            12030,
            12180,
            12330,
            12480,
            12630,
            12780,
            12930,
            13080,
            13230,
            13380,
            13530,
            13680,
            13830,
            13980,
            14130,
            14280,
            14430,
            14580,
            14730,
            14880
            ))
    );
    RecoverValueTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.UpdateRecoverValueTableMasterRequest;
using Gs2.Gs2Stamina.Result.UpdateRecoverValueTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateRecoverValueTableMaster(
    new UpdateRecoverValueTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverValueTableName("recover-value-table-0001")
        .withDescription("description1")
        .withMetadata(null)
        .withExperienceModelId("experienceModelId-1001")
        .withValues(new int[] {
            30,
        180,
        330,
        480,
        630,
        780,
        930,
        1080,
        1230,
        1380,
        1530,
        1680,
        1830,
        1980,
        2130,
        2280,
        2430,
        2580,
        2730,
        2880,
        3030,
        3180,
        3330,
        3480,
        3630,
        3780,
        3930,
        4080,
        4230,
        4380,
        4530,
        4680,
        4830,
        4980,
        5130,
        5280,
        5430,
        5580,
        5730,
        5880,
        6030,
        6180,
        6330,
        6480,
        6630,
        6780,
        6930,
        7080,
        7230,
        7380,
        7530,
        7680,
        7830,
        7980,
        8130,
        8280,
        8430,
        8580,
        8730,
        8880,
        9030,
        9180,
        9330,
        9480,
        9630,
        9780,
        9930,
        10080,
        10230,
        10380,
        10530,
        10680,
        10830,
        10980,
        11130,
        11280,
        11430,
        11580,
        11730,
        11880,
        12030,
        12180,
        12330,
        12480,
        12630,
        12780,
        12930,
        13080,
        13230,
        13380,
        13530,
        13680,
        13830,
        13980,
        14130,
        14280,
        14430,
        14580,
        14730,
        14880
        }),
    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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.updateRecoverValueTableMaster(
        new Gs2Stamina.UpdateRecoverValueTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverValueTableName('recover-value-table-0001')
            .withDescription('description1')
            .withMetadata(undefined)
            .withExperienceModelId('experienceModelId-1001')
            .withValues([
                30,
            180,
            330,
            480,
            630,
            780,
            930,
            1080,
            1230,
            1380,
            1530,
            1680,
            1830,
            1980,
            2130,
            2280,
            2430,
            2580,
            2730,
            2880,
            3030,
            3180,
            3330,
            3480,
            3630,
            3780,
            3930,
            4080,
            4230,
            4380,
            4530,
            4680,
            4830,
            4980,
            5130,
            5280,
            5430,
            5580,
            5730,
            5880,
            6030,
            6180,
            6330,
            6480,
            6630,
            6780,
            6930,
            7080,
            7230,
            7380,
            7530,
            7680,
            7830,
            7980,
            8130,
            8280,
            8430,
            8580,
            8730,
            8880,
            9030,
            9180,
            9330,
            9480,
            9630,
            9780,
            9930,
            10080,
            10230,
            10380,
            10530,
            10680,
            10830,
            10980,
            11130,
            11280,
            11430,
            11580,
            11730,
            11880,
            12030,
            12180,
            12330,
            12480,
            12630,
            12780,
            12930,
            13080,
            13230,
            13380,
            13530,
            13680,
            13830,
            13980,
            14130,
            14280,
            14430,
            14580,
            14730,
            14880
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_recover_value_table_master(
        new stamina.UpdateRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_value_table_name('recover-value-table-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_experience_model_id('experienceModelId-1001')
            .with_values([    30,
            180,
            330,
            480,
            630,
            780,
            930,
            1080,
            1230,
            1380,
            1530,
            1680,
            1830,
            1980,
            2130,
            2280,
            2430,
            2580,
            2730,
            2880,
            3030,
            3180,
            3330,
            3480,
            3630,
            3780,
            3930,
            4080,
            4230,
            4380,
            4530,
            4680,
            4830,
            4980,
            5130,
            5280,
            5430,
            5580,
            5730,
            5880,
            6030,
            6180,
            6330,
            6480,
            6630,
            6780,
            6930,
            7080,
            7230,
            7380,
            7530,
            7680,
            7830,
            7980,
            8130,
            8280,
            8430,
            8580,
            8730,
            8880,
            9030,
            9180,
            9330,
            9480,
            9630,
            9780,
            9930,
            10080,
            10230,
            10380,
            10530,
            10680,
            10830,
            10980,
            11130,
            11280,
            11430,
            11580,
            11730,
            11880,
            12030,
            12180,
            12330,
            12480,
            12630,
            12780,
            12930,
            13080,
            13230,
            13380,
            13530,
            13680,
            13830,
            13980,
            14130,
            14280,
            14430,
            14580,
            14730,
            14880,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.update_recover_value_table_master({
    namespaceName='namespace1',
    recoverValueTableName='recover-value-table-0001',
    description='description1',
    metadata=nil,
    experienceModelId='experienceModelId-1001',
    values={
        30,
    180,
    330,
    480,
    630,
    780,
    930,
    1080,
    1230,
    1380,
    1530,
    1680,
    1830,
    1980,
    2130,
    2280,
    2430,
    2580,
    2730,
    2880,
    3030,
    3180,
    3330,
    3480,
    3630,
    3780,
    3930,
    4080,
    4230,
    4380,
    4530,
    4680,
    4830,
    4980,
    5130,
    5280,
    5430,
    5580,
    5730,
    5880,
    6030,
    6180,
    6330,
    6480,
    6630,
    6780,
    6930,
    7080,
    7230,
    7380,
    7530,
    7680,
    7830,
    7980,
    8130,
    8280,
    8430,
    8580,
    8730,
    8880,
    9030,
    9180,
    9330,
    9480,
    9630,
    9780,
    9930,
    10080,
    10230,
    10380,
    10530,
    10680,
    10830,
    10980,
    11130,
    11280,
    11430,
    11580,
    11730,
    11880,
    12030,
    12180,
    12330,
    12480,
    12630,
    12780,
    12930,
    13080,
    13230,
    13380,
    13530,
    13680,
    13830,
    13980,
    14130,
    14280,
    14430,
    14580,
    14730,
    14880
    },
});

if(api_result.isError) then
    # エラー発生時
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

スタミナ回復量テーブルマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
recoverValueTableName string ~ 128文字 スタミナ回復量テーブル名
description string ~ 1024文字 説明文
metadata string ~ 128文字 メタデータ
experienceModelId string ~ 1024文字 経験値・ランクアップ閾値モデルGRN
values int[] ランク毎のスタミナ回復量テーブル

Result

説明
item RecoverValueTableMaster 更新したスタミナ回復量テーブルマスター

deleteRecoverValueTableMaster

deleteRecoverValueTableMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.DeleteRecoverValueTableMaster(
    &stamina.DeleteRecoverValueTableMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RecoverValueTableName: pointy.String("recover-value-table-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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\DeleteRecoverValueTableMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteRecoverValueTableMaster(
        (new DeleteRecoverValueTableMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRecoverValueTableName('recover-value-table-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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.DeleteRecoverValueTableMasterRequest;
import io.gs2.stamina.result.DeleteRecoverValueTableMasterResult;

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

try {
    DeleteRecoverValueTableMasterResult result = client.deleteRecoverValueTableMaster(
        new DeleteRecoverValueTableMasterRequest()
            .withNamespaceName("namespace1")
            .withRecoverValueTableName("recover-value-table-0001")
    );
    RecoverValueTableMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.DeleteRecoverValueTableMasterRequest;
using Gs2.Gs2Stamina.Result.DeleteRecoverValueTableMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteRecoverValueTableMaster(
    new DeleteRecoverValueTableMasterRequest()
        .withNamespaceName("namespace1")
        .withRecoverValueTableName("recover-value-table-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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.deleteRecoverValueTableMaster(
        new Gs2Stamina.DeleteRecoverValueTableMasterRequest()
            .withNamespaceName('namespace1')
            .withRecoverValueTableName('recover-value-table-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.delete_recover_value_table_master(
        new stamina.DeleteRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_value_table_name('recover-value-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.delete_recover_value_table_master({
    namespaceName='namespace1',
    recoverValueTableName='recover-value-table-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文字 ネームスペース名
recoverValueTableName string ~ 128文字 スタミナ回復量テーブル名

Result

説明
item RecoverValueTableMaster 削除したスタミナ回復量テーブルマスター

exportMaster

exportMaster

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

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

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

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

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

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

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2StaminaRestClient(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 Gs2Stamina from '@/gs2/stamina';

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

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

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

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

client = gs2('stamina')

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 CurrentStaminaMaster 現在有効なスタミナマスター

getCurrentStaminaMaster

getCurrentStaminaMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.GetCurrentStaminaMaster(
    &stamina.GetCurrentStaminaMasterRequest {
        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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\GetCurrentStaminaMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentStaminaMaster(
        (new GetCurrentStaminaMasterRequest())
            ->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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.GetCurrentStaminaMasterRequest;
import io.gs2.stamina.result.GetCurrentStaminaMasterResult;

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

try {
    GetCurrentStaminaMasterResult result = client.getCurrentStaminaMaster(
        new GetCurrentStaminaMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentStaminaMaster 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.Gs2Stamina.Gs2StaminaRestClient;
using Gs2.Gs2Stamina.Request.GetCurrentStaminaMasterRequest;
using Gs2.Gs2Stamina.Result.GetCurrentStaminaMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getCurrentStaminaMaster(
    new GetCurrentStaminaMasterRequest()
        .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 Gs2Stamina from '@/gs2/stamina';

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

try {
    const result = await client.getCurrentStaminaMaster(
        new Gs2Stamina.GetCurrentStaminaMasterRequest()
            .withNamespaceName('namespace1')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.get_current_stamina_master(
        new stamina.GetCurrentStaminaMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('stamina')

api_result = client.get_current_stamina_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 CurrentStaminaMaster 現在有効なスタミナマスター

updateCurrentStaminaMaster

updateCurrentStaminaMaster

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

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

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

client := stamina.Gs2StaminaRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentStaminaMaster(
    &stamina.UpdateCurrentStaminaMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String(`{
          "version": "2019-02-14",
          "staminaModels": [
            {
              "name": "quest",
              "metadata": "QUEST",
              "recoverIntervalMinutes": 15,
              "recoverValue": 1,
              "initialCapacity": 50,
              "isOverflow": true,
              "maxCapacity": 999,
              "maxStaminaTable": {
                "name": "playerLevel",
                "metadata": "PLAYER_LEVEL",
                "experienceModelId": "playerLevel",
                "values": [
                  51,
                  52,
                  53,
                  54,
                  55,
                  56,
                  57,
                  58,
                  59,
                  60,
                  61,
                  62,
                  63,
                  64,
                  65,
                  66,
                  67,
                  68,
                  69,
                  70,
                  71,
                  72,
                  73,
                  74,
                  75,
                  76,
                  77,
                  78,
                  79,
                  80,
                  81,
                  82,
                  83,
                  84,
                  85,
                  86,
                  87,
                  88,
                  89,
                  90,
                  91,
                  92,
                  93,
                  94,
                  95,
                  96,
                  97,
                  98,
                  99,
                  100,
                  101,
                  102,
                  103,
                  104,
                  105,
                  106,
                  107,
                  108,
                  109,
                  110,
                  111,
                  112,
                  113,
                  114,
                  115,
                  116,
                  117,
                  118,
                  119,
                  120,
                  121,
                  122,
                  123,
                  124,
                  125,
                  126,
                  127,
                  128,
                  129
                ]
              },
              "recoverIntervalTable": {
                "name": "staminaRecoverInterval",
                "metadata": "STAMINA_RECOVER_INTERVAL",
                "experienceModelId": "playerLevel",
                "values": [
                  41,
                  42,
                  43,
                  44,
                  45,
                  46,
                  47,
                  48,
                  49,
                  50,
                  51,
                  52,
                  53,
                  54,
                  55,
                  56,
                  57,
                  58,
                  59,
                  60,
                  61,
                  62,
                  63,
                  64,
                  65,
                  66,
                  67,
                  68,
                  69,
                  70,
                  71,
                  72,
                  73,
                  74,
                  75,
                  76,
                  77,
                  78,
                  79,
                  80,
                  81,
                  82,
                  83,
                  84,
                  85,
                  86,
                  87,
                  88,
                  89,
                  90,
                  91,
                  92,
                  93,
                  94,
                  95,
                  96,
                  97,
                  98,
                  99,
                  100,
                  101,
                  102,
                  103,
                  104,
                  105,
                  106,
                  107,
                  108,
                  109,
                  110,
                  111,
                  112,
                  113,
                  114,
                  115,
                  116,
                  117,
                  118,
                  119
                ]
              },
              "recoverValueTable": {
                "name": "staminaRecoverValue",
                "metadata": "STAMINA_RECOVER_VALUE",
                "experienceModelId": "playerLevel",
                "values": [
                  31,
                  32,
                  33,
                  34,
                  35,
                  36,
                  37,
                  38,
                  39,
                  40,
                  41,
                  42,
                  43,
                  44,
                  45,
                  46,
                  47,
                  48,
                  49,
                  50,
                  51,
                  52,
                  53,
                  54,
                  55,
                  56,
                  57,
                  58,
                  59,
                  60,
                  61,
                  62,
                  63,
                  64,
                  65,
                  66,
                  67,
                  68,
                  69,
                  70,
                  71,
                  72,
                  73,
                  74,
                  75,
                  76,
                  77,
                  78,
                  79,
                  80,
                  81,
                  82,
                  83,
                  84,
                  85,
                  86,
                  87,
                  88,
                  89,
                  90,
                  91,
                  92,
                  93,
                  94,
                  95,
                  96,
                  97,
                  98,
                  99,
                  100,
                  101,
                  102,
                  103,
                  104,
                  105,
                  106,
                  107,
                  108,
                  109
                ]
              }
            },
            {
              "name": "raidBattle",
              "metadata": "RAID_BATTLE",
              "recoverIntervalMinutes": 60,
              "recoverValue": 1,
              "initialCapacity": 10,
              "isOverflow": false
            },
            {
              "name": "special",
              "metadata": "SPECIAL",
              "recoverIntervalMinutes": 30,
              "recoverValue": 3,
              "initialCapacity": 100,
              "isOverflow": true,
              "maxCapacity": 999,
              "maxStaminaTable": {
                "name": "special",
                "metadata": "SPECIAL",
                "experienceModelId": "special",
                "values": [
                  102,
                  104,
                  106,
                  108,
                  110,
                  112,
                  114,
                  116,
                  118,
                  120,
                  122,
                  124,
                  126,
                  128,
                  130,
                  132,
                  134,
                  136,
                  138,
                  140,
                  142,
                  144,
                  146,
                  148,
                  150,
                  152,
                  154,
                  156,
                  158,
                  160,
                  162,
                  164,
                  166,
                  168,
                  170,
                  172,
                  174,
                  176,
                  178,
                  180,
                  182,
                  184,
                  186,
                  188,
                  190,
                  192,
                  194,
                  196,
                  198,
                  200,
                  202,
                  204,
                  206,
                  208,
                  210,
                  212,
                  214,
                  216,
                  218,
                  220,
                  222,
                  224,
                  226,
                  228,
                  230,
                  232,
                  234,
                  236,
                  238,
                  240,
                  242,
                  244,
                  246,
                  248,
                  250,
                  252,
                  254,
                  256,
                  258
                ]
              }
            }
          ]
        }`),
    }
)
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\Stamina\Gs2StaminaRestClient;
use Gs2\Stamina\Request\UpdateCurrentStaminaMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentStaminaMaster(
        (new UpdateCurrentStaminaMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{
              \"version\": \"2019-02-14\",
              \"staminaModels\": [
                {
                  \"name\": \"quest\",
                  \"metadata\": \"QUEST\",
                  \"recoverIntervalMinutes\": 15,
                  \"recoverValue\": 1,
                  \"initialCapacity\": 50,
                  \"isOverflow\": true,
                  \"maxCapacity\": 999,
                  \"maxStaminaTable\": {
                    \"name\": \"playerLevel\",
                    \"metadata\": \"PLAYER_LEVEL\",
                    \"experienceModelId\": \"playerLevel\",
                    \"values\": [
                      51,
                      52,
                      53,
                      54,
                      55,
                      56,
                      57,
                      58,
                      59,
                      60,
                      61,
                      62,
                      63,
                      64,
                      65,
                      66,
                      67,
                      68,
                      69,
                      70,
                      71,
                      72,
                      73,
                      74,
                      75,
                      76,
                      77,
                      78,
                      79,
                      80,
                      81,
                      82,
                      83,
                      84,
                      85,
                      86,
                      87,
                      88,
                      89,
                      90,
                      91,
                      92,
                      93,
                      94,
                      95,
                      96,
                      97,
                      98,
                      99,
                      100,
                      101,
                      102,
                      103,
                      104,
                      105,
                      106,
                      107,
                      108,
                      109,
                      110,
                      111,
                      112,
                      113,
                      114,
                      115,
                      116,
                      117,
                      118,
                      119,
                      120,
                      121,
                      122,
                      123,
                      124,
                      125,
                      126,
                      127,
                      128,
                      129
                    ]
                  },
                  \"recoverIntervalTable\": {
                    \"name\": \"staminaRecoverInterval\",
                    \"metadata\": \"STAMINA_RECOVER_INTERVAL\",
                    \"experienceModelId\": \"playerLevel\",
                    \"values\": [
                      41,
                      42,
                      43,
                      44,
                      45,
                      46,
                      47,
                      48,
                      49,
                      50,
                      51,
                      52,
                      53,
                      54,
                      55,
                      56,
                      57,
                      58,
                      59,
                      60,
                      61,
                      62,
                      63,
                      64,
                      65,
                      66,
                      67,
                      68,
                      69,
                      70,
                      71,
                      72,
                      73,
                      74,
                      75,
                      76,
                      77,
                      78,
                      79,
                      80,
                      81,
                      82,
                      83,
                      84,
                      85,
                      86,
                      87,
                      88,
                      89,
                      90,
                      91,
                      92,
                      93,
                      94,
                      95,
                      96,
                      97,
                      98,
                      99,
                      100,
                      101,
                      102,
                      103,
                      104,
                      105,
                      106,
                      107,
                      108,
                      109,
                      110,
                      111,
                      112,
                      113,
                      114,
                      115,
                      116,
                      117,
                      118,
                      119
                    ]
                  },
                  \"recoverValueTable\": {
                    \"name\": \"staminaRecoverValue\",
                    \"metadata\": \"STAMINA_RECOVER_VALUE\",
                    \"experienceModelId\": \"playerLevel\",
                    \"values\": [
                      31,
                      32,
                      33,
                      34,
                      35,
                      36,
                      37,
                      38,
                      39,
                      40,
                      41,
                      42,
                      43,
                      44,
                      45,
                      46,
                      47,
                      48,
                      49,
                      50,
                      51,
                      52,
                      53,
                      54,
                      55,
                      56,
                      57,
                      58,
                      59,
                      60,
                      61,
                      62,
                      63,
                      64,
                      65,
                      66,
                      67,
                      68,
                      69,
                      70,
                      71,
                      72,
                      73,
                      74,
                      75,
                      76,
                      77,
                      78,
                      79,
                      80,
                      81,
                      82,
                      83,
                      84,
                      85,
                      86,
                      87,
                      88,
                      89,
                      90,
                      91,
                      92,
                      93,
                      94,
                      95,
                      96,
                      97,
                      98,
                      99,
                      100,
                      101,
                      102,
                      103,
                      104,
                      105,
                      106,
                      107,
                      108,
                      109
                    ]
                  }
                },
                {
                  \"name\": \"raidBattle\",
                  \"metadata\": \"RAID_BATTLE\",
                  \"recoverIntervalMinutes\": 60,
                  \"recoverValue\": 1,
                  \"initialCapacity\": 10,
                  \"isOverflow\": false
                },
                {
                  \"name\": \"special\",
                  \"metadata\": \"SPECIAL\",
                  \"recoverIntervalMinutes\": 30,
                  \"recoverValue\": 3,
                  \"initialCapacity\": 100,
                  \"isOverflow\": true,
                  \"maxCapacity\": 999,
                  \"maxStaminaTable\": {
                    \"name\": \"special\",
                    \"metadata\": \"SPECIAL\",
                    \"experienceModelId\": \"special\",
                    \"values\": [
                      102,
                      104,
                      106,
                      108,
                      110,
                      112,
                      114,
                      116,
                      118,
                      120,
                      122,
                      124,
                      126,
                      128,
                      130,
                      132,
                      134,
                      136,
                      138,
                      140,
                      142,
                      144,
                      146,
                      148,
                      150,
                      152,
                      154,
                      156,
                      158,
                      160,
                      162,
                      164,
                      166,
                      168,
                      170,
                      172,
                      174,
                      176,
                      178,
                      180,
                      182,
                      184,
                      186,
                      188,
                      190,
                      192,
                      194,
                      196,
                      198,
                      200,
                      202,
                      204,
                      206,
                      208,
                      210,
                      212,
                      214,
                      216,
                      218,
                      220,
                      222,
                      224,
                      226,
                      228,
                      230,
                      232,
                      234,
                      236,
                      238,
                      240,
                      242,
                      244,
                      246,
                      248,
                      250,
                      252,
                      254,
                      256,
                      258
                    ]
                  }
                }
              ]
            }")
    );
    $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.stamina.rest.Gs2StaminaRestClient;
import io.gs2.stamina.request.UpdateCurrentStaminaMasterRequest;
import io.gs2.stamina.result.UpdateCurrentStaminaMasterResult;

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

try {
    UpdateCurrentStaminaMasterResult result = client.updateCurrentStaminaMaster(
        new UpdateCurrentStaminaMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2019-02-14\",\n  \"staminaModels\": [\n    {\n      \"name\": \"quest\",\n      \"metadata\": \"QUEST\",\n      \"recoverIntervalMinutes\": 15,\n      \"recoverValue\": 1,\n      \"initialCapacity\": 50,\n      \"isOverflow\": true,\n      \"maxCapacity\": 999,\n      \"maxStaminaTable\": {\n        \"name\": \"playerLevel\",\n        \"metadata\": \"PLAYER_LEVEL\",\n        \"experienceModelId\": \"playerLevel\",\n        \"values\": [\n          51,\n          52,\n          53,\n          54,\n          55,\n          56,\n          57,\n          58,\n          59,\n          60,\n          61,\n          62,\n          63,\n          64,\n          65,\n