NAV
go python java php typescript csharp GS2-Script

GS2-Quest

GS2-SDK のリファレンス

モデル

Namespace

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

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

説明
namespaceId string クエストを分類するカテゴリーGRN
name string ネームスペース名
description string 説明文
startQuestScript ScriptSetting クエスト開始したときに実行するスクリプト
completeQuestScript ScriptSetting クエストクリアしたときに実行するスクリプト
failedQuestScript ScriptSetting クエスト失敗したときに実行するスクリプト
queueNamespaceId string スタンプシートの実行に使用する GS2-JobQueue のネームスペース
keyId string スタンプシートの発行に使用する GS2-Key のネームスペース
logSetting LogSetting ログの出力設定
createdAt long 作成日時
updatedAt long 最終更新日時

QuestGroupModelMaster

クエストグループは複数のクエストをグルーピングするためのエンティティで、クエストの進行はグループ内で同時に1つしか実行できません。 つまり、並列でクエストを進行できるようにする必要がある場合はグループを分ける必要があります。

説明
questGroupModelId string クエストグループマスターGRN
name string クエストグループモデル名
description string 説明文
metadata string メタデータ
challengePeriodEventId string クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN
createdAt long 作成日時
updatedAt long 最終更新日時

QuestModelMaster

クエストはインゲームの開始に必要な対価とクリアしたときに得られる報酬を保持するエンティティです。

クリアしたときに得られる報酬は複数のバリエーションを用意でき、クエスト開始時に抽選することができます。 例えば、クエストのクリアフラグ管理は同じコンテンツだが、レアモンスターの出現有無で2種類のコンテンツを用意することができます。

説明
questModelId string クエストモデルマスターGRN
questGroupName string クエストモデル名
name string クエスト名
description string 説明文
metadata string メタデータ
contents Contents[] クエストの内容
challengePeriodEventId string クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN
consumeActions ConsumeAction[] クエストの参加料
failedAcquireActions AcquireAction[] クエスト失敗時の報酬
premiseQuestNames string[] クエストに挑戦するためにクリアしておく必要のあるクエスト名
createdAt long 作成日時
updatedAt long 最終更新日時

CurrentQuestMaster

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

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

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

説明
namespaceId string クエストを分類するカテゴリーGRN
settings string マスターデータ

Contents

説明
metadata string メタデータ
completeAcquireActions AcquireAction[] クエストクリア時の報酬
weight int 抽選する重み

ConsumeAction

説明
action string スタンプタスクで実行するアクションの種類
request string 入手リクエストのJSON

AcquireAction

説明
action string スタンプシートで実行するアクションの種類
request string 消費リクエストのJSON

Reward

説明
action string スタンプシートで実行するアクションの種類
request string リクエストモデル
itemId string 入手するリソースGRN
value int 入手する数量

Config

説明
key string 名前
value string

GitHubCheckoutSetting

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

ScriptSetting

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

LogSetting

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

Progress

インゲームの開始状況を保持するエンティティです。 クエストの開始時に作成され、終了時に削除されます。

インゲームの途中でアプリを終了した際にはこのデータが残った状態となり エンティティが保持する進行中のクエスト情報からゲームをリジュームすることが可能です。

説明
progressId string クエスト挑戦GRN
userId string ユーザーID
transactionId string トランザクションID
questModelId string 進行中のクエスト
randomSeed long 乱数シード
rewards Reward[] クエストで得られる報酬の上限
metadata string メタデータ
createdAt long 作成日時
updatedAt long 最終更新日時

CompletedQuestList

クリア済みのクエストを管理するエンティティです。

説明
completedQuestListId string クエスト進行GRN
userId string ユーザーID
questGroupName string クエストグループ名
completeQuestNames string[] 攻略済みのクエスト名一覧のリスト
createdAt long 作成日時
updatedAt long 最終更新日時

QuestGroupModel

クエストグループは複数のクエストをグルーピングするためのエンティティで、クエストの進行はグループ内で同時に1つしか実行できません。 つまり、並列でクエストを進行できるようにする必要がある場合はグループを分ける必要があります。

説明
questGroupModelId string クエストグループGRN
name string クエストグループ名
metadata string メタデータ
quests QuestModel[] グループに属するクエスト
challengePeriodEventId string クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN

QuestModel

クエストはインゲームの開始に必要な対価とクリアしたときに得られる報酬を保持するエンティティです。

クリアしたときに得られる報酬は複数のバリエーションを用意でき、クエスト開始時に抽選することができます。 例えば、クエストのクリアフラグ管理は同じコンテンツだが、レアモンスターの出現有無で2種類のコンテンツを用意することができます。

説明
questModelId string NoneGRN
name string クエストモデル名
metadata string メタデータ
contents Contents[] クエストの内容
challengePeriodEventId string クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN
consumeActions ConsumeAction[] クエストの参加料
failedAcquireActions AcquireAction[] クエスト失敗時の報酬
premiseQuestNames string[] クエストに挑戦するためにクリアしておく必要のあるクエスト名

メソッド

describeNamespaces

describeNamespaces

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

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

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

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

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

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

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

client = gs2('quest')

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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &quest.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        StartQuestScript: nil,
        CompleteQuestScript: nil,
        FailedQuestScript: nil,
        QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        KeyId: pointy.String("$key1.keyId"),
        LogSetting: &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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)
            ->withStartQuestScript(null)
            ->withCompleteQuestScript(null)
            ->withFailedQuestScript(null)
            ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
            ->withKeyId(self::$key1.keyId)
            ->withLogSetting((new \Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.CreateNamespaceRequest;
import io.gs2.quest.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withStartQuestScript(null)
            .withCompleteQuestScript(null)
            .withFailedQuestScript(null)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
            .withKeyId("$key1.keyId")
            .withLogSetting(new io.gs2.quest.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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.CreateNamespaceRequest;
using Gs2.Gs2Quest.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createNamespace(
    new CreateNamespaceRequest()
        .withName("namespace1")
        .withDescription(null)
        .withStartQuestScript(null)
        .withCompleteQuestScript(null)
        .withFailedQuestScript(null)
        .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
        .withKeyId("$key1.keyId")
        .withLogSetting(new Gs2.Gs2Quest.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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.createNamespace(
        new Gs2Quest.CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withStartQuestScript(null)
            .withCompleteQuestScript(null)
            .withFailedQuestScript(null)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
            .withKeyId("$key1.keyId")
            .withLogSetting(new Gs2Quest.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 quest

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

try:
    result = client.create_namespace(
        quest.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_start_quest_script(None)
            .with_complete_quest_script(None)
            .with_failed_quest_script(None)
            .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001')
            .with_key_id(self.key1.key_id)
            .with_log_setting(
                quest.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.create_namespace({
    name='namespace1',
    description=nil,
    startQuestScript=nil,
    completeQuestScript=nil,
    failedQuestScript=nil,
    queueNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001',
    keyId='$key1.keyId',
    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文字 説明文
startQuestScript ScriptSetting クエスト開始したときに実行するスクリプト
completeQuestScript ScriptSetting クエストクリアしたときに実行するスクリプト
failedQuestScript ScriptSetting クエスト失敗したときに実行するスクリプト
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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetNamespaceStatusRequest;
import io.gs2.quest.result.GetNamespaceStatusResult;

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

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

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

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

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

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

client = gs2('quest')

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

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

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

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

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

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

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

client = gs2('quest')

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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &quest.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        StartQuestScript: nil,
        CompleteQuestScript: nil,
        FailedQuestScript: nil,
        QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        KeyId: pointy.String("$key1.keyId"),
        LogSetting: &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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")
            ->withStartQuestScript(null)
            ->withCompleteQuestScript(null)
            ->withFailedQuestScript(null)
            ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
            ->withKeyId(self::$key1.keyId)
            ->withLogSetting((new \Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.UpdateNamespaceRequest;
import io.gs2.quest.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withStartQuestScript(null)
            .withCompleteQuestScript(null)
            .withFailedQuestScript(null)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
            .withKeyId("$key1.keyId")
            .withLogSetting(new io.gs2.quest.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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.UpdateNamespaceRequest;
using Gs2.Gs2Quest.Result.UpdateNamespaceResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateNamespace(
    new UpdateNamespaceRequest()
        .withNamespaceName("namespace1")
        .withDescription("description1")
        .withStartQuestScript(null)
        .withCompleteQuestScript(null)
        .withFailedQuestScript(null)
        .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
        .withKeyId("$key1.keyId")
        .withLogSetting(new Gs2.Gs2Quest.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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.updateNamespace(
        new Gs2Quest.UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withStartQuestScript(null)
            .withCompleteQuestScript(null)
            .withFailedQuestScript(null)
            .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
            .withKeyId("$key1.keyId")
            .withLogSetting(new Gs2Quest.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 quest

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

try:
    result = client.update_namespace(
        quest.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_start_quest_script(None)
            .with_complete_quest_script(None)
            .with_failed_quest_script(None)
            .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002')
            .with_key_id(self.key1.key_id)
            .with_log_setting(
                quest.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.update_namespace({
    namespaceName='namespace1',
    description='description1',
    startQuestScript=nil,
    completeQuestScript=nil,
    failedQuestScript=nil,
    queueNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002',
    keyId='$key1.keyId',
    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文字 説明文
startQuestScript ScriptSetting クエスト開始したときに実行するスクリプト
completeQuestScript ScriptSetting クエストクリアしたときに実行するスクリプト
failedQuestScript ScriptSetting クエスト失敗したときに実行するスクリプト
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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteNamespaceRequest;
import io.gs2.quest.result.DeleteNamespaceResult;

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

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

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

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

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

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

client = gs2('quest')

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 削除したクエストを分類するカテゴリー

describeQuestGroupModelMasters

describeQuestGroupModelMasters

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DescribeQuestGroupModelMasters(
    &quest.DescribeQuestGroupModelMastersRequest {
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DescribeQuestGroupModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeQuestGroupModelMasters(
        (new DescribeQuestGroupModelMastersRequest())
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DescribeQuestGroupModelMastersRequest;
import io.gs2.quest.result.DescribeQuestGroupModelMastersResult;

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

try {
    DescribeQuestGroupModelMastersResult result = client.describeQuestGroupModelMasters(
        new DescribeQuestGroupModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<QuestGroupModelMaster> 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DescribeQuestGroupModelMastersRequest;
using Gs2.Gs2Quest.Result.DescribeQuestGroupModelMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeQuestGroupModelMasters(
    new DescribeQuestGroupModelMastersRequest()
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.describeQuestGroupModelMasters(
        new Gs2Quest.DescribeQuestGroupModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.describe_quest_group_model_masters(
        quest.DescribeQuestGroupModelMastersRequest()
            .with_namespace_name(self.hash1)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.describe_quest_group_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 QuestGroupModelMaster[] クエストグループマスターのリスト
nextPageToken string リストの続きを取得するためのページトークン

createQuestGroupModelMaster

createQuestGroupModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.CreateQuestGroupModelMaster(
    &quest.CreateQuestGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("quest-group-0001"),
        Description: nil,
        Metadata: nil,
        ChallengePeriodEventId: 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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\CreateQuestGroupModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createQuestGroupModelMaster(
        (new CreateQuestGroupModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("quest-group-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withChallengePeriodEventId(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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.CreateQuestGroupModelMasterRequest;
import io.gs2.quest.result.CreateQuestGroupModelMasterResult;

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

try {
    CreateQuestGroupModelMasterResult result = client.createQuestGroupModelMaster(
        new CreateQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("quest-group-0001")
            .withDescription(null)
            .withMetadata(null)
            .withChallengePeriodEventId(null)
    );
    QuestGroupModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.CreateQuestGroupModelMasterRequest;
using Gs2.Gs2Quest.Result.CreateQuestGroupModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createQuestGroupModelMaster(
    new CreateQuestGroupModelMasterRequest()
        .withNamespaceName("namespace1")
        .withName("quest-group-0001")
        .withDescription(null)
        .withMetadata(null)
        .withChallengePeriodEventId(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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.createQuestGroupModelMaster(
        new Gs2Quest.CreateQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("quest-group-0001")
            .withDescription(null)
            .withMetadata(null)
            .withChallengePeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.create_quest_group_model_master(
        quest.CreateQuestGroupModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('quest-group-0001')
            .with_description(None)
            .with_metadata(None)
            .with_challenge_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.create_quest_group_model_master({
    namespaceName='namespace1',
    name='quest-group-0001',
    description=nil,
    metadata=nil,
    challengePeriodEventId=nil,
});

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 ~ 1024文字 メタデータ
challengePeriodEventId string ~ 1024文字 クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN

Result

説明
item QuestGroupModelMaster 作成したクエストグループマスター

getQuestGroupModelMaster

getQuestGroupModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetQuestGroupModelMaster(
    &quest.GetQuestGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\GetQuestGroupModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getQuestGroupModelMaster(
        (new GetQuestGroupModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetQuestGroupModelMasterRequest;
import io.gs2.quest.result.GetQuestGroupModelMasterResult;

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

try {
    GetQuestGroupModelMasterResult result = client.getQuestGroupModelMaster(
        new GetQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
    );
    QuestGroupModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.GetQuestGroupModelMasterRequest;
using Gs2.Gs2Quest.Result.GetQuestGroupModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getQuestGroupModelMaster(
    new GetQuestGroupModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.getQuestGroupModelMaster(
        new Gs2Quest.GetQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.get_quest_group_model_master(
        quest.GetQuestGroupModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.get_quest_group_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-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文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名

Result

説明
item QuestGroupModelMaster クエストグループマスター

updateQuestGroupModelMaster

updateQuestGroupModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.UpdateQuestGroupModelMaster(
    &quest.UpdateQuestGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    }
)
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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\UpdateQuestGroupModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateQuestGroupModelMaster(
        (new UpdateQuestGroupModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-0001")
            ->withDescription("description1")
            ->withMetadata(null)
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    $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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.UpdateQuestGroupModelMasterRequest;
import io.gs2.quest.result.UpdateQuestGroupModelMasterResult;

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

try {
    UpdateQuestGroupModelMasterResult result = client.updateQuestGroupModelMaster(
        new UpdateQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    QuestGroupModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.UpdateQuestGroupModelMasterRequest;
using Gs2.Gs2Quest.Result.UpdateQuestGroupModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateQuestGroupModelMaster(
    new UpdateQuestGroupModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-0001")
        .withDescription("description1")
        .withMetadata(null)
        .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.updateQuestGroupModelMaster(
        new Gs2Quest.UpdateQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.update_quest_group_model_master(
        quest.UpdateQuestGroupModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.update_quest_group_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-0001',
    description='description1',
    metadata=nil,
    challengePeriodEventId='grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002',
});

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

result = api_result.result
item = result.item;

クエストグループマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
description string ~ 1024文字 説明文
metadata string ~ 1024文字 メタデータ
challengePeriodEventId string ~ 1024文字 クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN

Result

説明
item QuestGroupModelMaster 更新したクエストグループマスター

deleteQuestGroupModelMaster

deleteQuestGroupModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteQuestGroupModelMaster(
    &quest.DeleteQuestGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DeleteQuestGroupModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteQuestGroupModelMaster(
        (new DeleteQuestGroupModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteQuestGroupModelMasterRequest;
import io.gs2.quest.result.DeleteQuestGroupModelMasterResult;

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

try {
    DeleteQuestGroupModelMasterResult result = client.deleteQuestGroupModelMaster(
        new DeleteQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
    );
    QuestGroupModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DeleteQuestGroupModelMasterRequest;
using Gs2.Gs2Quest.Result.DeleteQuestGroupModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteQuestGroupModelMaster(
    new DeleteQuestGroupModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.deleteQuestGroupModelMaster(
        new Gs2Quest.DeleteQuestGroupModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.delete_quest_group_model_master(
        quest.DeleteQuestGroupModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.delete_quest_group_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-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文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名

Result

説明
item QuestGroupModelMaster 削除したクエストグループマスター

describeQuestModelMasters

describeQuestModelMasters

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DescribeQuestModelMasters(
    &quest.DescribeQuestModelMastersRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DescribeQuestModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeQuestModelMasters(
        (new DescribeQuestModelMastersRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DescribeQuestModelMastersRequest;
import io.gs2.quest.result.DescribeQuestModelMastersResult;

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

try {
    DescribeQuestModelMastersResult result = client.describeQuestModelMasters(
        new DescribeQuestModelMastersRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<QuestModelMaster> 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DescribeQuestModelMastersRequest;
using Gs2.Gs2Quest.Result.DescribeQuestModelMastersResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeQuestModelMasters(
    new DescribeQuestModelMastersRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.describeQuestModelMasters(
        new Gs2Quest.DescribeQuestModelMastersRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.describe_quest_model_masters(
        quest.DescribeQuestModelMastersRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.describe_quest_model_masters({
    namespaceName='namespace1',
    questGroupName='quest-group-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文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

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

createQuestModelMaster

createQuestModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.CreateQuestModelMaster(
    &quest.CreateQuestModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-0001"),
        Name: pointy.String("quest-0001"),
        Description: nil,
        Metadata: nil,
        Contents: []quest.Contents{
            quest.Contents{
                Metadata: pointy.String("normal"),
                CompleteAcquireActions: []quest.AcquireAction{
                    quest.AcquireAction{
                        Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
                        Request: pointy.String("Gs2Experience:AddExperienceByUserId-request1"),
                    },
                },
                Weight: pointy.Int32(1),
            },
        },
        ChallengePeriodEventId: nil,
        ConsumeActions: nil,
        FailedAcquireActions: nil,
        PremiseQuestNames: 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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\CreateQuestModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createQuestModelMaster(
        (new CreateQuestModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-0001")
            ->withName("quest-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withContents([    (new \Gs2\Quest\Model\Contents())
                ->withMetadata("normal")
                ->withCompleteAcquireActions([    (new \Gs2\Quest\Model\AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("Gs2Experience:AddExperienceByUserId-request1"),
            ])
                ->withWeight(1),
            ])
            ->withChallengePeriodEventId(null)
            ->withConsumeActions(null)
            ->withFailedAcquireActions(null)
            ->withPremiseQuestNames(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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.CreateQuestModelMasterRequest;
import io.gs2.quest.result.CreateQuestModelMasterResult;

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

try {
    CreateQuestModelMasterResult result = client.createQuestModelMaster(
        new CreateQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withName("quest-0001")
            .withDescription(null)
            .withMetadata(null)
            .withContents(Arrays.asList(
                new io.gs2.quest.model.Contents()
                    .withMetadata("normal")
                    .withCompleteAcquireActions(Arrays.asList(
                    new io.gs2.quest.model.AcquireAction()
                        .withAction("Gs2Experience:AddExperienceByUserId")
                        .withRequest("Gs2Experience:AddExperienceByUserId-request1")
                ))
                    .withWeight(1)
            ))
            .withChallengePeriodEventId(null)
            .withConsumeActions(null)
            .withFailedAcquireActions(null)
            .withPremiseQuestNames(null)
    );
    QuestModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.CreateQuestModelMasterRequest;
using Gs2.Gs2Quest.Result.CreateQuestModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createQuestModelMaster(
    new CreateQuestModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-0001")
        .withName("quest-0001")
        .withDescription(null)
        .withMetadata(null)
        .withContents(new Gs2.Gs2Quest.Model.Contents[] {
            new Gs2.Gs2Quest.Model.Contents()
                .WithMetadata("normal")
                .WithCompleteAcquireActions(new Gs2.Gs2Quest.Model.AcquireAction[] {
                new Gs2.Gs2Quest.Model.AcquireAction()
                    .WithAction("Gs2Experience:AddExperienceByUserId")
                    .WithRequest("Gs2Experience:AddExperienceByUserId-request1")
            })
                .WithWeight(1)
        })
        .withChallengePeriodEventId(null)
        .withConsumeActions(null)
        .withFailedAcquireActions(null)
        .withPremiseQuestNames(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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.createQuestModelMaster(
        new Gs2Quest.CreateQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withName("quest-0001")
            .withDescription(null)
            .withMetadata(null)
            .withContents([
                new Gs2Quest.Model.Contents()
                    .withMetadata("normal")
                    .withCompleteAcquireActions([
                    new Gs2Quest.Model.AcquireAction()
                        .withAction("Gs2Experience:AddExperienceByUserId")
                        .withRequest("Gs2Experience:AddExperienceByUserId-request1")
                ])
                    .withWeight(1)
            ])
            .withChallengePeriodEventId(null)
            .withConsumeActions(null)
            .withFailedAcquireActions(null)
            .withPremiseQuestNames(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.create_quest_model_master(
        quest.CreateQuestModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_name('quest-0001')
            .with_description(None)
            .with_metadata(None)
            .with_contents([    quest.Contents()
                .with_metadata('normal')
                .with_complete_acquire_actions([    quest.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('Gs2Experience:AddExperienceByUserId-request1'),
            ])
                .with_weight(1),
            ])
            .with_challenge_period_event_id(None)
            .with_consume_actions(None)
            .with_failed_acquire_actions(None)
            .with_premise_quest_names(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.create_quest_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-0001',
    name='quest-0001',
    description=nil,
    metadata=nil,
    contents={
        {
            metadata='normal',
            completeAcquireActions={
            {
                action='Gs2Experience:AddExperienceByUserId',
                request='Gs2Experience:AddExperienceByUserId-request1',
            }
        },
            weight=1,
        }
    },
    challengePeriodEventId=nil,
    consumeActions=nil,
    failedAcquireActions=nil,
    premiseQuestNames=nil,
});

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

result = api_result.result
item = result.item;

クエストモデルマスターを新規作成

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
name string ~ 128文字 クエスト名
description string ~ 1024文字 説明文
metadata string ~ 1024文字 メタデータ
contents Contents[] クエストの内容
challengePeriodEventId string ~ 1024文字 クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN
consumeActions ConsumeAction[] [] クエストの参加料
failedAcquireActions AcquireAction[] [] クエスト失敗時の報酬
premiseQuestNames string[] [] クエストに挑戦するためにクリアしておく必要のあるクエスト名

Result

説明
item QuestModelMaster 作成したクエストモデルマスター

getQuestModelMaster

getQuestModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetQuestModelMaster(
    &quest.GetQuestModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-0001"),
        QuestName: pointy.String("quest-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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\GetQuestModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getQuestModelMaster(
        (new GetQuestModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-0001")
            ->withQuestName("quest-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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetQuestModelMasterRequest;
import io.gs2.quest.result.GetQuestModelMasterResult;

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

try {
    GetQuestModelMasterResult result = client.getQuestModelMaster(
        new GetQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
    );
    QuestModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.GetQuestModelMasterRequest;
using Gs2.Gs2Quest.Result.GetQuestModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getQuestModelMaster(
    new GetQuestModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-0001")
        .withQuestName("quest-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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.getQuestModelMaster(
        new Gs2Quest.GetQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.get_quest_model_master(
        quest.GetQuestModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_quest_name('quest-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.get_quest_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-0001',
    questName='quest-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文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
questName string ~ 128文字 クエスト名

Result

説明
item QuestModelMaster クエストモデルマスター

updateQuestModelMaster

updateQuestModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.UpdateQuestModelMaster(
    &quest.UpdateQuestModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-0001"),
        QuestName: pointy.String("quest-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        Contents: []quest.Contents{
            quest.Contents{
                Metadata: pointy.String("normal"),
                CompleteAcquireActions: []quest.AcquireAction{
                    quest.AcquireAction{
                        Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
                        Request: pointy.String("Gs2Experience:AddExperienceByUserId-request1"),
                    },
                },
                Weight: pointy.Int32(1),
            },
        },
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
        ConsumeActions: nil,
        FailedAcquireActions: nil,
        PremiseQuestNames: 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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\UpdateQuestModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateQuestModelMaster(
        (new UpdateQuestModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-0001")
            ->withQuestName("quest-0001")
            ->withDescription("description1")
            ->withMetadata(null)
            ->withContents([    (new \Gs2\Quest\Model\Contents())
                ->withMetadata("normal")
                ->withCompleteAcquireActions([    (new \Gs2\Quest\Model\AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("Gs2Experience:AddExperienceByUserId-request1"),
            ])
                ->withWeight(1),
            ])
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
            ->withConsumeActions(null)
            ->withFailedAcquireActions(null)
            ->withPremiseQuestNames(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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.UpdateQuestModelMasterRequest;
import io.gs2.quest.result.UpdateQuestModelMasterResult;

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

try {
    UpdateQuestModelMasterResult result = client.updateQuestModelMaster(
        new UpdateQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withContents(Arrays.asList(
                new io.gs2.quest.model.Contents()
                    .withMetadata("normal")
                    .withCompleteAcquireActions(Arrays.asList(
                    new io.gs2.quest.model.AcquireAction()
                        .withAction("Gs2Experience:AddExperienceByUserId")
                        .withRequest("Gs2Experience:AddExperienceByUserId-request1")
                ))
                    .withWeight(1)
            ))
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
            .withConsumeActions(null)
            .withFailedAcquireActions(null)
            .withPremiseQuestNames(null)
    );
    QuestModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.UpdateQuestModelMasterRequest;
using Gs2.Gs2Quest.Result.UpdateQuestModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateQuestModelMaster(
    new UpdateQuestModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-0001")
        .withQuestName("quest-0001")
        .withDescription("description1")
        .withMetadata(null)
        .withContents(new Gs2.Gs2Quest.Model.Contents[] {
            new Gs2.Gs2Quest.Model.Contents()
                .WithMetadata("normal")
                .WithCompleteAcquireActions(new Gs2.Gs2Quest.Model.AcquireAction[] {
                new Gs2.Gs2Quest.Model.AcquireAction()
                    .WithAction("Gs2Experience:AddExperienceByUserId")
                    .WithRequest("Gs2Experience:AddExperienceByUserId-request1")
            })
                .WithWeight(1)
        })
        .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
        .withConsumeActions(null)
        .withFailedAcquireActions(null)
        .withPremiseQuestNames(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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.updateQuestModelMaster(
        new Gs2Quest.UpdateQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withContents([
                new Gs2Quest.Model.Contents()
                    .withMetadata("normal")
                    .withCompleteAcquireActions([
                    new Gs2Quest.Model.AcquireAction()
                        .withAction("Gs2Experience:AddExperienceByUserId")
                        .withRequest("Gs2Experience:AddExperienceByUserId-request1")
                ])
                    .withWeight(1)
            ])
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
            .withConsumeActions(null)
            .withFailedAcquireActions(null)
            .withPremiseQuestNames(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.update_quest_model_master(
        quest.UpdateQuestModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_quest_name('quest-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_contents([    quest.Contents()
                .with_metadata('normal')
                .with_complete_acquire_actions([    quest.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('Gs2Experience:AddExperienceByUserId-request1'),
            ])
                .with_weight(1),
            ])
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002')
            .with_consume_actions(None)
            .with_failed_acquire_actions(None)
            .with_premise_quest_names(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.update_quest_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-0001',
    questName='quest-0001',
    description='description1',
    metadata=nil,
    contents={
        {
            metadata='normal',
            completeAcquireActions={
            {
                action='Gs2Experience:AddExperienceByUserId',
                request='Gs2Experience:AddExperienceByUserId-request1',
            }
        },
            weight=1,
        }
    },
    challengePeriodEventId='grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002',
    consumeActions=nil,
    failedAcquireActions=nil,
    premiseQuestNames=nil,
});

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

result = api_result.result
item = result.item;

クエストモデルマスターを更新

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
questName string ~ 128文字 クエスト名
description string ~ 1024文字 説明文
metadata string ~ 1024文字 メタデータ
contents Contents[] クエストの内容
challengePeriodEventId string ~ 1024文字 クエストに挑戦可能な期間を設定した GS2-Schedule イベントGRN
consumeActions ConsumeAction[] [] クエストの参加料
failedAcquireActions AcquireAction[] [] クエスト失敗時の報酬
premiseQuestNames string[] [] クエストに挑戦するためにクリアしておく必要のあるクエスト名

Result

説明
item QuestModelMaster 更新したクエストモデルマスター

deleteQuestModelMaster

deleteQuestModelMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteQuestModelMaster(
    &quest.DeleteQuestModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("quest-group-0001"),
        QuestName: pointy.String("quest-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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DeleteQuestModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteQuestModelMaster(
        (new DeleteQuestModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withQuestGroupName("quest-group-0001")
            ->withQuestName("quest-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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteQuestModelMasterRequest;
import io.gs2.quest.result.DeleteQuestModelMasterResult;

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

try {
    DeleteQuestModelMasterResult result = client.deleteQuestModelMaster(
        new DeleteQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
    );
    QuestModelMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DeleteQuestModelMasterRequest;
using Gs2.Gs2Quest.Result.DeleteQuestModelMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteQuestModelMaster(
    new DeleteQuestModelMasterRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("quest-group-0001")
        .withQuestName("quest-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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.deleteQuestModelMaster(
        new Gs2Quest.DeleteQuestModelMasterRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("quest-group-0001")
            .withQuestName("quest-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.delete_quest_model_master(
        quest.DeleteQuestModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('quest-group-0001')
            .with_quest_name('quest-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.delete_quest_model_master({
    namespaceName='namespace1',
    questGroupName='quest-group-0001',
    questName='quest-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文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループモデル名
questName string ~ 128文字 クエスト名

Result

説明
item QuestModelMaster 削除したクエストモデルマスター

exportMaster

exportMaster

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

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

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

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

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

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

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

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

client = gs2('quest')

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 CurrentQuestMaster 現在有効なクエストマスター

getCurrentQuestMaster

getCurrentQuestMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetCurrentQuestMaster(
    &quest.GetCurrentQuestMasterRequest {
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\GetCurrentQuestMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentQuestMaster(
        (new GetCurrentQuestMasterRequest())
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetCurrentQuestMasterRequest;
import io.gs2.quest.result.GetCurrentQuestMasterResult;

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

try {
    GetCurrentQuestMasterResult result = client.getCurrentQuestMaster(
        new GetCurrentQuestMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentQuestMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.GetCurrentQuestMasterRequest;
using Gs2.Gs2Quest.Result.GetCurrentQuestMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.getCurrentQuestMaster(
    new GetCurrentQuestMasterRequest()
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.getCurrentQuestMaster(
        new Gs2Quest.GetCurrentQuestMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.get_current_quest_master(
        quest.GetCurrentQuestMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.get_current_quest_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 CurrentQuestMaster 現在有効なクエストマスター

updateCurrentQuestMaster

updateCurrentQuestMaster

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentQuestMaster(
    &quest.UpdateCurrentQuestMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String("{\n      \"version\": \"2019-05-14\",\n      \"groups\": [\n        {\n          \"name\": \"main\",\n          \"metadata\": \"MAIN\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 100, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 99\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 500, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            },\n            {\n              \"name\": \"1-2\",\n              \"metadata\": \"stage1-2\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 200, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 98\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 1000, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 2\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n                \"1-1\"\n              ]\n            }\n          ]\n        },\n        {\n          \"name\": \"sub\",\n          \"metadata\": \"SUB\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2JobQueue:PushByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"queue-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"jobs\\\": [{\\\"scriptId\\\": \\\"script-0001\\\", \\\"args\\\": {}, \\\"maxTryCount\\\": 3}]}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            }\n          ]\n        }\n      ]\n    }"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\UpdateCurrentQuestMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentQuestMaster(
        (new UpdateCurrentQuestMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\n      \"version\": \"2019-05-14\",\n      \"groups\": [\n        {\n          \"name\": \"main\",\n          \"metadata\": \"MAIN\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 100, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 99\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 500, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            },\n            {\n              \"name\": \"1-2\",\n              \"metadata\": \"stage1-2\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 200, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 98\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 1000, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 2\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n                \"1-1\"\n              ]\n            }\n          ]\n        },\n        {\n          \"name\": \"sub\",\n          \"metadata\": \"SUB\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2JobQueue:PushByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"queue-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"jobs\\\": [{\\\"scriptId\\\": \\\"script-0001\\\", \\\"args\\\": {}, \\\"maxTryCount\\\": 3}]}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            }\n          ]\n        }\n      ]\n    }")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.UpdateCurrentQuestMasterRequest;
import io.gs2.quest.result.UpdateCurrentQuestMasterResult;

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

try {
    UpdateCurrentQuestMasterResult result = client.updateCurrentQuestMaster(
        new UpdateCurrentQuestMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n      \"version\": \"2019-05-14\",\n      \"groups\": [\n        {\n          \"name\": \"main\",\n          \"metadata\": \"MAIN\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 100, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 99\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 500, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            },\n            {\n              \"name\": \"1-2\",\n              \"metadata\": \"stage1-2\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 200, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 98\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 1000, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 2\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n                \"1-1\"\n              ]\n            }\n          ]\n        },\n        {\n          \"name\": \"sub\",\n          \"metadata\": \"SUB\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2JobQueue:PushByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"queue-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"jobs\\\": [{\\\"scriptId\\\": \\\"script-0001\\\", \\\"args\\\": {}, \\\"maxTryCount\\\": 3}]}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            }\n          ]\n        }\n      ]\n    }")
    );
    CurrentQuestMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.UpdateCurrentQuestMasterRequest;
using Gs2.Gs2Quest.Result.UpdateCurrentQuestMasterResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateCurrentQuestMaster(
    new UpdateCurrentQuestMasterRequest()
        .withNamespaceName("namespace1")
        .withSettings("{\n      \"version\": \"2019-05-14\",\n      \"groups\": [\n        {\n          \"name\": \"main\",\n          \"metadata\": \"MAIN\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 100, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 99\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 500, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            },\n            {\n              \"name\": \"1-2\",\n              \"metadata\": \"stage1-2\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 200, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 98\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 1000, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 2\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n                \"1-1\"\n              ]\n            }\n          ]\n        },\n        {\n          \"name\": \"sub\",\n          \"metadata\": \"SUB\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2JobQueue:PushByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"queue-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"jobs\\\": [{\\\"scriptId\\\": \\\"script-0001\\\", \\\"args\\\": {}, \\\"maxTryCount\\\": 3}]}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.updateCurrentQuestMaster(
        new Gs2Quest.UpdateCurrentQuestMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n      \"version\": \"2019-05-14\",\n      \"groups\": [\n        {\n          \"name\": \"main\",\n          \"metadata\": \"MAIN\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 100, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 99\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 500, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            },\n            {\n              \"name\": \"1-2\",\n              \"metadata\": \"stage1-2\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 200, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 98\n                },\n                {\n                  \"metadata\": \"rare\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2Experience:AddExperienceByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n                    },\n                    {\n                      \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"gold\\\", \\\"inventoryName\\\": \\\"wallet\\\", \\\"itemName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"acquireCount\\\": 1000, \\\"expiresAt\\\": null}\"\n                    }\n                  ],\n                  \"weight\": 2\n                }\n              ],\n              \"consumeActions\": [\n                {\n                  \"action\": \"Gs2Stamina:ConsumeStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeValue\\\": 5}\"\n                }\n              ],\n              \"failedAcquireActions\": [\n                {\n                  \"action\": \"Gs2Stamina:RecoverStaminaByUserId\",\n                  \"request\": \"{\\\"namespaceName\\\": \\\"basic\\\", \\\"staminaName\\\": \\\"quest\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"recoverValue\\\": 5}\"\n                }\n              ],\n              \"premiseQuestNames\": [\n                \"1-1\"\n              ]\n            }\n          ]\n        },\n        {\n          \"name\": \"sub\",\n          \"metadata\": \"SUB\",\n          \"quests\": [\n            {\n              \"name\": \"1-1\",\n              \"metadata\": \"stage1-1\",\n              \"contents\": [\n                {\n                  \"metadata\": \"normal\",\n                  \"completeAcquireActions\": [\n                    {\n                      \"action\": \"Gs2JobQueue:PushByUserId\",\n                      \"request\": \"{\\\"namespaceName\\\": \\\"queue-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"jobs\\\": [{\\\"scriptId\\\": \\\"script-0001\\\", \\\"args\\\": {}, \\\"maxTryCount\\\": 3}]}\"\n                    }\n                  ],\n                  \"weight\": 1\n                }\n              ],\n              \"premiseQuestNames\": [\n              ]\n            }\n          ]\n        }\n      ]\n    }")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.update_current_quest_master(
        quest.UpdateCurrentQuestMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{\n      "version": "2019-05-14",\n      "groups": [\n        {\n          "name": "main",\n          "metadata": "MAIN",\n          "quests": [\n            {\n              "name": "1-1",\n              "metadata": "stage1-1",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 100, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 99\n                },\n                {\n                  "metadata": "rare",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 500, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 1\n                }\n              ],\n              "consumeActions": [\n                {\n                  "action": "Gs2Stamina:ConsumeStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"consumeValue\\": 5}"\n                }\n              ],\n              "failedAcquireActions": [\n                {\n                  "action": "Gs2Stamina:RecoverStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"recoverValue\\": 5}"\n                }\n              ],\n              "premiseQuestNames": [\n              ]\n            },\n            {\n              "name": "1-2",\n              "metadata": "stage1-2",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 200, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 98\n                },\n                {\n                  "metadata": "rare",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 1000, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 2\n                }\n              ],\n              "consumeActions": [\n                {\n                  "action": "Gs2Stamina:ConsumeStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"consumeValue\\": 5}"\n                }\n              ],\n              "failedAcquireActions": [\n                {\n                  "action": "Gs2Stamina:RecoverStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"recoverValue\\": 5}"\n                }\n              ],\n              "premiseQuestNames": [\n                "1-1"\n              ]\n            }\n          ]\n        },\n        {\n          "name": "sub",\n          "metadata": "SUB",\n          "quests": [\n            {\n              "name": "1-1",\n              "metadata": "stage1-1",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2JobQueue:PushByUserId",\n                      "request": "{\\"namespaceName\\": \\"queue-0001\\", \\"userId\\": \\"#{userId}\\", \\"jobs\\": [{\\"scriptId\\": \\"script-0001\\", \\"args\\": {}, \\"maxTryCount\\": 3}]}"\n                    }\n                  ],\n                  "weight": 1\n                }\n              ],\n              "premiseQuestNames": [\n              ]\n            }\n          ]\n        }\n      ]\n    }')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.update_current_quest_master({
    namespaceName='namespace1',
    settings='{\n      "version": "2019-05-14",\n      "groups": [\n        {\n          "name": "main",\n          "metadata": "MAIN",\n          "quests": [\n            {\n              "name": "1-1",\n              "metadata": "stage1-1",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 100, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 99\n                },\n                {\n                  "metadata": "rare",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 500, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 1\n                }\n              ],\n              "consumeActions": [\n                {\n                  "action": "Gs2Stamina:ConsumeStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"consumeValue\\": 5}"\n                }\n              ],\n              "failedAcquireActions": [\n                {\n                  "action": "Gs2Stamina:RecoverStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"recoverValue\\": 5}"\n                }\n              ],\n              "premiseQuestNames": [\n              ]\n            },\n            {\n              "name": "1-2",\n              "metadata": "stage1-2",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 200, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 98\n                },\n                {\n                  "metadata": "rare",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2Experience:AddExperienceByUserId",\n                      "request": "{\\"namespaceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"\n                    },\n                    {\n                      "action": "Gs2Inventory:AcquireItemSetByUserId",\n                      "request": "{\\"namespaceName\\": \\"gold\\", \\"inventoryName\\": \\"wallet\\", \\"itemName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"acquireCount\\": 1000, \\"expiresAt\\": null}"\n                    }\n                  ],\n                  "weight": 2\n                }\n              ],\n              "consumeActions": [\n                {\n                  "action": "Gs2Stamina:ConsumeStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"consumeValue\\": 5}"\n                }\n              ],\n              "failedAcquireActions": [\n                {\n                  "action": "Gs2Stamina:RecoverStaminaByUserId",\n                  "request": "{\\"namespaceName\\": \\"basic\\", \\"staminaName\\": \\"quest\\", \\"userId\\": \\"#{userId}\\", \\"recoverValue\\": 5}"\n                }\n              ],\n              "premiseQuestNames": [\n                "1-1"\n              ]\n            }\n          ]\n        },\n        {\n          "name": "sub",\n          "metadata": "SUB",\n          "quests": [\n            {\n              "name": "1-1",\n              "metadata": "stage1-1",\n              "contents": [\n                {\n                  "metadata": "normal",\n                  "completeAcquireActions": [\n                    {\n                      "action": "Gs2JobQueue:PushByUserId",\n                      "request": "{\\"namespaceName\\": \\"queue-0001\\", \\"userId\\": \\"#{userId}\\", \\"jobs\\": [{\\"scriptId\\": \\"script-0001\\", \\"args\\": {}, \\"maxTryCount\\": 3}]}"\n                    }\n                  ],\n                  "weight": 1\n                }\n              ],\n              "premiseQuestNames": [\n              ]\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 CurrentQuestMaster 更新した現在有効なクエストマスター

updateCurrentQuestMasterFromGitHub

updateCurrentQuestMasterFromGitHub

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentQuestMasterFromGitHub(
    &quest.UpdateCurrentQuestMasterFromGitHubRequest {
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\UpdateCurrentQuestMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentQuestMasterFromGitHub(
        (new UpdateCurrentQuestMasterFromGitHubRequest())
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.UpdateCurrentQuestMasterFromGitHubRequest;
import io.gs2.quest.result.UpdateCurrentQuestMasterFromGitHubResult;

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

try {
    UpdateCurrentQuestMasterFromGitHubResult result = client.updateCurrentQuestMasterFromGitHub(
        new UpdateCurrentQuestMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    CurrentQuestMaster 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.UpdateCurrentQuestMasterFromGitHubRequest;
using Gs2.Gs2Quest.Result.UpdateCurrentQuestMasterFromGitHubResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.updateCurrentQuestMasterFromGitHub(
    new UpdateCurrentQuestMasterFromGitHubRequest()
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.updateCurrentQuestMasterFromGitHub(
        new Gs2Quest.UpdateCurrentQuestMasterFromGitHubRequest()
            .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 quest

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

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

client = gs2('quest')

api_result = client.update_current_quest_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 CurrentQuestMaster 更新した現在有効なクエストマスター

describeProgressesByUserId

describeProgressesByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DescribeProgressesByUserId(
    &quest.DescribeProgressesByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DescribeProgressesByUserIdRequest;
import io.gs2.quest.result.DescribeProgressesByUserIdResult;

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

try {
    DescribeProgressesByUserIdResult result = client.describeProgressesByUserId(
        new DescribeProgressesByUserIdRequest()
            .withNamespaceName("namespace1")
            .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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DescribeProgressesByUserIdRequest;
using Gs2.Gs2Quest.Result.DescribeProgressesByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeProgressesByUserId(
    new DescribeProgressesByUserIdRequest()
        .withNamespaceName("namespace1")
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.describeProgressesByUserId(
        new Gs2Quest.DescribeProgressesByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

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

client = gs2('quest')

api_result = client.describe_progresses_by_user_id({
    namespaceName='namespace1',
    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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.CreateProgressByUserId(
    &quest.CreateProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        QuestModelId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1"),
        Force: nil,
        Config: 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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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")
            ->withQuestModelId('grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1')
            ->withForce(null)
            ->withConfig(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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.CreateProgressByUserIdRequest;
import io.gs2.quest.result.CreateProgressByUserIdResult;

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

try {
    CreateProgressByUserIdResult result = client.createProgressByUserId(
        new CreateProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withQuestModelId("grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1")
            .withForce(null)
            .withConfig(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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.CreateProgressByUserIdRequest;
using Gs2.Gs2Quest.Result.CreateProgressByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.createProgressByUserId(
    new CreateProgressByUserIdRequest()
        .withNamespaceName("namespace1")
        .withUserId("user-0001")
        .withQuestModelId("grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1")
        .withForce(null)
        .withConfig(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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.createProgressByUserId(
        new Gs2Quest.CreateProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withQuestModelId("grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1")
            .withForce(null)
            .withConfig(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.create_progress_by_user_id(
        quest.CreateProgressByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_quest_model_id('grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1')
            .with_force(None)
            .with_config(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.create_progress_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    questModelId='grn:gs2:ap-northeast-1:YourOwnerId:quest:namespace1:group:main:quest:1-1',
    force=nil,
    config=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
questModelId string ~ 1024文字 進行中のクエスト
force bool false すでに開始しているクエストがある場合にそれを破棄して開始するか
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
item Progress クエスト挑戦

getProgress

getProgress

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetProgress(
    &quest.GetProgressRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
questGroup := result.QuestGroup
quest := result.Quest
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Quest\Gs2QuestRestClient;
use Gs2\Quest\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();
    $questGroup = $result->getQuestGroup();
    $quest = $result->getQuest();
} 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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetProgressRequest;
import io.gs2.quest.result.GetProgressResult;

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

try {
    GetProgressResult result = client.getProgress(
        new GetProgressRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
    );
    Progress item = result.getItem();
    QuestGroupModel questGroup = result.getQuestGroup();
    QuestModel quest = result.getQuest();
} 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.GetProgressRequest;
using Gs2.Gs2Quest.Result.GetProgressResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2QuestRestClient(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 questGroup = result.QuestGroup;
var quest = result.Quest;
import Gs2Core from '@/gs2/core';
import * as Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.getProgress(
        new Gs2Quest.GetProgressRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
    );
    const item = result.getItem();
    const questGroup = result.getQuestGroup();
    const quest = result.getQuest();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.get_progress(
        quest.GetProgressRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
    )
    item = result.item
    quest_group = result.quest_group
    quest = result.quest
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

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;
questGroup = result.questGroup;
quest = result.quest;

クエスト挑戦を取得

Request

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

Result

説明
item Progress クエスト挑戦
questGroup QuestGroupModel クエストグループ
quest QuestModel クエストモデル

getProgressByUserId

getProgressByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.GetProgressByUserId(
    &quest.GetProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
questGroup := result.QuestGroup
quest := result.Quest
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->withUserId("user-0001")
    );
    $item = $result->getItem();
    $questGroup = $result->getQuestGroup();
    $quest = $result->getQuest();
} 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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.GetProgressByUserIdRequest;
import io.gs2.quest.result.GetProgressByUserIdResult;

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

try {
    GetProgressByUserIdResult result = client.getProgressByUserId(
        new GetProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
    );
    Progress item = result.getItem();
    QuestGroupModel questGroup = result.getQuestGroup();
    QuestModel quest = result.getQuest();
} 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.GetProgressByUserIdRequest;
using Gs2.Gs2Quest.Result.GetProgressByUserIdResult;

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

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

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

try {
    const result = await client.getProgressByUserId(
        new Gs2Quest.GetProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
    );
    const item = result.getItem();
    const questGroup = result.getQuestGroup();
    const quest = result.getQuest();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.get_progress_by_user_id(
        quest.GetProgressByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
    )
    item = result.item
    quest_group = result.quest_group
    quest = result.quest
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

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

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

result = api_result.result
item = result.item;
questGroup = result.questGroup;
quest = result.quest;

ユーザIDを指定してクエスト挑戦を取得

Request

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

Result

説明
item Progress クエスト挑戦
questGroup QuestGroupModel クエストグループ
quest QuestModel クエストモデル

start

start

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.Start(
    &quest.StartRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("group-0001"),
        QuestName: pointy.String("quest-0001"),
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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)
            ->withQuestGroupName("group-0001")
            ->withQuestName("quest-0001")
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.StartRequest;
import io.gs2.quest.result.StartResult;

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

try {
    StartResult result = client.start(
        new StartRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("group-0001")
            .withQuestName("quest-0001")
            .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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.StartRequest;
using Gs2.Gs2Quest.Result.StartResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.start(
    new StartRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("group-0001")
        .withQuestName("quest-0001")
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.start(
        new Gs2Quest.StartRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("group-0001")
            .withQuestName("quest-0001")
            .withAccessToken("$access_token_0001")
            .withForce(null)
            .withConfig(null)
    );
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.start(
        quest.StartRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('group-0001')
            .with_quest_name('quest-0001')
            .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:
    exit(1)

client = gs2('quest')

api_result = client.start({
    namespaceName='namespace1',
    questGroupName='group-0001',
    questName='quest-0001',
    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;

クエストを開始

同一カテゴリ内でゲームプレイヤーは同時に1つのクエストを実行できます。 すでに同一カテゴリ内で実行中のクエストがある場合、このAPIはエラーを返します。 進行中のクエストを取得するAPIを呼び出すことで、クエストを再開するために必要な情報を得ることができます。 強制的にクエストを開始するには force パラメータに true を指定することで強制的にクエストを開始できます。

クエストが正常に開始できた場合、Progress オブジェクトを応答します。 Progress オブジェクトはクエストを実行するために必要ないくつかの情報を応答します。

transactionId は実行中のクエスト固有のIDです。 クエストの完了報告にはこのIDを指定する必要があります。

randomSeed はクエストの内容を決定するために使用できる乱数シードです。 クエストを開始するたびに異なる乱数が払い出されますので、この値をシード値としてゲームを進行させることで クエスト中にアプリケーションを強制終了したとしても同一条件で再開することができます。

rewards にはこのクエストにおいて入手可能な報酬とその数量の"最大値"が得られます。 クエストの完了報告にも rewards を渡すことができ、そこでクエスト中に実際に入手したアイテムの数量を指定します。 詳細はクエストの完了報告APIのドキュメントを参照してください。

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループ名
questName string ~ 128文字 クエストモデル名
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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.StartByUserId(
    &quest.StartByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        QuestGroupName: pointy.String("group-0001"),
        QuestName: pointy.String("quest-0001"),
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->withQuestGroupName("group-0001")
            ->withQuestName("quest-0001")
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.StartByUserIdRequest;
import io.gs2.quest.result.StartByUserIdResult;

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

try {
    StartByUserIdResult result = client.startByUserId(
        new StartByUserIdRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("group-0001")
            .withQuestName("quest-0001")
            .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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.StartByUserIdRequest;
using Gs2.Gs2Quest.Result.StartByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.startByUserId(
    new StartByUserIdRequest()
        .withNamespaceName("namespace1")
        .withQuestGroupName("group-0001")
        .withQuestName("quest-0001")
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.startByUserId(
        new Gs2Quest.StartByUserIdRequest()
            .withNamespaceName("namespace1")
            .withQuestGroupName("group-0001")
            .withQuestName("quest-0001")
            .withUserId("user-0001")
            .withForce(null)
            .withConfig(null)
    );
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.start_by_user_id(
        quest.StartByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_quest_group_name('group-0001')
            .with_quest_name('quest-0001')
            .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:
    exit(1)

client = gs2('quest')

api_result = client.start_by_user_id({
    namespaceName='namespace1',
    questGroupName='group-0001',
    questName='quest-0001',
    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を指定してクエストを開始

同一カテゴリ内でゲームプレイヤーは同時に1つのクエストを実行できます。 すでに同一カテゴリ内で実行中のクエストがある場合、このAPIはエラーを返します。 進行中のクエストを取得するAPIを呼び出すことで、クエストを再開するために必要な情報を得ることができます。 強制的にクエストを開始するには force パラメータに true を指定することで強制的にクエストを開始できます。

クエストが正常に開始できた場合、Progress オブジェクトを応答します。 Progress オブジェクトはクエストを実行するために必要ないくつかの情報を応答します。

transactionId は実行中のクエスト固有のIDです。 クエストの完了報告にはこのIDを指定する必要があります。

randomSeed はクエストの内容を決定するために使用できる乱数シードです。 クエストを開®®始するたびに異なる乱数が払い出されますので、この値をシード値としてゲームを進行させることで クエスト中にアプリケーションを強制終了したとしても同一条件で再開することができます。

rewards にはこのクエストにおいて入手可能な報酬とその数量の"最大値"が得られます。 クエストの完了報告にも rewards を渡すことができ、そこでクエスト中に実際に入手したアイテムの数量を指定します。 詳細はクエストの完了報告APIのドキュメントを参照してください。

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
questGroupName string ~ 128文字 クエストグループ名
questName string ~ 128文字 クエストモデル名
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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.End(
    &quest.EndRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
        TransactionId: pointy.String("transaction-0001"),
        Rewards: []quest.Reward{
            {},
        },
        IsComplete: pointy.Bool(true),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withTransactionId("transaction-0001")
            ->withRewards([    {},
            ])
            ->withIsComplete(True)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.EndRequest;
import io.gs2.quest.result.EndResult;

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

try {
    EndResult result = client.end(
        new EndRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withTransactionId("transaction-0001")
            .withRewards(Arrays.asList(
                {}
            ))
            .withIsComplete(true)
            .withConfig(null)
    );
    Progress item = result.getItem();
    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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.EndRequest;
using Gs2.Gs2Quest.Result.EndResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.end(
    new EndRequest()
        .withNamespaceName("namespace1")
        .withAccessToken("$access_token_0001")
        .withTransactionId("transaction-0001")
        .withRewards(new Gs2.Gs2Quest.Model.Reward[] {
            {}
        })
        .withIsComplete(true)
        .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;
import Gs2Core from '@/gs2/core';
import * as Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.end(
        new Gs2Quest.EndRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withTransactionId("transaction-0001")
            .withRewards([
                {}
            ])
            .withIsComplete(true)
            .withConfig(null)
    );
    const item = result.getItem();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.end(
        quest.EndRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_transaction_id('transaction-0001')
            .with_rewards([    {},
            ])
            .with_is_complete(True)
            .with_config(None)
    )
    item = result.item
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.end({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
    transactionId='transaction-0001',
    rewards={
        {}
    },
    isComplete=true,
    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;

クエストを完了

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

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
transactionId string UUID ~ 36文字 トランザクションID
rewards Reward[] [] クエストで実際に得た報酬
isComplete bool クエストをクリアしたか
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
item Progress クエスト挑戦
stampSheet string 報酬付与処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN

endByUserId

endByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.EndByUserId(
    &quest.EndByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        TransactionId: pointy.String("$progress1.transactionId"),
        Rewards: pointy.String("$progress1.rewards"),
        IsComplete: pointy.Bool(true),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->withUserId("user-0001")
            ->withTransactionId(self::$progress1.transactionId)
            ->withRewards(self::$progress1.rewards)
            ->withIsComplete(True)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.EndByUserIdRequest;
import io.gs2.quest.result.EndByUserIdResult;

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

try {
    EndByUserIdResult result = client.endByUserId(
        new EndByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withTransactionId("$progress1.transactionId")
            .withRewards("$progress1.rewards")
            .withIsComplete(true)
            .withConfig(null)
    );
    Progress item = result.getItem();
    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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.EndByUserIdRequest;
using Gs2.Gs2Quest.Result.EndByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.endByUserId(
    new EndByUserIdRequest()
        .withNamespaceName("namespace1")
        .withUserId("user-0001")
        .withTransactionId("$progress1.transactionId")
        .withRewards("$progress1.rewards")
        .withIsComplete(true)
        .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;
import Gs2Core from '@/gs2/core';
import * as Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.endByUserId(
        new Gs2Quest.EndByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withTransactionId("$progress1.transactionId")
            .withRewards("$progress1.rewards")
            .withIsComplete(true)
            .withConfig(null)
    );
    const item = result.getItem();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.end_by_user_id(
        quest.EndByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_transaction_id(self.progress1.transaction_id)
            .with_rewards(self.progress1.rewards)
            .with_is_complete(True)
            .with_config(None)
    )
    item = result.item
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.end_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    transactionId='$progress1.transactionId',
    rewards='$progress1.rewards',
    isComplete=true,
    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;

ユーザIDを指定してクエストを完了

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

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
userId string ~ 128文字 ユーザーID
transactionId string UUID ~ 36文字 トランザクションID
rewards Reward[] [] クエストで実際に得た報酬
isComplete bool クエストをクリアしたか
config Config[] [] スタンプシートの変数に適用する設定値

Result

説明
item Progress クエスト挑戦
stampSheet string 報酬付与処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN

deleteProgress

deleteProgress

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteProgress(
    &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteProgressRequest;
import io.gs2.quest.result.DeleteProgressResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2QuestRestClient client = new Gs2QuestRestClient(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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DeleteProgressRequest;
using Gs2.Gs2Quest.Result.DeleteProgressResult;

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

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

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

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

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

client = gs2('quest')

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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteProgressByUserId(
    &quest.DeleteProgressByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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::namespace1)
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteProgressByUserIdRequest;
import io.gs2.quest.result.DeleteProgressByUserIdResult;

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

try {
    DeleteProgressByUserIdResult result = client.deleteProgressByUserId(
        new DeleteProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DeleteProgressByUserIdRequest;
using Gs2.Gs2Quest.Result.DeleteProgressByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.deleteProgressByUserId(
    new DeleteProgressByUserIdRequest()
        .withNamespaceName("namespace1")
        .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 Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.deleteProgressByUserId(
        new Gs2Quest.DeleteProgressByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.delete_progress_by_user_id(
        quest.DeleteProgressByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.delete_progress_by_user_id({
    namespaceName='namespace1',
    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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.CreateProgressByStampSheet(
    &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.CreateProgressByStampSheetRequest;
import io.gs2.quest.result.CreateProgressByStampSheetResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2QuestRestClient client = new Gs2QuestRestClient(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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.CreateProgressByStampSheetRequest;
using Gs2.Gs2Quest.Result.CreateProgressByStampSheetResult;

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

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

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

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

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

client = gs2('quest')

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/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DeleteProgressByStampTask(
    &quest.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\Quest\Gs2QuestRestClient;
use Gs2\Quest\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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DeleteProgressByStampTaskRequest;
import io.gs2.quest.result.DeleteProgressByStampTaskResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2QuestRestClient client = new Gs2QuestRestClient(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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DeleteProgressByStampTaskRequest;
using Gs2.Gs2Quest.Result.DeleteProgressByStampTaskResult;

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

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

try {
    const result = await client.deleteProgressByStampTask(
        new Gs2Quest.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 quest

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

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

client = gs2('quest')

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 スタンプタスクの実行結果を記録したコンテキスト

describeCompletedQuestLists

describeCompletedQuestLists

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DescribeCompletedQuestLists(
    &quest.DescribeCompletedQuestListsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DescribeCompletedQuestListsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeCompletedQuestLists(
        (new DescribeCompletedQuestListsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DescribeCompletedQuestListsRequest;
import io.gs2.quest.result.DescribeCompletedQuestListsResult;

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

try {
    DescribeCompletedQuestListsResult result = client.describeCompletedQuestLists(
        new DescribeCompletedQuestListsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<CompletedQuestList> 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DescribeCompletedQuestListsRequest;
using Gs2.Gs2Quest.Result.DescribeCompletedQuestListsResult;

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

AsyncResult<Gs2.Gs2Account.Result.CreateNamespaceResult> asyncResult = null;
yield return client.describeCompletedQuestLists(
    new DescribeCompletedQuestListsRequest()
        .withNamespaceName("namespace1")
        .withAccessToken("$access_token_0001")
        .withPageToken(null)
        .withLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Quest from '@/gs2/quest';

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

try {
    const result = await client.describeCompletedQuestLists(
        new Gs2Quest.DescribeCompletedQuestListsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import quest

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

try:
    result = client.describe_completed_quest_lists(
        quest.DescribeCompletedQuestListsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('quest')

api_result = client.describe_completed_quest_lists({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
    pageToken=nil,
    limit=nil,
});

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

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

クエスト進行の一覧を取得

Request

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

Result

説明
items CompletedQuestList[] クエスト進行のリスト
nextPageToken string リストの続きを取得するためのページトークン

describeCompletedQuestListsByUserId

describeCompletedQuestListsByUserId

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/quest"
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 := quest.Gs2QuestRestClient{
    Session: &session,
}
result, err := client.DescribeCompletedQuestListsByUserId(
    &quest.DescribeCompletedQuestListsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        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\Quest\Gs2QuestRestClient;
use Gs2\Quest\Request\DescribeCompletedQuestListsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeCompletedQuestListsByUserId(
        (new DescribeCompletedQuestListsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->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.quest.rest.Gs2QuestRestClient;
import io.gs2.quest.request.DescribeCompletedQuestListsByUserIdRequest;
import io.gs2.quest.result.DescribeCompletedQuestListsByUserIdResult;

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

try {
    DescribeCompletedQuestListsByUserIdResult result = client.describeCompletedQuestListsByUserId(
        new DescribeCompletedQuestListsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<CompletedQuestList> 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.Gs2Quest.Gs2QuestRestClient;
using Gs2.Gs2Quest.Request.DescribeCompletedQuestListsByUserIdRequest;
using Gs2.Gs2Quest.Result.DescribeCompletedQuestListsByUserIdResult;

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

AsyncResult<Gs2.Gs2Account.