NAV
go python java php typescript csharp GS2-Script

GS2-Enhance

GS2-SDK のリファレンス

モデル

Namespace

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

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

説明
namespaceId string ネームスペースGRN
name string ネームスペース名
description string 説明文
enableDirectEnhance bool DirectEnhance を利用できるようにするか
queueNamespaceId string スタンプシートの実行に使用する GS2-JobQueue のネームスペース
keyId string スタンプシートの発行に使用する GS2-Key のネームスペース
logSetting LogSetting ログの出力設定
createdAt long 作成日時
updatedAt long 最終更新日時

RateModel

強化レートは強化に使用する素材と強化対象を定義したデータです。

素材データ、強化対象データは共に GS2-Inventory で管理されている必要があります。 強化で得られる経験値は GS2-Inventory のメタデータにJSON形式で記録します。 ここではメタデータのどの階層に経験値の値が格納されているかを記載する必要があります。

強化時に一定の確率で 大成功 といった形で入手できる経験値量に補正値をかけることができます。 その抽選確率もこのエンティティで定義します。

説明
rateModelId string 強化レートモデルGRN
name string 強化レート名
description string 説明文
metadata string メタデータ
targetInventoryModelId string 強化対象に使用できるインベントリ
acquireExperienceSuffix string GS2-Experience で入手した経験値を格納する プロパティID に付与するサフィックス
materialInventoryModelId string インベントリモデルGRN
acquireExperienceHierarchy string[] 入手経験値を格納しているメタデータのJSON階層
experienceModelId string 経験値・ランクアップ閾値モデルGRN
bonusRates BonusRate[] 経験値獲得量ボーナス

RateModelMaster

強化レートは強化に使用する素材と強化対象を定義したデータです。

素材データ、強化対象データは共に GS2-Inventory で管理されている必要があります。 強化で得られる経験値は GS2-Inventory のメタデータにJSON形式で記録します。 ここではメタデータのどの階層に経験値の値が格納されているかを記載する必要があります。

強化時に一定の確率で 大成功 といった形で入手できる経験値量に補正値をかけることができます。 その抽選確率もこのエンティティで定義します。

説明
rateModelId string 強化レートマスターGRN
name string 強化レート名
description string 説明文
metadata string メタデータ
targetInventoryModelId string 強化対象に使用できるインベントリ
acquireExperienceSuffix string GS2-Experience で入手した経験値を格納する プロパティID に付与するサフィックス
materialInventoryModelId string 素材に使用できるインベントリ
acquireExperienceHierarchy string[] 入手経験値を格納しているメタデータのJSON階層
experienceModelId string 強化の結果を得られる経験値
bonusRates BonusRate[] 経験値獲得量ボーナス
createdAt long 作成日時
updatedAt long 最終更新日時

Progress

説明
progressId string 強化実行GRN
userId string ユーザーID
rateName string レートモデル名
propertyId string 強化対象のプロパティID
experienceValue int 入手できる経験値
rate float 経験値倍率
createdAt long 作成日時
updatedAt long 最終更新日時

CurrentRateMaster

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

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

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

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

Config

説明
key string 名前
value string

GitHubCheckoutSetting

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

LogSetting

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

BonusRate

説明
rate float 経験値ボーナスの倍率(1.0=ボーナスなし)
weight int 抽選重み

Material

説明
materialItemSetId string 有効期限ごとのアイテム所持数量GRN
count int 消費数量

メソッド

describeNamespaces

describeNamespaces

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DescribeNamespacesRequest;
import io.gs2.enhance.result.DescribeNamespacesResult;

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

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeNamespaces(
    new DescribeNamespacesRequest()
        .withPageToken(null)
        .withLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.describeNamespaces(
        new Gs2Enhance.DescribeNamespacesRequest()
            .withPageToken(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

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

client = gs2('enhance')

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

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

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

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

Request

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

Result

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

createNamespace

createNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &enhance.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        EnableDirectEnhance: pointy.Bool(true),
        QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        KeyId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001"),
        LogSetting: &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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)
            ->withEnableDirectEnhance(True)
            ->withQueueNamespaceId('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001')
            ->withKeyId('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001')
            ->withLogSetting((new \Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.CreateNamespaceRequest;
import io.gs2.enhance.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withEnableDirectEnhance(true)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
            .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001")
            .withLogSetting(new io.gs2.enhance.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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.CreateNamespaceRequest;
using Gs2.Gs2Enhance.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createNamespace(
    new CreateNamespaceRequest()
        .withName("namespace1")
        .withDescription(null)
        .withEnableDirectEnhance(true)
        .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
        .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001")
        .withLogSetting(new Gs2.Gs2Enhance.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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.createNamespace(
        new Gs2Enhance.CreateNamespaceRequest()
            .withName('namespace1')
            .withDescription(undefined)
            .withEnableDirectEnhance(true)
            .withQueueNamespaceId('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001')
            .withKeyId('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001')
            .withLogSetting(new Gs2Enhance.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 enhance

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

try:
    result = client.create_namespace(
        new enhance.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_enable_direct_enhance(True)
            .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001')
            .with_key_id('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001')
            .with_log_setting(
                enhance.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.create_namespace({
    name='namespace1',
    description=nil,
    enableDirectEnhance=true,
    queueNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001',
    keyId='grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001',
    logSetting={
        loggingNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1',
    },
});

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

result = api_result.result
item = result.item;

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

Request

必須 デフォルト 値の制限 説明
name string ~ 32文字 ネームスペース名
description string ~ 1024文字 説明文
enableDirectEnhance bool false DirectEnhance を利用できるようにするか
queueNamespaceId string ~ 1024文字 スタンプシートの実行に使用する GS2-JobQueue のネームスペース
keyId string ~ 1024文字 スタンプシートの発行に使用する GS2-Key のネームスペース
logSetting LogSetting ログの出力設定

Result

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

getNamespaceStatus

getNamespaceStatus

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetNamespaceStatusRequest;
import io.gs2.enhance.result.GetNamespaceStatusResult;

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

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getNamespaceStatus(
    new GetNamespaceStatusRequest()
        .withNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

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

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

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

client = gs2('enhance')

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

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

result = api_result.result
status = result.status;

ネームスペースを取得

Request

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

Result

説明
status string

getNamespace

getNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetNamespaceRequest;
import io.gs2.enhance.result.GetNamespaceResult;

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

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getNamespace(
    new GetNamespaceRequest()
        .withNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

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

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

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

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

ネームスペースを取得

Request

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

Result

説明
item Namespace ネームスペース

updateNamespace

updateNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &enhance.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        EnableDirectEnhance: pointy.Bool(false),
        QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        KeyId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001"),
        LogSetting: &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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')
            ->withEnableDirectEnhance(False)
            ->withQueueNamespaceId('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002')
            ->withKeyId('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001')
            ->withLogSetting((new \Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.UpdateNamespaceRequest;
import io.gs2.enhance.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withEnableDirectEnhance(false)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
            .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001")
            .withLogSetting(new io.gs2.enhance.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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.UpdateNamespaceRequest;
using Gs2.Gs2Enhance.Result.UpdateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateNamespace(
    new UpdateNamespaceRequest()
        .withNamespaceName("namespace1")
        .withDescription("description1")
        .withEnableDirectEnhance(false)
        .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
        .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001")
        .withLogSetting(new Gs2.Gs2Enhance.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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.updateNamespace(
        new Gs2Enhance.UpdateNamespaceRequest()
            .withNamespaceName('namespace1')
            .withDescription('description1')
            .withEnableDirectEnhance(false)
            .withQueueNamespaceId('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002')
            .withKeyId('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001')
            .withLogSetting(new Gs2Enhance.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 enhance

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

try:
    result = client.update_namespace(
        new enhance.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_enable_direct_enhance(False)
            .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002')
            .with_key_id('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001')
            .with_log_setting(
                enhance.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.update_namespace({
    namespaceName='namespace1',
    description='description1',
    enableDirectEnhance=false,
    queueNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002',
    keyId='grn:gs2:ap-northeast-1:YourOwnerId:key:namespace2:key:key-0001',
    logSetting={
        loggingNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1',
    },
});

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

result = api_result.result
item = result.item;

ネームスペースを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
description string ~ 1024文字 説明文
enableDirectEnhance bool false DirectEnhance を利用できるようにするか
queueNamespaceId string ~ 1024文字 スタンプシートの実行に使用する GS2-JobQueue のネームスペース
keyId string ~ 1024文字 スタンプシートの発行に使用する GS2-Key のネームスペース
logSetting LogSetting ログの出力設定

Result

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

deleteNamespace

deleteNamespace

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DeleteNamespaceRequest;
import io.gs2.enhance.result.DeleteNamespaceResult;

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

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteNamespace(
    new DeleteNamespaceRequest()
        .withNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

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

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

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

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

ネームスペースを削除

Request

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

Result

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

describeRateModels

describeRateModels

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DescribeRateModels(
    &enhance.DescribeRateModelsRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DescribeRateModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeRateModels(
        (new DescribeRateModelsRequest())
            ->withNamespaceName(self::namespace1)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DescribeRateModelsRequest;
import io.gs2.enhance.result.DescribeRateModelsResult;

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

try {
    DescribeRateModelsResult result = client.describeRateModels(
        new DescribeRateModelsRequest()
            .withNamespaceName("namespace1")
    );
    List<RateModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DescribeRateModelsRequest;
using Gs2.Gs2Enhance.Result.DescribeRateModelsResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeRateModels(
    new DescribeRateModelsRequest()
        .withNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.describeRateModels(
        new Gs2Enhance.DescribeRateModelsRequest()
            .withNamespaceName('namespace1')
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.describe_rate_models(
        new enhance.DescribeRateModelsRequest()
            .with_namespace_name(self.hash1)
    )
    items = result.items
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

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

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

result = api_result.result
items = result.items;

強化レートモデルの一覧を取得

Request

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

Result

説明
items RateModel[] 強化レートモデルのリスト

getRateModel

getRateModel

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetRateModel(
    &enhance.GetRateModelRequest {
        NamespaceName: pointy.String("namespace1"),
        RateName: pointy.String("character-level"),
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\GetRateModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getRateModel(
        (new GetRateModelRequest())
            ->withNamespaceName(self::namespace1)
            ->withRateName('character-level')
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetRateModelRequest;
import io.gs2.enhance.result.GetRateModelResult;

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

try {
    GetRateModelResult result = client.getRateModel(
        new GetRateModelRequest()
            .withNamespaceName("namespace1")
            .withRateName("character-level")
    );
    RateModel 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.GetRateModelRequest;
using Gs2.Gs2Enhance.Result.GetRateModelResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getRateModel(
    new GetRateModelRequest()
        .withNamespaceName("namespace1")
        .withRateName("character-level"),
    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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.getRateModel(
        new Gs2Enhance.GetRateModelRequest()
            .withNamespaceName('namespace1')
            .withRateName('character-level')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.get_rate_model(
        new enhance.GetRateModelRequest()
            .with_namespace_name(self.hash1)
            .with_rate_name('character-level')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.get_rate_model({
    namespaceName='namespace1',
    rateName='character-level',
});

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

result = api_result.result
item = result.item;

強化レートモデルを取得

Request

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

Result

説明
item RateModel 強化レートモデル

describeRateModelMasters

describeRateModelMasters

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DescribeRateModelMasters(
    &enhance.DescribeRateModelMastersRequest {
        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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DescribeRateModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeRateModelMasters(
        (new DescribeRateModelMastersRequest())
            ->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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DescribeRateModelMastersRequest;
import io.gs2.enhance.result.DescribeRateModelMastersResult;

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

try {
    DescribeRateModelMastersResult result = client.describeRateModelMasters(
        new DescribeRateModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<RateModelMaster> 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DescribeRateModelMastersRequest;
using Gs2.Gs2Enhance.Result.DescribeRateModelMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeRateModelMasters(
    new DescribeRateModelMastersRequest()
        .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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.describeRateModelMasters(
        new Gs2Enhance.DescribeRateModelMastersRequest()
            .withNamespaceName('namespace1')
            .withPageToken(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.describe_rate_model_masters(
        new enhance.DescribeRateModelMastersRequest()
            .with_namespace_name(self.hash1)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

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

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

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

強化レートマスターの一覧を取得

Request

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

Result

説明
items RateModelMaster[] 強化レートマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createRateModelMaster

createRateModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.CreateRateModelMaster(
    &enhance.CreateRateModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("character-level"),
        Description: nil,
        Metadata: pointy.String("CHARACTER_LEVEL"),
        TargetInventoryModelId: pointy.String("grn:inventory:character"),
        AcquireExperienceSuffix: pointy.String(":level"),
        MaterialInventoryModelId: pointy.String("grn:inventory:material"),
        AcquireExperienceHierarchy: []string{
            "experience",
        },
        ExperienceModelId: pointy.String("grn:experience:level"),
        BonusRates: [].BonusRate{
            enhance.BonusRate{
                Rate: pointy.Float32(1.0),
                Weight: pointy.Int32(90),
            },
        enhance.BonusRate{
                Rate: pointy.Float32(1.5),
                Weight: pointy.Int32(9),
            },
        enhance.BonusRate{
                Rate: pointy.Float32(2.0),
                Weight: pointy.Int32(1),
            },
        },
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\CreateRateModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createRateModelMaster(
        (new CreateRateModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName('character-level')
            ->withDescription(null)
            ->withMetadata('CHARACTER_LEVEL')
            ->withTargetInventoryModelId('grn:inventory:character')
            ->withAcquireExperienceSuffix(':level')
            ->withMaterialInventoryModelId('grn:inventory:material')
            ->withAcquireExperienceHierarchy([    'experience',
            ])
            ->withExperienceModelId('grn:experience:level')
            ->withBonusRates([    (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(1.0)
                ->withWeight(90),
            (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(1.5)
                ->withWeight(9),
            (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(2.0)
                ->withWeight(1),
            ])
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.CreateRateModelMasterRequest;
import io.gs2.enhance.result.CreateRateModelMasterResult;

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

try {
    CreateRateModelMasterResult result = client.createRateModelMaster(
        new CreateRateModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("character-level")
            .withDescription(null)
            .withMetadata("CHARACTER_LEVEL")
            .withTargetInventoryModelId("grn:inventory:character")
            .withAcquireExperienceSuffix(":level")
            .withMaterialInventoryModelId("grn:inventory:material")
            .withAcquireExperienceHierarchy(Arrays.asList(
                "experience"
            ))
            .withExperienceModelId("grn:experience:level")
            .withBonusRates(Arrays.asList(
                new io.gs2.enhance.model.BonusRate()
                    .withRate(1.0f)
                    .withWeight(90),
            new io.gs2.enhance.model.BonusRate()
                    .withRate(1.5f)
                    .withWeight(9),
            new io.gs2.enhance.model.BonusRate()
                    .withRate(2.0f)
                    .withWeight(1)
            ))
    );
    RateModelMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.CreateRateModelMasterRequest;
using Gs2.Gs2Enhance.Result.CreateRateModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createRateModelMaster(
    new CreateRateModelMasterRequest()
        .withNamespaceName("namespace1")
        .withName("character-level")
        .withDescription(null)
        .withMetadata("CHARACTER_LEVEL")
        .withTargetInventoryModelId("grn:inventory:character")
        .withAcquireExperienceSuffix(":level")
        .withMaterialInventoryModelId("grn:inventory:material")
        .withAcquireExperienceHierarchy(new string[] {
            "experience"
        })
        .withExperienceModelId("grn:experience:level")
        .withBonusRates(new Gs2.Gs2Enhance.Model.BonusRate[] {
            new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(1.0f)
                .WithWeight(90),
        new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(1.5f)
                .WithWeight(9),
        new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(2.0f)
                .WithWeight(1)
        }),
    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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.createRateModelMaster(
        new Gs2Enhance.CreateRateModelMasterRequest()
            .withNamespaceName('namespace1')
            .withName('character-level')
            .withDescription(undefined)
            .withMetadata('CHARACTER_LEVEL')
            .withTargetInventoryModelId('grn:inventory:character')
            .withAcquireExperienceSuffix(':level')
            .withMaterialInventoryModelId('grn:inventory:material')
            .withAcquireExperienceHierarchy([
                'experience'
            ])
            .withExperienceModelId('grn:experience:level')
            .withBonusRates([
                new Gs2Enhance.Model.BonusRate()
                    .withRate(1.0)
                    .withWeight(90),
            new Gs2Enhance.Model.BonusRate()
                    .withRate(1.5)
                    .withWeight(9),
            new Gs2Enhance.Model.BonusRate()
                    .withRate(2.0)
                    .withWeight(1)
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.create_rate_model_master(
        new enhance.CreateRateModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('character-level')
            .with_description(None)
            .with_metadata('CHARACTER_LEVEL')
            .with_target_inventory_model_id('grn:inventory:character')
            .with_acquire_experience_suffix(':level')
            .with_material_inventory_model_id('grn:inventory:material')
            .with_acquire_experience_hierarchy([    'experience',
            ])
            .with_experience_model_id('grn:experience:level')
            .with_bonus_rates([    enhance.BonusRate()
                .with_rate(1.0)
                .with_weight(90),
            enhance.BonusRate()
                .with_rate(1.5)
                .with_weight(9),
            enhance.BonusRate()
                .with_rate(2.0)
                .with_weight(1),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.create_rate_model_master({
    namespaceName='namespace1',
    name='character-level',
    description=nil,
    metadata='CHARACTER_LEVEL',
    targetInventoryModelId='grn:inventory:character',
    acquireExperienceSuffix=':level',
    materialInventoryModelId='grn:inventory:material',
    acquireExperienceHierarchy={
        'experience'
    },
    experienceModelId='grn:experience:level',
    bonusRates={
        {
            rate=1.0,
            weight=90,
        },
    {
            rate=1.5,
            weight=9,
        },
    {
            rate=2.0,
            weight=1,
        }
    },
});

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

result = api_result.result
item = result.item;

強化レートマスターを新規作成

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
name string ~ 128文字 強化レート名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
targetInventoryModelId string ~ 1024文字 強化対象に使用できるインベントリ
acquireExperienceSuffix string ~ 1024文字 GS2-Experience で入手した経験値を格納する プロパティID に付与するサフィックス
materialInventoryModelId string ~ 1024文字 素材に使用できるインベントリ
acquireExperienceHierarchy string[] 入手経験値を格納しているメタデータのJSON階層
experienceModelId string ~ 1024文字 強化の結果を得られる経験値
bonusRates BonusRate[] 経験値獲得量ボーナス

Result

説明
item RateModelMaster 作成した強化レートマスター

getRateModelMaster

getRateModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetRateModelMaster(
    &enhance.GetRateModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RateName: pointy.String("character-level"),
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\GetRateModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getRateModelMaster(
        (new GetRateModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRateName('character-level')
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetRateModelMasterRequest;
import io.gs2.enhance.result.GetRateModelMasterResult;

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

try {
    GetRateModelMasterResult result = client.getRateModelMaster(
        new GetRateModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRateName("character-level")
    );
    RateModelMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.GetRateModelMasterRequest;
using Gs2.Gs2Enhance.Result.GetRateModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getRateModelMaster(
    new GetRateModelMasterRequest()
        .withNamespaceName("namespace1")
        .withRateName("character-level"),
    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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.getRateModelMaster(
        new Gs2Enhance.GetRateModelMasterRequest()
            .withNamespaceName('namespace1')
            .withRateName('character-level')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.get_rate_model_master(
        new enhance.GetRateModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_rate_name('character-level')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.get_rate_model_master({
    namespaceName='namespace1',
    rateName='character-level',
});

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

result = api_result.result
item = result.item;

強化レートマスターを取得

Request

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

Result

説明
item RateModelMaster 強化レートマスター

updateRateModelMaster

updateRateModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.UpdateRateModelMaster(
    &enhance.UpdateRateModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RateName: pointy.String("character-level"),
        Description: nil,
        Metadata: pointy.String("CHARACTER_LEVEL2"),
        TargetInventoryModelId: pointy.String("grn:inventory:character2"),
        AcquireExperienceSuffix: pointy.String(":level2"),
        MaterialInventoryModelId: pointy.String("grn:inventory:material2"),
        AcquireExperienceHierarchy: []string{
            "experience2",
        },
        ExperienceModelId: pointy.String("grn:experience:level2"),
        BonusRates: [].BonusRate{
            enhance.BonusRate{
                Rate: pointy.Float32(1.05),
                Weight: pointy.Int32(905),
            },
        enhance.BonusRate{
                Rate: pointy.Float32(1.55),
                Weight: pointy.Int32(95),
            },
        enhance.BonusRate{
                Rate: pointy.Float32(2.05),
                Weight: pointy.Int32(15),
            },
        },
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\UpdateRateModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateRateModelMaster(
        (new UpdateRateModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRateName('character-level')
            ->withDescription(null)
            ->withMetadata('CHARACTER_LEVEL2')
            ->withTargetInventoryModelId('grn:inventory:character2')
            ->withAcquireExperienceSuffix(':level2')
            ->withMaterialInventoryModelId('grn:inventory:material2')
            ->withAcquireExperienceHierarchy([    'experience2',
            ])
            ->withExperienceModelId('grn:experience:level2')
            ->withBonusRates([    (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(1.05)
                ->withWeight(905),
            (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(1.55)
                ->withWeight(95),
            (new \Gs2\Enhance\Model\BonusRate())
                ->withRate(2.05)
                ->withWeight(15),
            ])
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.UpdateRateModelMasterRequest;
import io.gs2.enhance.result.UpdateRateModelMasterResult;

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

try {
    UpdateRateModelMasterResult result = client.updateRateModelMaster(
        new UpdateRateModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRateName("character-level")
            .withDescription(null)
            .withMetadata("CHARACTER_LEVEL2")
            .withTargetInventoryModelId("grn:inventory:character2")
            .withAcquireExperienceSuffix(":level2")
            .withMaterialInventoryModelId("grn:inventory:material2")
            .withAcquireExperienceHierarchy(Arrays.asList(
                "experience2"
            ))
            .withExperienceModelId("grn:experience:level2")
            .withBonusRates(Arrays.asList(
                new io.gs2.enhance.model.BonusRate()
                    .withRate(1.05f)
                    .withWeight(905),
            new io.gs2.enhance.model.BonusRate()
                    .withRate(1.55f)
                    .withWeight(95),
            new io.gs2.enhance.model.BonusRate()
                    .withRate(2.05f)
                    .withWeight(15)
            ))
    );
    RateModelMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.UpdateRateModelMasterRequest;
using Gs2.Gs2Enhance.Result.UpdateRateModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateRateModelMaster(
    new UpdateRateModelMasterRequest()
        .withNamespaceName("namespace1")
        .withRateName("character-level")
        .withDescription(null)
        .withMetadata("CHARACTER_LEVEL2")
        .withTargetInventoryModelId("grn:inventory:character2")
        .withAcquireExperienceSuffix(":level2")
        .withMaterialInventoryModelId("grn:inventory:material2")
        .withAcquireExperienceHierarchy(new string[] {
            "experience2"
        })
        .withExperienceModelId("grn:experience:level2")
        .withBonusRates(new Gs2.Gs2Enhance.Model.BonusRate[] {
            new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(1.05f)
                .WithWeight(905),
        new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(1.55f)
                .WithWeight(95),
        new Gs2.Gs2Enhance.Model.BonusRate()
                .WithRate(2.05f)
                .WithWeight(15)
        }),
    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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.updateRateModelMaster(
        new Gs2Enhance.UpdateRateModelMasterRequest()
            .withNamespaceName('namespace1')
            .withRateName('character-level')
            .withDescription(undefined)
            .withMetadata('CHARACTER_LEVEL2')
            .withTargetInventoryModelId('grn:inventory:character2')
            .withAcquireExperienceSuffix(':level2')
            .withMaterialInventoryModelId('grn:inventory:material2')
            .withAcquireExperienceHierarchy([
                'experience2'
            ])
            .withExperienceModelId('grn:experience:level2')
            .withBonusRates([
                new Gs2Enhance.Model.BonusRate()
                    .withRate(1.05)
                    .withWeight(905),
            new Gs2Enhance.Model.BonusRate()
                    .withRate(1.55)
                    .withWeight(95),
            new Gs2Enhance.Model.BonusRate()
                    .withRate(2.05)
                    .withWeight(15)
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.update_rate_model_master(
        new enhance.UpdateRateModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_rate_name('character-level')
            .with_description(None)
            .with_metadata('CHARACTER_LEVEL2')
            .with_target_inventory_model_id('grn:inventory:character2')
            .with_acquire_experience_suffix(':level2')
            .with_material_inventory_model_id('grn:inventory:material2')
            .with_acquire_experience_hierarchy([    'experience2',
            ])
            .with_experience_model_id('grn:experience:level2')
            .with_bonus_rates([    enhance.BonusRate()
                .with_rate(1.05)
                .with_weight(905),
            enhance.BonusRate()
                .with_rate(1.55)
                .with_weight(95),
            enhance.BonusRate()
                .with_rate(2.05)
                .with_weight(15),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.update_rate_model_master({
    namespaceName='namespace1',
    rateName='character-level',
    description=nil,
    metadata='CHARACTER_LEVEL2',
    targetInventoryModelId='grn:inventory:character2',
    acquireExperienceSuffix=':level2',
    materialInventoryModelId='grn:inventory:material2',
    acquireExperienceHierarchy={
        'experience2'
    },
    experienceModelId='grn:experience:level2',
    bonusRates={
        {
            rate=1.05,
            weight=905,
        },
    {
            rate=1.55,
            weight=95,
        },
    {
            rate=2.05,
            weight=15,
        }
    },
});

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

result = api_result.result
item = result.item;

強化レートマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
rateName string ~ 128文字 強化レート名
description string ~ 1024文字 説明文
metadata string ~ 2048文字 メタデータ
targetInventoryModelId string ~ 1024文字 強化対象に使用できるインベントリ
acquireExperienceSuffix string ~ 1024文字 GS2-Experience で入手した経験値を格納する プロパティID に付与するサフィックス
materialInventoryModelId string ~ 1024文字 素材に使用できるインベントリ
acquireExperienceHierarchy string[] 入手経験値を格納しているメタデータのJSON階層
experienceModelId string ~ 1024文字 強化の結果を得られる経験値
bonusRates BonusRate[] 経験値獲得量ボーナス

Result

説明
item RateModelMaster 更新した強化レートマスター

deleteRateModelMaster

deleteRateModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DeleteRateModelMaster(
    &enhance.DeleteRateModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RateName: pointy.String("character-level"),
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DeleteRateModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteRateModelMaster(
        (new DeleteRateModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRateName('character-level')
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DeleteRateModelMasterRequest;
import io.gs2.enhance.result.DeleteRateModelMasterResult;

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

try {
    DeleteRateModelMasterResult result = client.deleteRateModelMaster(
        new DeleteRateModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRateName("character-level")
    );
    RateModelMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DeleteRateModelMasterRequest;
using Gs2.Gs2Enhance.Result.DeleteRateModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteRateModelMaster(
    new DeleteRateModelMasterRequest()
        .withNamespaceName("namespace1")
        .withRateName("character-level"),
    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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.deleteRateModelMaster(
        new Gs2Enhance.DeleteRateModelMasterRequest()
            .withNamespaceName('namespace1')
            .withRateName('character-level')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.delete_rate_model_master(
        new enhance.DeleteRateModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_rate_name('character-level')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.delete_rate_model_master({
    namespaceName='namespace1',
    rateName='character-level',
});

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

result = api_result.result
item = result.item;

強化レートマスターを削除

Request

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

Result

説明
item RateModelMaster 削除した強化レートマスター

describeProgressesByUserId

describeProgressesByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DescribeProgressesByUserId(
    &enhance.DescribeProgressesByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DescribeProgressesByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeProgressesByUserId(
        (new DescribeProgressesByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withUserId('user-0001')
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DescribeProgressesByUserIdRequest;
import io.gs2.enhance.result.DescribeProgressesByUserIdResult;

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

try {
    DescribeProgressesByUserIdResult result = client.describeProgressesByUserId(
        new DescribeProgressesByUserIdRequest()
            .withNamespaceName("namespace2")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Progress> 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DescribeProgressesByUserIdRequest;
using Gs2.Gs2Enhance.Result.DescribeProgressesByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeProgressesByUserId(
    new DescribeProgressesByUserIdRequest()
        .withNamespaceName("namespace2")
        .withUserId("user-0001")
        .withPageToken(null)
        .withLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.describeProgressesByUserId(
        new Gs2Enhance.DescribeProgressesByUserIdRequest()
            .withNamespaceName('namespace2')
            .withUserId('user-0001')
            .withPageToken(undefined)
            .withLimit(undefined)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.describe_progresses_by_user_id(
        new enhance.DescribeProgressesByUserIdRequest()
            .with_namespace_name(self.hash2)
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.describe_progresses_by_user_id({
    namespaceName='namespace2',
    userId='user-0001',
    pageToken=nil,
    limit=nil,
});

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

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

強化実行の一覧を取得

Request

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

Result

説明
items Progress[] 強化実行のリスト
nextPageToken string リストの続きを取得するためのページトークン

createProgressByUserId

createProgressByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.CreateProgressByUserId(
    &enhance.CreateProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RateName: pointy.String("character-level"),
        TargetItemSetId: pointy.String("item-set-0001"),
        Materials: [].Material{
            {'materialItemSetId': 'material-0001', 'count': 1},
        },
        Force: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\CreateProgressByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createProgressByUserId(
        (new CreateProgressByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId('user-0001')
            ->withRateName('character-level')
            ->withTargetItemSetId('item-set-0001')
            ->withMaterials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            ->withForce(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.CreateProgressByUserIdRequest;
import io.gs2.enhance.result.CreateProgressByUserIdResult;

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

try {
    CreateProgressByUserIdResult result = client.createProgressByUserId(
        new CreateProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRateName("character-level")
            .withTargetItemSetId("item-set-0001")
            .withMaterials(Arrays.asList(
                {'materialItemSetId': 'material-0001', 'count': 1}
            ))
            .withForce(null)
    );
    Progress 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.CreateProgressByUserIdRequest;
using Gs2.Gs2Enhance.Result.CreateProgressByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createProgressByUserId(
    new CreateProgressByUserIdRequest()
        .withNamespaceName("namespace1")
        .withUserId("user-0001")
        .withRateName("character-level")
        .withTargetItemSetId("item-set-0001")
        .withMaterials(new Gs2.Gs2Enhance.Model.Material[] {
            {'materialItemSetId': 'material-0001', 'count': 1}
        })
        .withForce(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.createProgressByUserId(
        new Gs2Enhance.CreateProgressByUserIdRequest()
            .withNamespaceName('namespace1')
            .withUserId('user-0001')
            .withRateName('character-level')
            .withTargetItemSetId('item-set-0001')
            .withMaterials([
                {'materialItemSetId': 'material-0001', 'count': 1}
            ])
            .withForce(undefined)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.create_progress_by_user_id(
        new enhance.CreateProgressByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_rate_name('character-level')
            .with_target_item_set_id('item-set-0001')
            .with_materials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            .with_force(None)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.create_progress_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    rateName='character-level',
    targetItemSetId='item-set-0001',
    materials={
        {'materialItemSetId': 'material-0001', 'count': 1}
    },
    force=nil,
});

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

result = api_result.result
item = result.item;

ユーザIDを指定して強化実行を作成

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
rateName string ~ 128文字 レートモデル名
targetItemSetId string ~ 1024文字 有効期限ごとのアイテム所持数量GRN
materials Material[] 強化素材リスト
force bool false すでに開始している強化がある場合にそれを破棄して開始するか

Result

説明
item Progress 強化実行

getProgress

getProgress

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetProgress(
    &enhance.GetProgressRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
rateModel := result.RateModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\GetProgressRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getProgress(
        (new GetProgressRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
    );
    $item = $result->getItem();
    $rateModel = $result->getRateModel();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetProgressRequest;
import io.gs2.enhance.result.GetProgressResult;

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

try {
    GetProgressResult result = client.getProgress(
        new GetProgressRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
    );
    Progress item = result.getItem();
    RateModel rateModel = result.getRateModel();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.GetProgressRequest;
using Gs2.Gs2Enhance.Result.GetProgressResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getProgress(
    new GetProgressRequest()
        .withNamespaceName("namespace1")
        .withAccessToken("$access_token_0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var rateModel = result.RateModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.getProgress(
        new Gs2Enhance.GetProgressRequest()
            .withNamespaceName('namespace1')
            .withAccessToken('$access_token_0001')
    );
    const item = result.getItem();
    const rateModel = result.getRateModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.get_progress(
        new enhance.GetProgressRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
    )
    item = result.item
    rate_model = result.rate_model
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.get_progress({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
});

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

result = api_result.result
item = result.item;
rateModel = result.rateModel;

強化実行を取得

Request

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

Result

説明
item Progress 強化実行
rateModel RateModel 強化レートモデル

getProgressByUserId

getProgressByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetProgressByUserId(
    &enhance.GetProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        UserId: pointy.String("user-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
rateModel := result.RateModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\GetProgressByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getProgressByUserId(
        (new GetProgressByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withUserId('user-0001')
    );
    $item = $result->getItem();
    $rateModel = $result->getRateModel();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetProgressByUserIdRequest;
import io.gs2.enhance.result.GetProgressByUserIdResult;

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

try {
    GetProgressByUserIdResult result = client.getProgressByUserId(
        new GetProgressByUserIdRequest()
            .withNamespaceName("namespace2")
            .withUserId("user-0001")
    );
    Progress item = result.getItem();
    RateModel rateModel = result.getRateModel();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.GetProgressByUserIdRequest;
using Gs2.Gs2Enhance.Result.GetProgressByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getProgressByUserId(
    new GetProgressByUserIdRequest()
        .withNamespaceName("namespace2")
        .withUserId("user-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var rateModel = result.RateModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.getProgressByUserId(
        new Gs2Enhance.GetProgressByUserIdRequest()
            .withNamespaceName('namespace2')
            .withUserId('user-0001')
    );
    const item = result.getItem();
    const rateModel = result.getRateModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.get_progress_by_user_id(
        new enhance.GetProgressByUserIdRequest()
            .with_namespace_name(self.hash2)
            .with_user_id('user-0001')
    )
    item = result.item
    rate_model = result.rate_model
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.get_progress_by_user_id({
    namespaceName='namespace2',
    userId='user-0001',
});

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

result = api_result.result
item = result.item;
rateModel = result.rateModel;

ユーザIDを指定して強化実行を取得

Request

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

Result

説明
item Progress 強化実行
rateModel RateModel 強化レートモデル

start

start

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.Start(
    &enhance.StartRequest {
        NamespaceName: pointy.String("namespace1"),
        RateName: pointy.String("character-level"),
        TargetItemSetId: pointy.String("item-set-0001"),
        Materials: [].Material{
            {'materialItemSetId': 'material-0001', 'count': 1},
        },
        AccessToken: pointy.String("$access_token_0001"),
        Force: nil,
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\StartRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->start(
        (new StartRequest())
            ->withNamespaceName(self::namespace1)
            ->withRateName('character-level')
            ->withTargetItemSetId('item-set-0001')
            ->withMaterials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            ->withAccessToken(self::$accessToken0001)
            ->withForce(null)
            ->withConfig(null)
    );
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.StartRequest;
import io.gs2.enhance.result.StartResult;

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

try {
    StartResult result = client.start(
        new StartRequest()
            .withNamespaceName("namespace1")
            .withRateName("character-level")
            .withTargetItemSetId("item-set-0001")
            .withMaterials(Arrays.asList(
                {'materialItemSetId': 'material-0001', 'count': 1}
            ))
            .withAccessToken("$access_token_0001")
            .withForce(null)
            .withConfig(null)
    );
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.StartRequest;
using Gs2.Gs2Enhance.Result.StartResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.start(
    new StartRequest()
        .withNamespaceName("namespace1")
        .withRateName("character-level")
        .withTargetItemSetId("item-set-0001")
        .withMaterials(new Gs2.Gs2Enhance.Model.Material[] {
            {'materialItemSetId': 'material-0001', 'count': 1}
        })
        .withAccessToken("$access_token_0001")
        .withForce(null)
        .withConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.start(
        new Gs2Enhance.StartRequest()
            .withNamespaceName('namespace1')
            .withRateName('character-level')
            .withTargetItemSetId('item-set-0001')
            .withMaterials([
                {'materialItemSetId': 'material-0001', 'count': 1}
            ])
            .withAccessToken('$access_token_0001')
            .withForce(undefined)
            .withConfig(undefined)
    );
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.start(
        new enhance.StartRequest()
            .with_namespace_name(self.hash1)
            .with_rate_name('character-level')
            .with_target_item_set_id('item-set-0001')
            .with_materials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            .with_access_token(self.access_token_0001)
            .with_force(None)
            .with_config(None)
    )
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.start({
    namespaceName='namespace1',
    rateName='character-level',
    targetItemSetId='item-set-0001',
    materials={
        {'materialItemSetId': 'material-0001', 'count': 1}
    },
    accessToken='$access_token_0001',
    force=nil,
    config=nil,
});

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

result = api_result.result
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;

強化を開始

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
rateName string ~ 128文字 レートモデル名
targetItemSetId string ~ 1024文字 有効期限ごとのアイテム所持数量GRN
materials Material[] 強化素材リスト
accessToken string ~ 128文字 ユーザーID
force bool false すでに開始している強化がある場合にそれを破棄して開始するか
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
stampSheet string 強化の開始処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN

startByUserId

startByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.StartByUserId(
    &enhance.StartByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        RateName: pointy.String("character-level"),
        TargetItemSetId: pointy.String("item-set-0001"),
        Materials: [].Material{
            {'materialItemSetId': 'material-0001', 'count': 1},
        },
        UserId: pointy.String("user-0001"),
        Force: nil,
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\StartByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->startByUserId(
        (new StartByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withRateName('character-level')
            ->withTargetItemSetId('item-set-0001')
            ->withMaterials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            ->withUserId('user-0001')
            ->withForce(null)
            ->withConfig(null)
    );
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.StartByUserIdRequest;
import io.gs2.enhance.result.StartByUserIdResult;

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

try {
    StartByUserIdResult result = client.startByUserId(
        new StartByUserIdRequest()
            .withNamespaceName("namespace2")
            .withRateName("character-level")
            .withTargetItemSetId("item-set-0001")
            .withMaterials(Arrays.asList(
                {'materialItemSetId': 'material-0001', 'count': 1}
            ))
            .withUserId("user-0001")
            .withForce(null)
            .withConfig(null)
    );
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.StartByUserIdRequest;
using Gs2.Gs2Enhance.Result.StartByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.startByUserId(
    new StartByUserIdRequest()
        .withNamespaceName("namespace2")
        .withRateName("character-level")
        .withTargetItemSetId("item-set-0001")
        .withMaterials(new Gs2.Gs2Enhance.Model.Material[] {
            {'materialItemSetId': 'material-0001', 'count': 1}
        })
        .withUserId("user-0001")
        .withForce(null)
        .withConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.startByUserId(
        new Gs2Enhance.StartByUserIdRequest()
            .withNamespaceName('namespace2')
            .withRateName('character-level')
            .withTargetItemSetId('item-set-0001')
            .withMaterials([
                {'materialItemSetId': 'material-0001', 'count': 1}
            ])
            .withUserId('user-0001')
            .withForce(undefined)
            .withConfig(undefined)
    );
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.start_by_user_id(
        new enhance.StartByUserIdRequest()
            .with_namespace_name(self.hash2)
            .with_rate_name('character-level')
            .with_target_item_set_id('item-set-0001')
            .with_materials([    {'materialItemSetId': 'material-0001', 'count': 1},
            ])
            .with_user_id('user-0001')
            .with_force(None)
            .with_config(None)
    )
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.start_by_user_id({
    namespaceName='namespace2',
    rateName='character-level',
    targetItemSetId='item-set-0001',
    materials={
        {'materialItemSetId': 'material-0001', 'count': 1}
    },
    userId='user-0001',
    force=nil,
    config=nil,
});

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

result = api_result.result
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;

ユーザIDを指定して強化を開始

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
rateName string ~ 128文字 レートモデル名
targetItemSetId string ~ 1024文字 有効期限ごとのアイテム所持数量GRN
materials Material[] 強化素材リスト
userId string ~ 128文字 ユーザーID
force bool false すでに開始している強化がある場合にそれを破棄して開始するか
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
stampSheet string 強化の開始処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN

end

end

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.End(
    &enhance.EndRequest {
        NamespaceName: pointy.String("namespace2"),
        AccessToken: pointy.String("$access_token_0001"),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
acquireExperience := result.AcquireExperience
bonusRate := result.BonusRate
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\EndRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->end(
        (new EndRequest())
            ->withNamespaceName(self::namespace2)
            ->withAccessToken(self::$accessToken0001)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $acquireExperience = $result->getAcquireExperience();
    $bonusRate = $result->getBonusRate();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.EndRequest;
import io.gs2.enhance.result.EndResult;

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

try {
    EndResult result = client.end(
        new EndRequest()
            .withNamespaceName("namespace2")
            .withAccessToken("$access_token_0001")
            .withConfig(null)
    );
    Progress item = result.getItem();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    long acquireExperience = result.getAcquireExperience();
    float bonusRate = result.getBonusRate();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.EndRequest;
using Gs2.Gs2Enhance.Result.EndResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.end(
    new EndRequest()
        .withNamespaceName("namespace2")
        .withAccessToken("$access_token_0001")
        .withConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var acquireExperience = result.AcquireExperience;
var bonusRate = result.BonusRate;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.end(
        new Gs2Enhance.EndRequest()
            .withNamespaceName('namespace2')
            .withAccessToken('$access_token_0001')
            .withConfig(undefined)
    );
    const item = result.getItem();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const acquireExperience = result.getAcquireExperience();
    const bonusRate = result.getBonusRate();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.end(
        new enhance.EndRequest()
            .with_namespace_name(self.hash2)
            .with_access_token(self.access_token_0001)
            .with_config(None)
    )
    item = result.item
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    acquire_experience = result.acquire_experience
    bonus_rate = result.bonus_rate
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.end({
    namespaceName='namespace2',
    accessToken='$access_token_0001',
    config=nil,
});

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

result = api_result.result
item = result.item;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
acquireExperience = result.acquireExperience;
bonusRate = result.bonusRate;

強化を完了

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
item Progress 強化実行
stampSheet string 報酬付与処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN
acquireExperience long 獲得経験値量
bonusRate float 経験値ボーナスの倍率(1.0=ボーナスなし)

endByUserId

endByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.EndByUserId(
    &enhance.EndByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        UserId: pointy.String("user-0001"),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
acquireExperience := result.AcquireExperience
bonusRate := result.BonusRate
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\EndByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->endByUserId(
        (new EndByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withUserId('user-0001')
            ->withConfig(null)
    );
    $item = $result->getItem();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $acquireExperience = $result->getAcquireExperience();
    $bonusRate = $result->getBonusRate();
} 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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.EndByUserIdRequest;
import io.gs2.enhance.result.EndByUserIdResult;

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

try {
    EndByUserIdResult result = client.endByUserId(
        new EndByUserIdRequest()
            .withNamespaceName("namespace2")
            .withUserId("user-0001")
            .withConfig(null)
    );
    Progress item = result.getItem();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    long acquireExperience = result.getAcquireExperience();
    float bonusRate = result.getBonusRate();
} 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.EndByUserIdRequest;
using Gs2.Gs2Enhance.Result.EndByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.endByUserId(
    new EndByUserIdRequest()
        .withNamespaceName("namespace2")
        .withUserId("user-0001")
        .withConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var acquireExperience = result.AcquireExperience;
var bonusRate = result.BonusRate;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.endByUserId(
        new Gs2Enhance.EndByUserIdRequest()
            .withNamespaceName('namespace2')
            .withUserId('user-0001')
            .withConfig(undefined)
    );
    const item = result.getItem();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const acquireExperience = result.getAcquireExperience();
    const bonusRate = result.getBonusRate();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.end_by_user_id(
        new enhance.EndByUserIdRequest()
            .with_namespace_name(self.hash2)
            .with_user_id('user-0001')
            .with_config(None)
    )
    item = result.item
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    acquire_experience = result.acquire_experience
    bonus_rate = result.bonus_rate
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.end_by_user_id({
    namespaceName='namespace2',
    userId='user-0001',
    config=nil,
});

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

result = api_result.result
item = result.item;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
acquireExperience = result.acquireExperience;
bonusRate = result.bonusRate;

ユーザIDを指定して強化を完了

開始時に受け取った強化において入手可能な報酬とその数量の"最大値"のうち、強化内で実際に入手した報酬を rewards で報告します。 isComplete には強化をクリアできたかを報告します。強化に失敗した場合、rewards の値は無視して強化に設定された失敗した場合の報酬が付与されます。

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
item Progress 強化実行
stampSheet string 報酬付与処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN
acquireExperience long 獲得経験値量
bonusRate float 経験値ボーナスの倍率(1.0=ボーナスなし)

deleteProgress

deleteProgress

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DeleteProgress(
    &enhance.DeleteProgressRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DeleteProgressRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteProgress(
        (new DeleteProgressRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DeleteProgressRequest;
import io.gs2.enhance.result.DeleteProgressResult;

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

try {
    DeleteProgressResult result = client.deleteProgress(
        new DeleteProgressRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
    );
    Progress 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DeleteProgressRequest;
using Gs2.Gs2Enhance.Result.DeleteProgressResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteProgress(
    new DeleteProgressRequest()
        .withNamespaceName("namespace1")
        .withAccessToken("$access_token_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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.deleteProgress(
        new Gs2Enhance.DeleteProgressRequest()
            .withNamespaceName('namespace1')
            .withAccessToken('$access_token_0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.delete_progress(
        new enhance.DeleteProgressRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.delete_progress({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
});

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

result = api_result.result
item = result.item;

強化実行を取得

Request

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

Result

説明
item Progress 強化実行

deleteProgressByUserId

deleteProgressByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DeleteProgressByUserId(
    &enhance.DeleteProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace2"),
        UserId: pointy.String("user-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DeleteProgressByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteProgressByUserId(
        (new DeleteProgressByUserIdRequest())
            ->withNamespaceName(self::namespace2)
            ->withUserId('user-0001')
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DeleteProgressByUserIdRequest;
import io.gs2.enhance.result.DeleteProgressByUserIdResult;

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

try {
    DeleteProgressByUserIdResult result = client.deleteProgressByUserId(
        new DeleteProgressByUserIdRequest()
            .withNamespaceName("namespace2")
            .withUserId("user-0001")
    );
    Progress 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DeleteProgressByUserIdRequest;
using Gs2.Gs2Enhance.Result.DeleteProgressByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteProgressByUserId(
    new DeleteProgressByUserIdRequest()
        .withNamespaceName("namespace2")
        .withUserId("user-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.deleteProgressByUserId(
        new Gs2Enhance.DeleteProgressByUserIdRequest()
            .withNamespaceName('namespace2')
            .withUserId('user-0001')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.delete_progress_by_user_id(
        new enhance.DeleteProgressByUserIdRequest()
            .with_namespace_name(self.hash2)
            .with_user_id('user-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.delete_progress_by_user_id({
    namespaceName='namespace2',
    userId='user-0001',
});

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

result = api_result.result
item = result.item;

ユーザIDを指定して強化実行を削除

Request

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

Result

説明
item Progress 強化実行

createProgressByStampSheet

createProgressByStampSheet

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.CreateProgressByStampSheet(
    &enhance.CreateProgressByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\CreateProgressByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createProgressByStampSheet(
        (new CreateProgressByStampSheetRequest())
            ->withStampSheet(self::$stampSheet)
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.CreateProgressByStampSheetRequest;
import io.gs2.enhance.result.CreateProgressByStampSheetResult;

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

try {
    CreateProgressByStampSheetResult result = client.createProgressByStampSheet(
        new CreateProgressByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    Progress 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.CreateProgressByStampSheetRequest;
using Gs2.Gs2Enhance.Result.CreateProgressByStampSheetResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createProgressByStampSheet(
    new CreateProgressByStampSheetRequest()
        .withStampSheet("$stampSheet")
        .withKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.createProgressByStampSheet(
        new Gs2Enhance.CreateProgressByStampSheetRequest()
            .withStampSheet('$stampSheet')
            .withKeyId('$key1.keyId')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

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

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

スタンプシートで強化を開始

Request

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

Result

説明
item Progress 強化実行

deleteProgressByStampTask

deleteProgressByStampTask

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.DeleteProgressByStampTask(
    &enhance.DeleteProgressByStampTaskRequest {
        StampTask: pointy.String("$stampTask"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
newContextStack := result.NewContextStack
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\DeleteProgressByStampTaskRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteProgressByStampTask(
        (new DeleteProgressByStampTaskRequest())
            ->withStampTask(self::$stampTask)
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.DeleteProgressByStampTaskRequest;
import io.gs2.enhance.result.DeleteProgressByStampTaskResult;

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

try {
    DeleteProgressByStampTaskResult result = client.deleteProgressByStampTask(
        new DeleteProgressByStampTaskRequest()
            .withStampTask("$stampTask")
            .withKeyId("$key1.keyId")
    );
    Progress item = result.getItem();
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.DeleteProgressByStampTaskRequest;
using Gs2.Gs2Enhance.Result.DeleteProgressByStampTaskResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteProgressByStampTask(
    new DeleteProgressByStampTaskRequest()
        .withStampTask("$stampTask")
        .withKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var newContextStack = result.NewContextStack;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.deleteProgressByStampTask(
        new Gs2Enhance.DeleteProgressByStampTaskRequest()
            .withStampTask('$stampTask')
            .withKeyId('$key1.keyId')
    );
    const item = result.getItem();
    const newContextStack = result.getNewContextStack();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.delete_progress_by_stamp_task(
        new enhance.DeleteProgressByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.delete_progress_by_stamp_task({
    stampTask='$stampTask',
    keyId='$key1.keyId',
});

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

result = api_result.result
item = result.item;
newContextStack = result.newContextStack;

スタンプタスクで 強化実行 を削除

Request

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

Result

説明
item Progress 強化実行
newContextStack string スタンプタスクの実行結果を記録したコンテキスト

exportMaster

exportMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &enhance.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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.ExportMasterRequest;
import io.gs2.enhance.result.ExportMasterResult;

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

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

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.exportMaster(
    new ExportMasterRequest()
        .withNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

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

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

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

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

現在有効な強化レート設定のマスターデータをエクスポートします

Request

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

Result

説明
item CurrentRateMaster 現在有効な強化レート設定

getCurrentRateMaster

getCurrentRateMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.GetCurrentRateMaster(
    &enhance.GetCurrentRateMasterRequest {
        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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\GetCurrentRateMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentRateMaster(
        (new GetCurrentRateMasterRequest())
            ->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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.GetCurrentRateMasterRequest;
import io.gs2.enhance.result.GetCurrentRateMasterResult;

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

try {
    GetCurrentRateMasterResult result = client.getCurrentRateMaster(
        new GetCurrentRateMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentRateMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.GetCurrentRateMasterRequest;
using Gs2.Gs2Enhance.Result.GetCurrentRateMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getCurrentRateMaster(
    new GetCurrentRateMasterRequest()
        .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 Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.getCurrentRateMaster(
        new Gs2Enhance.GetCurrentRateMasterRequest()
            .withNamespaceName('namespace1')
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.get_current_rate_master(
        new enhance.GetCurrentRateMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

現在有効な強化レート設定を取得します

Request

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

Result

説明
item CurrentRateMaster 現在有効な強化レート設定

updateCurrentRateMaster

updateCurrentRateMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRateMaster(
    &enhance.UpdateCurrentRateMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String(`{
          "version": "2020-08-22",
          "rateModels": [
            {
              "name": "character-level",
              "metadata": "CHARACTER_LEVEL",
              "targetInventoryModelId": "grn:inventory:character:character-0001",
              "materialInventoryModelId": "grn:inventory:material",
              "acquireExperienceSuffix": ":level",
              "acquireExperienceHierarchy": [
                "experience"
              ],
              "experienceModelId": "grn:experience:character:level",
              "bonusRates": [
                {
                  "rate": 1.0,
                  "weight": 90
                },
                {
                  "rate": 1.5,
                  "weight": 9
                },
                {
                  "rate": 2.0,
                  "weight": 1
                }
              ]
            },
            {
              "name": "character-friendly",
              "metadata": "CHARACTER_FRIENDLY",
              "targetInventoryModelId": "grn:inventory:character:character-0001",
              "materialInventoryModelId": "grn:inventory:material",
              "acquireExperienceSuffix": ":friendly",
              "experienceModelId": "grn:experience:character:friendly",
              "acquireExperienceHierarchy": [
                "taste"
              ],
              "bonusRates": [
                {
                  "rate": 1.0,
                  "weight": 1
                }
              ]
            }
          ]
        }`),
    }
)
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\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\UpdateCurrentRateMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentRateMaster(
        (new UpdateCurrentRateMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{
              \"version\": \"2020-08-22\",
              \"rateModels\": [
                {
                  \"name\": \"character-level\",
                  \"metadata\": \"CHARACTER_LEVEL\",
                  \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",
                  \"materialInventoryModelId\": \"grn:inventory:material\",
                  \"acquireExperienceSuffix\": \":level\",
                  \"acquireExperienceHierarchy\": [
                    \"experience\"
                  ],
                  \"experienceModelId\": \"grn:experience:character:level\",
                  \"bonusRates\": [
                    {
                      \"rate\": 1.0,
                      \"weight\": 90
                    },
                    {
                      \"rate\": 1.5,
                      \"weight\": 9
                    },
                    {
                      \"rate\": 2.0,
                      \"weight\": 1
                    }
                  ]
                },
                {
                  \"name\": \"character-friendly\",
                  \"metadata\": \"CHARACTER_FRIENDLY\",
                  \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",
                  \"materialInventoryModelId\": \"grn:inventory:material\",
                  \"acquireExperienceSuffix\": \":friendly\",
                  \"experienceModelId\": \"grn:experience:character:friendly\",
                  \"acquireExperienceHierarchy\": [
                    \"taste\"
                  ],
                  \"bonusRates\": [
                    {
                      \"rate\": 1.0,
                      \"weight\": 1
                    }
                  ]
                }
              ]
            }")
    );
    $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.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.UpdateCurrentRateMasterRequest;
import io.gs2.enhance.result.UpdateCurrentRateMasterResult;

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

try {
    UpdateCurrentRateMasterResult result = client.updateCurrentRateMaster(
        new UpdateCurrentRateMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2020-08-22\",\n  \"rateModels\": [\n    {\n      \"name\": \"character-level\",\n      \"metadata\": \"CHARACTER_LEVEL\",\n      \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",\n      \"materialInventoryModelId\": \"grn:inventory:material\",\n      \"acquireExperienceSuffix\": \":level\",\n      \"acquireExperienceHierarchy\": [\n        \"experience\"\n      ],\n      \"experienceModelId\": \"grn:experience:character:level\",\n      \"bonusRates\": [\n        {\n          \"rate\": 1.0,\n          \"weight\": 90\n        },\n        {\n          \"rate\": 1.5,\n          \"weight\": 9\n        },\n        {\n          \"rate\": 2.0,\n          \"weight\": 1\n        }\n      ]\n    },\n    {\n      \"name\": \"character-friendly\",\n      \"metadata\": \"CHARACTER_FRIENDLY\",\n      \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",\n      \"materialInventoryModelId\": \"grn:inventory:material\",\n      \"acquireExperienceSuffix\": \":friendly\",\n      \"experienceModelId\": \"grn:experience:character:friendly\",\n      \"acquireExperienceHierarchy\": [\n        \"taste\"\n      ],\n      \"bonusRates\": [\n        {\n          \"rate\": 1.0,\n          \"weight\": 1\n        }\n      ]\n    }\n  ]\n}")
    );
    CurrentRateMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.UpdateCurrentRateMasterRequest;
using Gs2.Gs2Enhance.Result.UpdateCurrentRateMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateCurrentRateMaster(
    new UpdateCurrentRateMasterRequest()
        .withNamespaceName("namespace1")
        .withSettings("{\n  \"version\": \"2020-08-22\",\n  \"rateModels\": [\n    {\n      \"name\": \"character-level\",\n      \"metadata\": \"CHARACTER_LEVEL\",\n      \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",\n      \"materialInventoryModelId\": \"grn:inventory:material\",\n      \"acquireExperienceSuffix\": \":level\",\n      \"acquireExperienceHierarchy\": [\n        \"experience\"\n      ],\n      \"experienceModelId\": \"grn:experience:character:level\",\n      \"bonusRates\": [\n        {\n          \"rate\": 1.0,\n          \"weight\": 90\n        },\n        {\n          \"rate\": 1.5,\n          \"weight\": 9\n        },\n        {\n          \"rate\": 2.0,\n          \"weight\": 1\n        }\n      ]\n    },\n    {\n      \"name\": \"character-friendly\",\n      \"metadata\": \"CHARACTER_FRIENDLY\",\n      \"targetInventoryModelId\": \"grn:inventory:character:character-0001\",\n      \"materialInventoryModelId\": \"grn:inventory:material\",\n      \"acquireExperienceSuffix\": \":friendly\",\n      \"experienceModelId\": \"grn:experience:character:friendly\",\n      \"acquireExperienceHierarchy\": [\n        \"taste\"\n      ],\n      \"bonusRates\": [\n        {\n          \"rate\": 1.0,\n          \"weight\": 1\n        }\n      ]\n    }\n  ]\n}"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

try {
    const result = await client.updateCurrentRateMaster(
        new Gs2Enhance.UpdateCurrentRateMasterRequest()
            .withNamespaceName('namespace1')
            .withSettings(`{
              "version": "2020-08-22",
              "rateModels": [
                {
                  "name": "character-level",
                  "metadata": "CHARACTER_LEVEL",
                  "targetInventoryModelId": "grn:inventory:character:character-0001",
                  "materialInventoryModelId": "grn:inventory:material",
                  "acquireExperienceSuffix": ":level",
                  "acquireExperienceHierarchy": [
                    "experience"
                  ],
                  "experienceModelId": "grn:experience:character:level",
                  "bonusRates": [
                    {
                      "rate": 1.0,
                      "weight": 90
                    },
                    {
                      "rate": 1.5,
                      "weight": 9
                    },
                    {
                      "rate": 2.0,
                      "weight": 1
                    }
                  ]
                },
                {
                  "name": "character-friendly",
                  "metadata": "CHARACTER_FRIENDLY",
                  "targetInventoryModelId": "grn:inventory:character:character-0001",
                  "materialInventoryModelId": "grn:inventory:material",
                  "acquireExperienceSuffix": ":friendly",
                  "experienceModelId": "grn:experience:character:friendly",
                  "acquireExperienceHierarchy": [
                    "taste"
                  ],
                  "bonusRates": [
                    {
                      "rate": 1.0,
                      "weight": 1
                    }
                  ]
                }
              ]
            }`)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import enhance

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

try:
    result = client.update_current_rate_master(
        new enhance.UpdateCurrentRateMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{\n  "version": "2020-08-22",\n  "rateModels": [\n    {\n      "name": "character-level",\n      "metadata": "CHARACTER_LEVEL",\n      "targetInventoryModelId": "grn:inventory:character:character-0001",\n      "materialInventoryModelId": "grn:inventory:material",\n      "acquireExperienceSuffix": ":level",\n      "acquireExperienceHierarchy": [\n        "experience"\n      ],\n      "experienceModelId": "grn:experience:character:level",\n      "bonusRates": [\n        {\n          "rate": 1.0,\n          "weight": 90\n        },\n        {\n          "rate": 1.5,\n          "weight": 9\n        },\n        {\n          "rate": 2.0,\n          "weight": 1\n        }\n      ]\n    },\n    {\n      "name": "character-friendly",\n      "metadata": "CHARACTER_FRIENDLY",\n      "targetInventoryModelId": "grn:inventory:character:character-0001",\n      "materialInventoryModelId": "grn:inventory:material",\n      "acquireExperienceSuffix": ":friendly",\n      "experienceModelId": "grn:experience:character:friendly",\n      "acquireExperienceHierarchy": [\n        "taste"\n      ],\n      "bonusRates": [\n        {\n          "rate": 1.0,\n          "weight": 1\n        }\n      ]\n    }\n  ]\n}')
    )
    item = result.item
except core.Gs2Exception as e:
    os.exit(1);

client = gs2('enhance')

api_result = client.update_current_rate_master({
    namespaceName='namespace1',
    settings='{\n  "version": "2020-08-22",\n  "rateModels": [\n    {\n      "name": "character-level",\n      "metadata": "CHARACTER_LEVEL",\n      "targetInventoryModelId": "grn:inventory:character:character-0001",\n      "materialInventoryModelId": "grn:inventory:material",\n      "acquireExperienceSuffix": ":level",\n      "acquireExperienceHierarchy": [\n        "experience"\n      ],\n      "experienceModelId": "grn:experience:character:level",\n      "bonusRates": [\n        {\n          "rate": 1.0,\n          "weight": 90\n        },\n        {\n          "rate": 1.5,\n          "weight": 9\n        },\n        {\n          "rate": 2.0,\n          "weight": 1\n        }\n      ]\n    },\n    {\n      "name": "character-friendly",\n      "metadata": "CHARACTER_FRIENDLY",\n      "targetInventoryModelId": "grn:inventory:character:character-0001",\n      "materialInventoryModelId": "grn:inventory:material",\n      "acquireExperienceSuffix": ":friendly",\n      "experienceModelId": "grn:experience:character:friendly",\n      "acquireExperienceHierarchy": [\n        "taste"\n      ],\n      "bonusRates": [\n        {\n          "rate": 1.0,\n          "weight": 1\n        }\n      ]\n    }\n  ]\n}',
});

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

result = api_result.result
item = result.item;

現在有効な強化レート設定を更新します

Request

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

Result

説明
item CurrentRateMaster 更新した現在有効な強化レート設定

updateCurrentRateMasterFromGitHub

updateCurrentRateMasterFromGitHub

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/enhance"
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 := enhance.Gs2EnhanceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRateMasterFromGitHub(
    &enhance.UpdateCurrentRateMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace1"),
        CheckoutSetting: {'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'},
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Enhance\Gs2EnhanceRestClient;
use Gs2\Enhance\Request\UpdateCurrentRateMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentRateMasterFromGitHub(
        (new UpdateCurrentRateMasterFromGitHubRequest())
            ->withNamespaceName(self::namespace1)
            ->withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.enhance.rest.Gs2EnhanceRestClient;
import io.gs2.enhance.request.UpdateCurrentRateMasterFromGitHubRequest;
import io.gs2.enhance.result.UpdateCurrentRateMasterFromGitHubResult;

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

try {
    UpdateCurrentRateMasterFromGitHubResult result = client.updateCurrentRateMasterFromGitHub(
        new UpdateCurrentRateMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    CurrentRateMaster 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.Gs2Enhance.Gs2EnhanceRestClient;
using Gs2.Gs2Enhance.Request.UpdateCurrentRateMasterFromGitHubRequest;
using Gs2.Gs2Enhance.Result.UpdateCurrentRateMasterFromGitHubResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateCurrentRateMasterFromGitHub(
    new UpdateCurrentRateMasterFromGitHubRequest()
        .withNamespaceName("namespace1")
        .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'}),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Enhance from '@/gs2/enhance';

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

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

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

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

client = gs2('enhance')

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

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

result = api_result.result
item = result.item;

現在有効な強化レート設定を更新します

Request

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

Result

説明
item CurrentRateMaster 更新した現在有効な強化レート設定