NAV
go python java php typescript csharp GS2-Script

GS2-Stamina

GS2 SDK Reference

GS2 SDK Reference

Models

Namespace

Namespace

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

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

Type Description
namespaceId string Namespace GRN
name string Namespace name
description string description of Namespace
overflowTriggerScript ScriptSetting GS2-Script to handle overflow stamina during recovery process
logSetting LogSetting Log output settings
createdAt long Datetime of creation
updatedAt long Datetime of last update

StaminaModelMaster

Stamina Master

Parameters such as maximum stamina value, recovery interval, and recovery amount can be defined.
It can also be linked to GS2-Experience to control the maximum value and the amount of recovery.

Type Description
staminaModelId string Stamina Model Master GRN
name string Stamina Model Name
metadata string metadata
description string description of Namespace
recoverIntervalMinutes int Speed at which stamina is regained (minutes)
recoverValue int Amount of recovery after a period of time
initialCapacity int Initial maximum value of stamina
isOverflow bool Recover beyond the maximum
maxCapacity int Maximum value in overflow situation
maxStaminaTableName string Name of the maximum stamina table that determines the maximum stamina value according to the rank of GS2-Experience
recoverIntervalTableName string Name of the recovery interval table that determines the recovery interval of stamina according to the rank of GS2-Experience
recoverValueTableName string Name of the recovery table that determines the amount of stamina recovery according to the rank of GS2-Experience
createdAt long Datetime of creation
updatedAt long Datetime of last update

MaxStaminaTableMaster

Stamina Maximum Table Master

This entity defines the maximum value of stamina for each rank in GS2-Experience.

Type Description
maxStaminaTableId string Maximum Stamina Table Master GRN
name string Maximum Stamina Value Table Name
metadata string metadata
description string description of Namespace
experienceModelId string Experience Model GRN
values int[] List of Maximum Staminas
createdAt long Datetime of creation
updatedAt long Datetime of last update

RecoverIntervalTableMaster

Stamina Recovery Interval Table Master

This entity defines the stamina recovery interval for each rank of GS2-Experience.

Type Description
recoverIntervalTableId string Stamina Recovery Interval Table Master GRN
name string Stamina recovery interval table name
metadata string metadata
description string description of Namespace
experienceModelId string Experience Model GRN
values int[] Stamina recovery interval table for each rank
createdAt long Datetime of creation
updatedAt long Datetime of last update

RecoverValueTableMaster

Stamina Recovery Value Table Master

This entity defines the amount of stamina recovery for each rank of GS2-Experience.

Type Description
recoverValueTableId string Stamina Recovery Amount Table Master GRN
name string Stamina recovery value table name
metadata string metadata
description string description of Namespace
experienceModelId string Experience Model GRN
values int[] Stamina recovery value table for each rank
createdAt long Datetime of creation
updatedAt long Datetime of last update

CurrentStaminaMaster

Currently available master data

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

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

Please refer to the documentation for the format of the JSON file.

Type Description
namespaceId string Namespace GRN
settings string Master data

StaminaModel

Stamina Model

Parameters such as the maximum value of stamina, recovery interval, and amount of recovery can be defined.
You can also control the maximum value and the amount of recovery in conjunction with GS2-Experience.

Type Description
staminaModelId string Stamina Model GRN
name string Stamina Model Name
metadata string metadata
recoverIntervalMinutes int Speed at which stamina is regained (minutes)
recoverValue int Amount of recovery after a period of time
initialCapacity int Initial maximum value of stamina
isOverflow bool Recover beyond the maximum
maxCapacity int Maximum value in overflow situation
maxStaminaTable MaxStaminaTable Maximum Stamina Table used when working with GS2-Experience
recoverIntervalTable RecoverIntervalTable Recovery interval table used when working with GS2-Experience
recoverValueTable RecoverValueTable Recovery amount table used when working with GS2-Experience

MaxStaminaTable

Maximum Stamina Table

This entity defines the maximum value of stamina for each rank of GS2-Experience.

Type Description
maxStaminaTableId string Maximum Stamina Table GRN
name string Maximum Stamina Value Table Name
metadata string metadata
experienceModelId string Experience Model GRN
values int[] List of Maximum Staminas

RecoverIntervalTable

Stamina Recovery Interval Table

This entity defines the stamina recovery interval for each rank of GS2-Experience.

Type Description
recoverIntervalTableId string Stamina Recovery Interval Table GRN
name string Stamina recovery interval table name
metadata string metadata
experienceModelId string Experience Model GRN
values int[] Stamina recovery interval table for each rank

RecoverValueTable

Stamina Recovery Value Table

This entity defines the amount of stamina recovery for each rank of GS2-Experience.

Type Description
recoverValueTableId string Stamina Recovery Value Table GRN
name string Stamina recovery value table name
metadata string metadata
experienceModelId string Experience Model GRN
values int[] Stamina recovery value table for each rank

Stamina

Stamina

Stamina is a point that is recovered over time in real time.
Generally, this stamina is used to limit the number of times a player can play a game per day and to allow the game provider to control the speed of game progression by allowing players to consume stamina to play the game.

Type Description
staminaId string Stamina GRN
staminaName string Stamina Model Name
userId string User Id
value int Stamina value
maxValue int Maximum Stamina
recoverIntervalMinutes int Stamina recovery interval (minutes)
recoverValue int Stamina recovery value
overflowValue int Stamina value stored in excess of the maximum stamina value
nextRecoverAt long Next time stamina is restored
lastRecoveredAt long Datetime of creation
createdAt long Datetime of creation
updatedAt long Datetime of last update

GitHubCheckoutSetting

Type Description
apiKeyId string GitHub API key GRN
repositoryName string Repository Name
sourcePath string Source code file path
referenceType enum ['commit_hash', 'branch', 'tag'] Source of code
commitHash string Commit hash
branchName string Branch Name
tagName string Tag Name

LogSetting

Type Description
loggingNamespaceId string Namespace GRN

ScriptSetting

Type Description
triggerScriptId string Script GRN
doneTriggerTargetType enum ['none', 'gs2_script', 'aws'] Notification of Completion
doneTriggerScriptId string Script GRN
doneTriggerQueueNamespaceId string Namespace GRN

Methods

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.Gs2Stamina.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Stamina.Request.DescribeNamespacesRequest()
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as 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(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

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

client = gs2('stamina')

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

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

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

Get list of namespaces



Request

Type Require Default Limitation Description
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data acquired

Result

Type Description
items Namespace[] List of Namespace
nextPageToken string Page token to retrieve the rest of the listing

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.Gs2Stamina.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Stamina.Request.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(null)
            .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

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

try:
    result = client.create_namespace(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Create a new namespace



Request

Type Require Default Limitation Description
name string ~ 32 chars Namespace name
description string ~ 1024 chars description of Namespace
overflowTriggerScript ScriptSetting GS2-Script to handle overflow stamina during recovery process
logSetting LogSetting Log output settings

Result

Type Description
item Namespace Namespace created

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.Gs2Stamina.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Stamina.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;
import Gs2Core from '@/gs2/core';
import * as 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

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

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

client = gs2('stamina')

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

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

result = api_result.result
status = result.status;



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name

Result

Type Description
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.Gs2Stamina.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Stamina.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as 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

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

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

client = gs2('stamina')

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

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

result = api_result.result
item = result.item;

Get namespace



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name

Result

Type Description
item Namespace 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.Gs2Stamina.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Stamina.Request.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(null)
            .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

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

try:
    result = client.update_namespace(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Update namespace



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
description string ~ 1024 chars description of Namespace
overflowTriggerScript ScriptSetting GS2-Script to handle overflow stamina during recovery process
logSetting LogSetting Log output settings

Result

Type Description
item Namespace Updated 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.Gs2Stamina.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Stamina.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as 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

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

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

client = gs2('stamina')

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

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

result = api_result.result
item = result.item;

Delete namespace



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name

Result

Type Description
item Namespace Deleted 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.Gs2Stamina.Result.DescribeStaminaModelMastersResult> asyncResult = null;
yield return client.DescribeStaminaModelMasters(
    new Gs2.Gs2Stamina.Request.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(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.describe_stamina_model_masters(
        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:
    exit(1)

client = gs2('stamina')

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

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

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

Get list of Stamina Model Masters



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data acquired

Result

Type Description
items StaminaModelMaster[] List of Stamina Model Masters
nextPageToken string Page token to retrieve the rest of the listing

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.Gs2Stamina.Result.CreateStaminaModelMasterResult> asyncResult = null;
yield return client.CreateStaminaModelMaster(
    new Gs2.Gs2Stamina.Request.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(null)
            .withMetadata(null)
            .withRecoverIntervalMinutes(15)
            .withRecoverValue(null)
            .withInitialCapacity(50)
            .withIsOverflow(false)
            .withMaxCapacity(null)
            .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

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

try:
    result = client.create_stamina_model_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Create new Stamina Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Stamina Model Name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
recoverIntervalMinutes int ~ 2147483646 Speed at which stamina is regained (minutes)
recoverValue int 1 ~ 2147483646 Amount of recovery after a period of time
initialCapacity int ~ 2147483646 Initial maximum value of stamina
isOverflow bool Recover beyond the maximum
maxCapacity int {isOverflow} ~ 2147483646 Maximum value in overflow situation
maxStaminaTableName string ~ 128 chars Name of the maximum stamina table that determines the maximum stamina value according to the rank of GS2-Experience
recoverIntervalTableName string ~ 128 chars Name of the recovery interval table that determines the recovery interval of stamina according to the rank of GS2-Experience
recoverValueTableName string ~ 128 chars Name of the recovery table that determines the amount of stamina recovery according to the rank of GS2-Experience

Result

Type Description
item StaminaModelMaster Created Stamina Model Master

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.Gs2Stamina.Result.GetStaminaModelMasterResult> asyncResult = null;
yield return client.GetStaminaModelMaster(
    new Gs2.Gs2Stamina.Request.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

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

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

client = gs2('stamina')

api_result = client.get_stamina_model_master({
    namespaceName='namespace1',
    staminaName='stamina-0001',
})

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

result = api_result.result
item = result.item;

Obtained Stamina Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
staminaName string ~ 128 chars Stamina Model Name

Result

Type Description
item StaminaModelMaster Stamina Model Master

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.Gs2Stamina.Result.UpdateStaminaModelMasterResult> asyncResult = null;
yield return client.UpdateStaminaModelMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.update_stamina_model_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Update Stamina Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
staminaName string ~ 128 chars Stamina Model Name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
recoverIntervalMinutes int ~ 2147483646 Speed at which stamina is regained (minutes)
recoverValue int 1 ~ 2147483646 Amount of recovery after a period of time
initialCapacity int ~ 2147483646 Initial maximum value of stamina
isOverflow bool Recover beyond the maximum
maxCapacity int {isOverflow} ~ 2147483646 Maximum value in overflow situation
maxStaminaTableName string ~ 128 chars Name of the maximum stamina table that determines the maximum stamina value according to the rank of GS2-Experience
recoverIntervalTableName string ~ 128 chars Name of the recovery interval table that determines the recovery interval of stamina according to the rank of GS2-Experience
recoverValueTableName string ~ 128 chars Name of the recovery table that determines the amount of stamina recovery according to the rank of GS2-Experience

Result

Type Description
item StaminaModelMaster Updated Stamina Model Master

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.Gs2Stamina.Result.DeleteStaminaModelMasterResult> asyncResult = null;
yield return client.DeleteStaminaModelMaster(
    new Gs2.Gs2Stamina.Request.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

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

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

client = gs2('stamina')

api_result = client.delete_stamina_model_master({
    namespaceName='namespace1',
    staminaName='stamina-0001',
})

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

result = api_result.result
item = result.item;

Delete Stamina Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
staminaName string ~ 128 chars Stamina Model Name

Result

Type Description
item StaminaModelMaster Deleted Stamina Model Master

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.Gs2Stamina.Result.DescribeMaxStaminaTableMastersResult> asyncResult = null;
yield return client.DescribeMaxStaminaTableMasters(
    new Gs2.Gs2Stamina.Request.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(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.describe_max_stamina_table_masters(
        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:
    exit(1)

client = gs2('stamina')

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

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

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

Get list of maximum stamina table masters



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data acquired

Result

Type Description
items MaxStaminaTableMaster[] List of Maximum Stamina Table Masters
nextPageToken string Page token to retrieve the rest of the listing

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.Gs2Stamina.Result.CreateMaxStaminaTableMasterResult> asyncResult = null;
yield return client.CreateMaxStaminaTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_max_stamina_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Create new maximum stamina table master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Maximum Stamina Value Table Name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] List of Maximum Staminas

Result

Type Description
item MaxStaminaTableMaster Maximum Stamina table master created

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.Gs2Stamina.Result.GetMaxStaminaTableMasterResult> asyncResult = null;
yield return client.GetMaxStaminaTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.get_max_stamina_table_master(
        stamina.GetMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_max_stamina_table_name('max-stamina-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Get the maximum value table master of stamina



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
maxStaminaTableName string ~ 128 chars Maximum Stamina Value Table Name

Result

Type Description
item MaxStaminaTableMaster Maximum Stamina Table Master

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.Gs2Stamina.Result.UpdateMaxStaminaTableMasterResult> asyncResult = null;
yield return client.UpdateMaxStaminaTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_max_stamina_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Update maximum stamina table master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
maxStaminaTableName string ~ 128 chars Maximum Stamina Value Table Name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] List of Maximum Staminas

Result

Type Description
item MaxStaminaTableMaster Updated maximum stamina table master

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.Gs2Stamina.Result.DeleteMaxStaminaTableMasterResult> asyncResult = null;
yield return client.DeleteMaxStaminaTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.delete_max_stamina_table_master(
        stamina.DeleteMaxStaminaTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_max_stamina_table_name('max-stamina-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Delete maximum stamina table master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
maxStaminaTableName string ~ 128 chars Maximum Stamina Value Table Name

Result

Type Description
item MaxStaminaTableMaster Deleted maximum stamina table master

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.Gs2Stamina.Result.DescribeRecoverIntervalTableMastersResult> asyncResult = null;
yield return client.DescribeRecoverIntervalTableMasters(
    new Gs2.Gs2Stamina.Request.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(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.describe_recover_interval_table_masters(
        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:
    exit(1)

client = gs2('stamina')

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

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

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

Get list of stamina recovery interval table masters



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data acquired

Result

Type Description
items RecoverIntervalTableMaster[] List of Stamina recovery interval table masters
nextPageToken string Page token to retrieve the rest of the listing

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.Gs2Stamina.Result.CreateRecoverIntervalTableMasterResult> asyncResult = null;
yield return client.CreateRecoverIntervalTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_recover_interval_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Create new Stamina Recovery Interval Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Stamina recovery interval table name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] Stamina recovery interval table for each rank

Result

Type Description
item RecoverIntervalTableMaster Created Stamina Recovery Interval Table Master

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.Gs2Stamina.Result.GetRecoverIntervalTableMasterResult> asyncResult = null;
yield return client.GetRecoverIntervalTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.get_recover_interval_table_master(
        stamina.GetRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_interval_table_name('recover-interval-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Obtained Stamina Recovery Interval Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverIntervalTableName string ~ 128 chars Stamina recovery interval table name

Result

Type Description
item RecoverIntervalTableMaster Stamina recovery interval table master

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.Gs2Stamina.Result.UpdateRecoverIntervalTableMasterResult> asyncResult = null;
yield return client.UpdateRecoverIntervalTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_recover_interval_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Update stamina recovery interval table master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverIntervalTableName string ~ 128 chars Stamina recovery interval table name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] Stamina recovery interval table for each rank

Result

Type Description
item RecoverIntervalTableMaster Updated stamina recovery interval table master

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.Gs2Stamina.Result.DeleteRecoverIntervalTableMasterResult> asyncResult = null;
yield return client.DeleteRecoverIntervalTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.delete_recover_interval_table_master(
        stamina.DeleteRecoverIntervalTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_interval_table_name('recover-interval-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Delete stamina recovery interval table master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverIntervalTableName string ~ 128 chars Stamina recovery interval table name

Result

Type Description
item RecoverIntervalTableMaster Deleted stamina recovery interval table master

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.Gs2Stamina.Result.DescribeRecoverValueTableMastersResult> asyncResult = null;
yield return client.DescribeRecoverValueTableMasters(
    new Gs2.Gs2Stamina.Request.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(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.describe_recover_value_table_masters(
        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:
    exit(1)

client = gs2('stamina')

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

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

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

Get list of Stamina Recovery Amount Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
pageToken string ~ 1024 chars Token specifying the position from which to start acquiring data
limit int 30 1 ~ 1000 Number of data acquired

Result

Type Description
items RecoverValueTableMaster[] List of Stamina recovery amount table masters
nextPageToken string Page token to retrieve the rest of the listing

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.Gs2Stamina.Result.CreateRecoverValueTableMasterResult> asyncResult = null;
yield return client.CreateRecoverValueTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.create_recover_value_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Created new Stamina Recovery Amount Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Stamina recovery value table name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] Stamina recovery value table for each rank

Result

Type Description
item RecoverValueTableMaster Created Stamina Recovery Amount Table Master

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.Gs2Stamina.Result.GetRecoverValueTableMasterResult> asyncResult = null;
yield return client.GetRecoverValueTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.get_recover_value_table_master(
        stamina.GetRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_value_table_name('recover-value-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Get Stamina Recovery Amount Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverValueTableName string ~ 128 chars Stamina recovery value table name

Result

Type Description
item RecoverValueTableMaster Stamina recovery amount table master

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.Gs2Stamina.Result.UpdateRecoverValueTableMasterResult> asyncResult = null;
yield return client.UpdateRecoverValueTableMaster(
    new Gs2.Gs2Stamina.Request.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(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
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import stamina

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

try:
    result = client.update_recover_value_table_master(
        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:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Update Stamina Recovery Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverValueTableName string ~ 128 chars Stamina recovery value table name
description string ~ 1024 chars description of Namespace
metadata string ~ 128 chars metadata
experienceModelId string ~ 1024 chars Experience Model GRN
values int[] Stamina recovery value table for each rank

Result

Type Description
item RecoverValueTableMaster Updated Stamina Recovery Table Master

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.Gs2Stamina.Result.DeleteRecoverValueTableMasterResult> asyncResult = null;
yield return client.DeleteRecoverValueTableMaster(
    new Gs2.Gs2Stamina.Request.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

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

try:
    result = client.delete_recover_value_table_master(
        stamina.DeleteRecoverValueTableMasterRequest()
            .with_namespace_name(self.hash1)
            .with_recover_value_table_name('recover-value-table-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    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
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

Delete Stamina Recovery Table Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
recoverValueTableName string ~ 128 chars Stamina recovery value table name

Result

Type Description
item RecoverValueTableMaster Deleted Stamina Recovery Table Master

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.Gs2Stamina.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Stamina.Request.ExportMasterRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as 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

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

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

client = gs2('stamina')

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

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

result = api_result.result
item = result.item;

Export master data for the currently active stamina master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name

Result

Type Description
item CurrentStaminaMaster Currently available Stamina Master

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.Gs2Stamina.Result.GetCurrentStaminaMasterResult> asyncResult = null;
yield return client.GetCurrentStaminaMaster(
    new Gs2.Gs2Stamina.Request.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

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

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

client = gs2('stamina')

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

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

result = api_result.result
item = result.item;

Get the currently active Stamina Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name

Result

Type Description
item CurrentStaminaMaster Currently available Stamina Master

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("{\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109,\n          110,\n          111,\n          112,\n          113,\n          114,\n          115,\n          116,\n          117,\n          118,\n          119,\n          120,\n          121,\n          122,\n          123,\n          124,\n          125,\n          126,\n          127,\n          128,\n          129\n        ]\n      },\n      \"recoverIntervalTable\": {\n        \"name\": \"staminaRecoverInterval\",\n        \"metadata\": \"STAMINA_RECOVER_INTERVAL\",\n        \"experienceModelId\": \"playerLevel\",\n        \"values\": [\n          41,\n          42,\n          43,\n          44,\n          45,\n          46,\n          47,\n          48,\n          49,\n          50,\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109,\n          110,\n          111,\n          112,\n          113,\n          114,\n          115,\n          116,\n          117,\n          118,\n          119\n        ]\n      },\n      \"recoverValueTable\": {\n        \"name\": \"staminaRecoverValue\",\n        \"metadata\": \"STAMINA_RECOVER_VALUE\",\n        \"experienceModelId\": \"playerLevel\",\n        \"values\": [\n          31,\n          32,\n          33,\n          34,\n          35,\n          36,\n          37,\n          38,\n          39,\n          40,\n          41,\n          42,\n          43,\n          44,\n          45,\n          46,\n          47,\n          48,\n          49,\n          50,\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109\n        ]\n      }\n    },\n    {\n      \"name\": \"raidBattle\",\n      \"metadata\": \"RAID_BATTLE\",\n      \"recoverIntervalMinutes\": 60,\n      \"recoverValue\": 1,\n      \"initialCapacity\": 10,\n      \"isOverflow\": false\n    },\n    {\n      \"name\": \"special\",\n      \"metadata\": \"SPECIAL\",\n      \"recoverIntervalMinutes\": 30,\n      \"recoverValue\": 3,\n      \"initialCapacity\": 100,\n      \"isOverflow\": true,\n      \"maxCapacity\": 999,\n      \"maxStaminaTable\": {\n        \"name\": \"special\",\n        \"metadata\": \"SPECIAL\",\n        \"experienceModelId\": \"special\",\n        \"values\": [\n          102,\n          104,\n          106,\n          108,\n          110,\n          112,\n          114,\n          116,\n          118,\n          120,\n          122,\n          124,\n          126,\n          128,\n          130,\n          132,\n          134,\n          136,\n          138,\n          140,\n          142,\n          144,\n          146,\n          148,\n          150,\n          152,\n          154,\n          156,\n          158,\n          160,\n          162,\n          164,\n          166,\n          168,\n          170,\n          172,\n          174,\n          176,\n          178,\n          180,\n          182,\n          184,\n          186,\n          188,\n          190,\n          192,\n          194,\n          196,\n          198,\n          200,\n          202,\n          204,\n          206,\n          208,\n          210,\n          212,\n          214,\n          216,\n          218,\n          220,\n          222,\n          224,\n          226,\n          228,\n          230,\n          232,\n          234,\n          236,\n          238,\n          240,\n          242,\n          244,\n          246,\n          248,\n          250,\n          252,\n          254,\n          256,\n          258\n        ]\n      }\n    }\n  ]\n}"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\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("{\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109,\n          110,\n          111,\n          112,\n          113,\n          114,\n          115,\n          116,\n          117,\n          118,\n          119,\n          120,\n          121,\n          122,\n          123,\n          124,\n          125,\n          126,\n          127,\n          128,\n          129\n        ]\n      },\n      \"recoverIntervalTable\": {\n        \"name\": \"staminaRecoverInterval\",\n        \"metadata\": \"STAMINA_RECOVER_INTERVAL\",\n        \"experienceModelId\": \"playerLevel\",\n        \"values\": [\n          41,\n          42,\n          43,\n          44,\n          45,\n          46,\n          47,\n          48,\n          49,\n          50,\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109,\n          110,\n          111,\n          112,\n          113,\n          114,\n          115,\n          116,\n          117,\n          118,\n          119\n        ]\n      },\n      \"recoverValueTable\": {\n        \"name\": \"staminaRecoverValue\",\n        \"metadata\": \"STAMINA_RECOVER_VALUE\",\n        \"experienceModelId\": \"playerLevel\",\n        \"values\": [\n          31,\n          32,\n          33,\n          34,\n          35,\n          36,\n          37,\n          38,\n          39,\n          40,\n          41,\n          42,\n          43,\n          44,\n          45,\n          46,\n          47,\n          48,\n          49,\n          50,\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          66,\n          67,\n          68,\n          69,\n          70,\n          71,\n          72,\n          73,\n          74,\n          75,\n          76,\n          77,\n          78,\n          79,\n          80,\n          81,\n          82,\n          83,\n          84,\n          85,\n          86,\n          87,\n          88,\n          89,\n          90,\n          91,\n          92,\n          93,\n          94,\n          95,\n          96,\n          97,\n          98,\n          99,\n          100,\n          101,\n          102,\n          103,\n          104,\n          105,\n          106,\n          107,\n          108,\n          109\n        ]\n      }\n    },\n    {\n      \"name\": \"raidBattle\",\n      \"metadata\": \"RAID_BATTLE\",\n      \"recoverIntervalMinutes\": 60,\n      \"recoverValue\": 1,\n      \"initialCapacity\": 10,\n      \"isOverflow\": false\n    },\n    {\n      \"name\": \"special\",\n      \"metadata\": \"SPECIAL\",\n      \"recoverIntervalMinutes\": 30,\n      \"recoverValue\": 3,\n      \"initialCapacity\": 100,\n      \"isOverflow\": true,\n      \"maxCapacity\": 999,\n      \"maxStaminaTable<