NAV
go python java php typescript csharp GS2-Script

GS2-Experience

GS2 SDK Reference

GS2 SDK Reference

Models

Namespace

Namespace

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

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

Type Description
namespaceId string Namespace GRN
name string Namespace name
description string description of Namespace
experienceCapScriptId string Script to dynamically determine rank caps
changeExperienceScript ScriptSetting Script to be executed when experience changes
changeRankScript ScriptSetting Script to be executed when rank changes
changeRankCapScript ScriptSetting Script to be executed when the rank cap changes
overflowExperienceScript ScriptSetting Script to run when experience overflows
logSetting LogSetting Log output settings
createdAt long Datetime of creation
updatedAt long Datetime of last update

ExperienceModelMaster

Experience Model Master

An experience model is an entity that sets the threshold of experience required for rank advancement and for each default and maximum rank cap.

Type Description
experienceModelId string Experience Model Master GRN
name string Experience Model Name
description string description of Namespace
metadata string metadata
defaultExperience long Initial Experience Value
defaultRankCap long Initial value of rank cap
maxRankCap long Maximum rank cap
rankThresholdName string rank-up threshold
createdAt long Datetime of creation
updatedAt long Datetime of last update

ExperienceModel

Experience Model

An experience model is an entity that sets the threshold of experience required for rank advancement and for each default and maximum rank cap.

Type Description
experienceModelId string Experience Model GRN
name string Experience Model Name
metadata string metadata
defaultExperience long Initial Experience Value
defaultRankCap long Initial value of rank cap
maxRankCap long Maximum rank cap
rankThreshold Threshold rank-up threshold

ThresholdMaster

Rank Up Threshold Master

The rank-up threshold is a sequence of numbers needed to determine rank (level) from experience.
If the value [10, 20] is set, experience values between 1 and 9 are rank 1, experience values between 10 and 19 are rank 2, experience values at 20 are rank 3, and no more experience values can be obtained.

Type Description
thresholdId string Rank Up Threshold Master GRN
name string Rank Up Threshold Name
description string description of Namespace
metadata string metadata
values long[] List of Rank Up Experience Threshold
createdAt long Datetime of creation
updatedAt long Datetime of last update

Threshold

Type Description
metadata string metadata
values long[] List of Rank Up Experience Threshold

CurrentExperienceMaster

Currently available master data

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

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

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

Type Description
namespaceId string Namespace GRN
settings string Master data

Status

Status

Status is an entity that exists for each property ID.
Holds the current experience and rank cap values.

Property ID is a status-specific ID and can be set to any value by the developer.
In GS2, the itemset GRN of a GS2-Inventory or entry GRN of a GS2-Dictionary that has an experience value is followed by a
It is recommended that the property ID be the value to which the suffix that serves as the experience value model is added.

Type Description
statusId string Status GRN
experienceName string Experience Model Name
userId string User Id
propertyId string Property ID
experienceValue long Cumulative experience gained
rankValue long Current Rank
rankCapValue long Current Rank Cap
nextRankUpExperienceValue long Total amount of experience for the next rank up
createdAt long Datetime of creation
updatedAt long Datetime of last update

GitHubCheckoutSetting

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

ScriptSetting

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

LogSetting

Type Description
loggingNamespaceId string Namespace GRN

Methods

describeNamespaces

describeNamespaces

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &experience.DescribeNamespacesRequest {
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeNamespacesRequest;
import io.gs2.experience.result.DescribeNamespacesResult;

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

try {
    DescribeNamespacesResult result = client.describeNamespaces(
        new DescribeNamespacesRequest()
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeNamespacesRequest;
using Gs2.Gs2Experience.Result.DescribeNamespacesResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Experience.Request.DescribeNamespacesRequest()
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

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

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

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

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

Get list of namespaces



Request

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

Result

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

createNamespace

createNamespace

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &experience.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        ExperienceCapScriptId: nil,
        ChangeExperienceScript: nil,
        ChangeRankScript: nil,
        ChangeRankCapScript: nil,
        OverflowExperienceScript: nil,
        LogSetting: &experience.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName(self::namespace1)
            ->withDescription(null)
            ->withExperienceCapScriptId(null)
            ->withChangeExperienceScript(null)
            ->withChangeRankScript(null)
            ->withChangeRankCapScript(null)
            ->withOverflowExperienceScript(null)
            ->withLogSetting((new \Gs2\Experience\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateNamespaceRequest;
import io.gs2.experience.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withExperienceCapScriptId(null)
            .withChangeExperienceScript(null)
            .withChangeRankScript(null)
            .withChangeRankCapScript(null)
            .withOverflowExperienceScript(null)
            .withLogSetting(new io.gs2.experience.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateNamespaceRequest;
using Gs2.Gs2Experience.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Experience.Request.CreateNamespaceRequest()
        .WithName("namespace1")
        .WithDescription(null)
        .WithExperienceCapScriptId(null)
        .WithChangeExperienceScript(null)
        .WithChangeRankScript(null)
        .WithChangeRankCapScript(null)
        .WithOverflowExperienceScript(null)
        .WithLogSetting(new Gs2.Gs2Experience.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createNamespace(
        new Gs2Experience.CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withExperienceCapScriptId(null)
            .withChangeExperienceScript(null)
            .withChangeRankScript(null)
            .withChangeRankCapScript(null)
            .withOverflowExperienceScript(null)
            .withLogSetting(new Gs2Experience.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_namespace(
        experience.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_experience_cap_script_id(None)
            .with_change_experience_script(None)
            .with_change_rank_script(None)
            .with_change_rank_cap_script(None)
            .with_overflow_experience_script(None)
            .with_log_setting(
                experience.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.create_namespace({
    name='namespace1',
    description=nil,
    experienceCapScriptId=nil,
    changeExperienceScript=nil,
    changeRankScript=nil,
    changeRankCapScript=nil,
    overflowExperienceScript=nil,
    logSetting={
        loggingNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1',
    },
})

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

result = api_result.result
item = result.item;

Create a new namespace



Request

Type Require Default Limitation Description
name string ~ 32 chars Namespace name
description string ~ 1024 chars description of Namespace
experienceCapScriptId string ~ 1024 chars Script to dynamically determine rank caps
changeExperienceScript ScriptSetting Script to be executed when experience changes
changeRankScript ScriptSetting Script to be executed when rank changes
changeRankCapScript ScriptSetting Script to be executed when the rank cap changes
overflowExperienceScript ScriptSetting Script to run when experience overflows
logSetting LogSetting Log output settings

Result

Type Description
item Namespace Namespace created

getNamespaceStatus

getNamespaceStatus

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &experience.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName(self::namespace1)
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetNamespaceStatusRequest;
import io.gs2.experience.result.GetNamespaceStatusResult;

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

try {
    GetNamespaceStatusResult result = client.getNamespaceStatus(
        new GetNamespaceStatusRequest()
            .withNamespaceName("namespace1")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetNamespaceStatusRequest;
using Gs2.Gs2Experience.Result.GetNamespaceStatusResult;

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

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

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

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

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

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

client = gs2('experience')

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

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

result = api_result.result
status = result.status;

Get namespace status



Request

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

Result

Type Description
status string

getNamespace

getNamespace

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &experience.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetNamespaceRequest;
import io.gs2.experience.result.GetNamespaceResult;

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

try {
    GetNamespaceResult result = client.getNamespace(
        new GetNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetNamespaceRequest;
using Gs2.Gs2Experience.Result.GetNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Experience.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Get namespace



Request

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

Result

Type Description
item Namespace Namespace

updateNamespace

updateNamespace

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &experience.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        ExperienceCapScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001"),
        ChangeExperienceScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"),
        },
        ChangeRankScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"),
        },
        ChangeRankCapScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"),
        },
        OverflowExperienceScript: &experience.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"),
        },
        LogSetting: &experience.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName(self::namespace1)
            ->withDescription("description1")
            ->withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1001")
            ->withChangeExperienceScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1002")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1003"))
            ->withChangeRankScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1004")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1005"))
            ->withChangeRankCapScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1006")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1007"))
            ->withOverflowExperienceScript((new \Gs2\Experience\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1008")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:\namespace1:script:script-1008"))
            ->withLogSetting((new \Gs2\Experience\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateNamespaceRequest;
import io.gs2.experience.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
            .withChangeExperienceScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
            .withChangeRankScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
            .withChangeRankCapScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
            .withOverflowExperienceScript(new io.gs2.experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
            .withLogSetting(new io.gs2.experience.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateNamespaceRequest;
using Gs2.Gs2Experience.Result.UpdateNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Experience.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace1")
        .WithDescription("description1")
        .WithExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
        .WithChangeExperienceScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
        .WithChangeRankScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
        .WithChangeRankCapScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
        .WithOverflowExperienceScript(new Gs2.Gs2Experience.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
        .WithLogSetting(new Gs2.Gs2Experience.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateNamespace(
        new Gs2Experience.UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withExperienceCapScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001")
            .withChangeExperienceScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003"))
            .withChangeRankScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005"))
            .withChangeRankCapScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007"))
            .withOverflowExperienceScript(new Gs2Experience.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008"))
            .withLogSetting(new Gs2Experience.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_namespace(
        experience.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_experience_cap_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001')
            .with_change_experience_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003'))
            .with_change_rank_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005'))
            .with_change_rank_cap_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007'))
            .with_overflow_experience_script(
                experience.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008'))
            .with_log_setting(
                experience.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_namespace({
    namespaceName='namespace1',
    description='description1',
    experienceCapScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1001',
    changeExperienceScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1002',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1003',
    },
    changeRankScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1004',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1005',
    },
    changeRankCapScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1006',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1007',
    },
    overflowExperienceScript={
        triggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008',
        doneTriggerScriptId='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace1:script:script-1008',
    },
    logSetting={
        loggingNamespaceId='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1',
    },
})

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

result = api_result.result
item = result.item;

Update namespace



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
description string ~ 1024 chars description of Namespace
experienceCapScriptId string ~ 1024 chars Script to dynamically determine rank caps
changeExperienceScript ScriptSetting Script to be executed when experience changes
changeRankScript ScriptSetting Script to be executed when rank changes
changeRankCapScript ScriptSetting Script to be executed when the rank cap changes
overflowExperienceScript ScriptSetting Script to run when experience overflows
logSetting LogSetting Log output settings

Result

Type Description
item Namespace Updated namespace

deleteNamespace

deleteNamespace

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &experience.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteNamespaceRequest;
import io.gs2.experience.result.DeleteNamespaceResult;

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

try {
    DeleteNamespaceResult result = client.deleteNamespace(
        new DeleteNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteNamespaceRequest;
using Gs2.Gs2Experience.Result.DeleteNamespaceResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Experience.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Delete namespace



Request

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

Result

Type Description
item Namespace Deleted namespace

describeExperienceModelMasters

describeExperienceModelMasters

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeExperienceModelMasters(
    &experience.DescribeExperienceModelMastersRequest {
        NamespaceName: pointy.String("namespace1"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeExperienceModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeExperienceModelMasters(
        (new DescribeExperienceModelMastersRequest())
            ->withNamespaceName(self::namespace1)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeExperienceModelMastersRequest;
import io.gs2.experience.result.DescribeExperienceModelMastersResult;

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

try {
    DescribeExperienceModelMastersResult result = client.describeExperienceModelMasters(
        new DescribeExperienceModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ExperienceModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeExperienceModelMastersRequest;
using Gs2.Gs2Experience.Result.DescribeExperienceModelMastersResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeExperienceModelMastersResult> asyncResult = null;
yield return client.DescribeExperienceModelMasters(
    new Gs2.Gs2Experience.Request.DescribeExperienceModelMastersRequest()
        .WithNamespaceName("namespace1")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

try:
    result = client.describe_experience_model_masters(
        experience.DescribeExperienceModelMastersRequest()
            .with_namespace_name(self.hash1)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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

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

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

Get list of experience model masters



Request

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

Result

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

createExperienceModelMaster

createExperienceModelMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateExperienceModelMaster(
    &experience.CreateExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("experience-model-0001"),
        Description: nil,
        Metadata: nil,
        DefaultExperience: nil,
        DefaultRankCap: pointy.Int64(50),
        MaxRankCap: pointy.Int64(50),
        RankThresholdName: pointy.String("$threshold1.name"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\CreateExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createExperienceModelMaster(
        (new CreateExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("experience-model-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withDefaultExperience(null)
            ->withDefaultRankCap(50)
            ->withMaxRankCap(50)
            ->withRankThresholdName(self::$threshold1.name)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateExperienceModelMasterRequest;
import io.gs2.experience.result.CreateExperienceModelMasterResult;

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

try {
    CreateExperienceModelMasterResult result = client.createExperienceModelMaster(
        new CreateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("experience-model-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDefaultExperience(null)
            .withDefaultRankCap(50L)
            .withMaxRankCap(50L)
            .withRankThresholdName("$threshold1.name")
    );
    ExperienceModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.CreateExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateExperienceModelMasterResult> asyncResult = null;
yield return client.CreateExperienceModelMaster(
    new Gs2.Gs2Experience.Request.CreateExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("experience-model-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithDefaultExperience(null)
        .WithDefaultRankCap(50L)
        .WithMaxRankCap(50L)
        .WithRankThresholdName("$threshold1.name"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createExperienceModelMaster(
        new Gs2Experience.CreateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("experience-model-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDefaultExperience(null)
            .withDefaultRankCap(50)
            .withMaxRankCap(50)
            .withRankThresholdName("$threshold1.name")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_experience_model_master(
        experience.CreateExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('experience-model-0001')
            .with_description(None)
            .with_metadata(None)
            .with_default_experience(None)
            .with_default_rank_cap(50)
            .with_max_rank_cap(50)
            .with_rank_threshold_name(self.threshold1.name)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.create_experience_model_master({
    namespaceName='namespace1',
    name='experience-model-0001',
    description=nil,
    metadata=nil,
    defaultExperience=nil,
    defaultRankCap=50,
    maxRankCap=50,
    rankThresholdName='$threshold1.name',
})

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

result = api_result.result
item = result.item;

Create new experience model master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Experience Model Name
description string ~ 1024 chars description of Namespace
metadata string ~ 2048 chars metadata
defaultExperience long 0 ~ 9223372036854775806 Initial Experience Value
defaultRankCap long ~ 9223372036854775806 Initial value of rank cap
maxRankCap long ~ 9223372036854775806 Maximum rank cap
rankThresholdName string ~ 128 chars rank-up threshold

Result

Type Description
item ExperienceModelMaster Created Experience Model Master

getExperienceModelMaster

getExperienceModelMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetExperienceModelMaster(
    &experience.GetExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-model-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getExperienceModelMaster(
        (new GetExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-model-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetExperienceModelMasterRequest;
import io.gs2.experience.result.GetExperienceModelMasterResult;

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

try {
    GetExperienceModelMasterResult result = client.getExperienceModelMaster(
        new GetExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    ExperienceModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.GetExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetExperienceModelMasterResult> asyncResult = null;
yield return client.GetExperienceModelMaster(
    new Gs2.Gs2Experience.Request.GetExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-model-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getExperienceModelMaster(
        new Gs2Experience.GetExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Get Experience model master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
experienceName string ~ 128 chars Experience Model Name

Result

Type Description
item ExperienceModelMaster Experience Model Master

updateExperienceModelMaster

updateExperienceModelMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateExperienceModelMaster(
    &experience.UpdateExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-model-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("{\"hoge\": \"fuga\"}"),
        DefaultExperience: pointy.Int64(100),
        DefaultRankCap: pointy.Int64(60),
        MaxRankCap: pointy.Int64(80),
        RankThresholdName: pointy.String("$threshold2.name"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateExperienceModelMaster(
        (new UpdateExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-model-0001")
            ->withDescription("description1")
            ->withMetadata("{\"hoge\": \"fuga\"}")
            ->withDefaultExperience(100)
            ->withDefaultRankCap(60)
            ->withMaxRankCap(80)
            ->withRankThresholdName(self::$threshold2.name)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateExperienceModelMasterRequest;
import io.gs2.experience.result.UpdateExperienceModelMasterResult;

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

try {
    UpdateExperienceModelMasterResult result = client.updateExperienceModelMaster(
        new UpdateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
            .withDescription("description1")
            .withMetadata("{\"hoge\": \"fuga\"}")
            .withDefaultExperience(100L)
            .withDefaultRankCap(60L)
            .withMaxRankCap(80L)
            .withRankThresholdName("$threshold2.name")
    );
    ExperienceModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.UpdateExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateExperienceModelMasterResult> asyncResult = null;
yield return client.UpdateExperienceModelMaster(
    new Gs2.Gs2Experience.Request.UpdateExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-model-0001")
        .WithDescription("description1")
        .WithMetadata("{\"hoge\": \"fuga\"}")
        .WithDefaultExperience(100L)
        .WithDefaultRankCap(60L)
        .WithMaxRankCap(80L)
        .WithRankThresholdName("$threshold2.name"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateExperienceModelMaster(
        new Gs2Experience.UpdateExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
            .withDescription("description1")
            .withMetadata("{\"hoge\": \"fuga\"}")
            .withDefaultExperience(100)
            .withDefaultRankCap(60)
            .withMaxRankCap(80)
            .withRankThresholdName("$threshold2.name")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_experience_model_master(
        experience.UpdateExperienceModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('experience-model-0001')
            .with_description('description1')
            .with_metadata('{"hoge": "fuga"}')
            .with_default_experience(100)
            .with_default_rank_cap(60)
            .with_max_rank_cap(80)
            .with_rank_threshold_name(self.threshold2.name)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_experience_model_master({
    namespaceName='namespace1',
    experienceName='experience-model-0001',
    description='description1',
    metadata='{"hoge": "fuga"}',
    defaultExperience=100,
    defaultRankCap=60,
    maxRankCap=80,
    rankThresholdName='$threshold2.name',
})

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

result = api_result.result
item = result.item;

Update Experience Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
experienceName string ~ 128 chars Experience Model Name
description string ~ 1024 chars description of Namespace
metadata string ~ 2048 chars metadata
defaultExperience long 0 ~ 9223372036854775806 Initial Experience Value
defaultRankCap long ~ 9223372036854775806 Initial value of rank cap
maxRankCap long ~ 9223372036854775806 Maximum rank cap
rankThresholdName string ~ 128 chars rank-up threshold

Result

Type Description
item ExperienceModelMaster Updated Experience Model Master

deleteExperienceModelMaster

deleteExperienceModelMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteExperienceModelMaster(
    &experience.DeleteExperienceModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("experience-model-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteExperienceModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteExperienceModelMaster(
        (new DeleteExperienceModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("experience-model-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteExperienceModelMasterRequest;
import io.gs2.experience.result.DeleteExperienceModelMasterResult;

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

try {
    DeleteExperienceModelMasterResult result = client.deleteExperienceModelMaster(
        new DeleteExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    ExperienceModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteExperienceModelMasterRequest;
using Gs2.Gs2Experience.Result.DeleteExperienceModelMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteExperienceModelMasterResult> asyncResult = null;
yield return client.DeleteExperienceModelMaster(
    new Gs2.Gs2Experience.Request.DeleteExperienceModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("experience-model-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteExperienceModelMaster(
        new Gs2Experience.DeleteExperienceModelMasterRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("experience-model-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Delete Experience Model Master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
experienceName string ~ 128 chars Experience Model Name

Result

Type Description
item ExperienceModelMaster Deleted Experience Model Master

describeExperienceModels

describeExperienceModels

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeExperienceModels(
    &experience.DescribeExperienceModelsRequest {
        NamespaceName: pointy.String("namespace2"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeExperienceModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeExperienceModels(
        (new DescribeExperienceModelsRequest())
            ->withNamespaceName(self::namespace2)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeExperienceModelsRequest;
import io.gs2.experience.result.DescribeExperienceModelsResult;

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

try {
    DescribeExperienceModelsResult result = client.describeExperienceModels(
        new DescribeExperienceModelsRequest()
            .withNamespaceName("namespace2")
    );
    List<ExperienceModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeExperienceModelsRequest;
using Gs2.Gs2Experience.Result.DescribeExperienceModelsResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeExperienceModelsResult> asyncResult = null;
yield return client.DescribeExperienceModels(
    new Gs2.Gs2Experience.Request.DescribeExperienceModelsRequest()
        .WithNamespaceName("namespace2"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeExperienceModels(
        new Gs2Experience.DescribeExperienceModelsRequest()
            .withNamespaceName("namespace2")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
items = result.items;

Get list of experience and rank-up threshold models



Request

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

Result

Type Description
items ExperienceModel[] List of Experience Model

getExperienceModel

getExperienceModel

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetExperienceModel(
    &experience.GetExperienceModelRequest {
        NamespaceName: pointy.String("namespace2"),
        ExperienceName: pointy.String("experience-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetExperienceModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getExperienceModel(
        (new GetExperienceModelRequest())
            ->withNamespaceName(self::namespace2)
            ->withExperienceName("experience-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetExperienceModelRequest;
import io.gs2.experience.result.GetExperienceModelResult;

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

try {
    GetExperienceModelResult result = client.getExperienceModel(
        new GetExperienceModelRequest()
            .withNamespaceName("namespace2")
            .withExperienceName("experience-0001")
    );
    ExperienceModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetExperienceModelRequest;
using Gs2.Gs2Experience.Result.GetExperienceModelResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetExperienceModelResult> asyncResult = null;
yield return client.GetExperienceModel(
    new Gs2.Gs2Experience.Request.GetExperienceModelRequest()
        .WithNamespaceName("namespace2")
        .WithExperienceName("experience-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getExperienceModel(
        new Gs2Experience.GetExperienceModelRequest()
            .withNamespaceName("namespace2")
            .withExperienceName("experience-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Get Experience Model



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
experienceName string ~ 128 chars Experience Model Name

Result

Type Description
item ExperienceModel Experience Model

describeThresholdMasters

describeThresholdMasters

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeThresholdMasters(
    &experience.DescribeThresholdMastersRequest {
        NamespaceName: pointy.String("namespace1"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeThresholdMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeThresholdMasters(
        (new DescribeThresholdMastersRequest())
            ->withNamespaceName(self::namespace1)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeThresholdMastersRequest;
import io.gs2.experience.result.DescribeThresholdMastersResult;

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

try {
    DescribeThresholdMastersResult result = client.describeThresholdMasters(
        new DescribeThresholdMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ThresholdMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeThresholdMastersRequest;
using Gs2.Gs2Experience.Result.DescribeThresholdMastersResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeThresholdMastersResult> asyncResult = null;
yield return client.DescribeThresholdMasters(
    new Gs2.Gs2Experience.Request.DescribeThresholdMastersRequest()
        .WithNamespaceName("namespace1")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

try:
    result = client.describe_threshold_masters(
        experience.DescribeThresholdMastersRequest()
            .with_namespace_name(self.hash1)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

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

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

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

Get list of rank-up threshold masters



Request

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

Result

Type Description
items ThresholdMaster[] List of Rank Up Threshold Master
nextPageToken string Page token to retrieve the rest of the listing

createThresholdMaster

createThresholdMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.CreateThresholdMaster(
    &experience.CreateThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("threshold-0001"),
        Description: nil,
        Metadata: nil,
        Values: []int64{
            100,
        200,
        300,
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\CreateThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createThresholdMaster(
        (new CreateThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("threshold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withValues([    100,
            200,
            300,
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.CreateThresholdMasterRequest;
import io.gs2.experience.result.CreateThresholdMasterResult;

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

try {
    CreateThresholdMasterResult result = client.createThresholdMaster(
        new CreateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withName("threshold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withValues(Arrays.asList(
                100L,
            200L,
            300L
            ))
    );
    ThresholdMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.CreateThresholdMasterRequest;
using Gs2.Gs2Experience.Result.CreateThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.CreateThresholdMasterResult> asyncResult = null;
yield return client.CreateThresholdMaster(
    new Gs2.Gs2Experience.Request.CreateThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("threshold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithValues(new long[] {
            100L,
        200L,
        300L
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.createThresholdMaster(
        new Gs2Experience.CreateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withName("threshold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withValues([
                100,
            200,
            300
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.create_threshold_master(
        experience.CreateThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('threshold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_values([    100,
            200,
            300,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.create_threshold_master({
    namespaceName='namespace1',
    name='threshold-0001',
    description=nil,
    metadata=nil,
    values={
        100,
    200,
    300
    },
})

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

result = api_result.result
item = result.item;

Create new rank-up threshold master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
name string ~ 128 chars Rank Up Threshold Name
description string ~ 1024 chars description of Namespace
metadata string ~ 2048 chars metadata
values long[] List of Rank Up Experience Threshold

Result

Type Description
item ThresholdMaster Created rank-up threshold master

getThresholdMaster

getThresholdMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetThresholdMaster(
    &experience.GetThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getThresholdMaster(
        (new GetThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetThresholdMasterRequest;
import io.gs2.experience.result.GetThresholdMasterResult;

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

try {
    GetThresholdMasterResult result = client.getThresholdMaster(
        new GetThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    ThresholdMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetThresholdMasterRequest;
using Gs2.Gs2Experience.Result.GetThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetThresholdMasterResult> asyncResult = null;
yield return client.GetThresholdMaster(
    new Gs2.Gs2Experience.Request.GetThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getThresholdMaster(
        new Gs2Experience.GetThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Obtain rank-up threshold master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
thresholdName string ~ 128 chars Rank Up Threshold Name

Result

Type Description
item ThresholdMaster Rank Up Threshold Master

updateThresholdMaster

updateThresholdMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateThresholdMaster(
    &experience.UpdateThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("{\"fuga\": \"piyo\"}"),
        Values: []int64{
            1100,
        1200,
        1300,
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateThresholdMaster(
        (new UpdateThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-0001")
            ->withDescription("description1")
            ->withMetadata("{\"fuga\": \"piyo\"}")
            ->withValues([    1100,
            1200,
            1300,
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateThresholdMasterRequest;
import io.gs2.experience.result.UpdateThresholdMasterResult;

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

try {
    UpdateThresholdMasterResult result = client.updateThresholdMaster(
        new UpdateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
            .withDescription("description1")
            .withMetadata("{\"fuga\": \"piyo\"}")
            .withValues(Arrays.asList(
                1100L,
            1200L,
            1300L
            ))
    );
    ThresholdMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateThresholdMasterRequest;
using Gs2.Gs2Experience.Result.UpdateThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateThresholdMasterResult> asyncResult = null;
yield return client.UpdateThresholdMaster(
    new Gs2.Gs2Experience.Request.UpdateThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-0001")
        .WithDescription("description1")
        .WithMetadata("{\"fuga\": \"piyo\"}")
        .WithValues(new long[] {
            1100L,
        1200L,
        1300L
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateThresholdMaster(
        new Gs2Experience.UpdateThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
            .withDescription("description1")
            .withMetadata("{\"fuga\": \"piyo\"}")
            .withValues([
                1100,
            1200,
            1300
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_threshold_master(
        experience.UpdateThresholdMasterRequest()
            .with_namespace_name(self.hash1)
            .with_threshold_name('threshold-0001')
            .with_description('description1')
            .with_metadata('{"fuga": "piyo"}')
            .with_values([    1100,
            1200,
            1300,
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_threshold_master({
    namespaceName='namespace1',
    thresholdName='threshold-0001',
    description='description1',
    metadata='{"fuga": "piyo"}',
    values={
        1100,
    1200,
    1300
    },
})

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

result = api_result.result
item = result.item;

Update rank-up threshold master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
thresholdName string ~ 128 chars Rank Up Threshold Name
description string ~ 1024 chars description of Namespace
metadata string ~ 2048 chars metadata
values long[] List of Rank Up Experience Threshold

Result

Type Description
item ThresholdMaster Updated rank-up threshold master

deleteThresholdMaster

deleteThresholdMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteThresholdMaster(
    &experience.DeleteThresholdMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        ThresholdName: pointy.String("threshold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteThresholdMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteThresholdMaster(
        (new DeleteThresholdMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withThresholdName("threshold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteThresholdMasterRequest;
import io.gs2.experience.result.DeleteThresholdMasterResult;

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

try {
    DeleteThresholdMasterResult result = client.deleteThresholdMaster(
        new DeleteThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    ThresholdMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteThresholdMasterRequest;
using Gs2.Gs2Experience.Result.DeleteThresholdMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteThresholdMasterResult> asyncResult = null;
yield return client.DeleteThresholdMaster(
    new Gs2.Gs2Experience.Request.DeleteThresholdMasterRequest()
        .WithNamespaceName("namespace1")
        .WithThresholdName("threshold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteThresholdMaster(
        new Gs2Experience.DeleteThresholdMasterRequest()
            .withNamespaceName("namespace1")
            .withThresholdName("threshold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Delete rank-up threshold master



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
thresholdName string ~ 128 chars Rank Up Threshold Name

Result

Type Description
item ThresholdMaster Deleted rank-up threshold master

exportMaster

exportMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &experience.ExportMasterRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\ExportMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.ExportMasterRequest;
import io.gs2.experience.result.ExportMasterResult;

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

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentExperienceMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.ExportMasterRequest;
using Gs2.Gs2Experience.Result.ExportMasterResult;

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

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

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

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

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Export master data for currently available experience settings



Request

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

Result

Type Description
item CurrentExperienceMaster Currently available experience settings

getCurrentExperienceMaster

getCurrentExperienceMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetCurrentExperienceMaster(
    &experience.GetCurrentExperienceMasterRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetCurrentExperienceMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentExperienceMaster(
        (new GetCurrentExperienceMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetCurrentExperienceMasterRequest;
import io.gs2.experience.result.GetCurrentExperienceMasterResult;

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

try {
    GetCurrentExperienceMasterResult result = client.getCurrentExperienceMaster(
        new GetCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentExperienceMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetCurrentExperienceMasterRequest;
using Gs2.Gs2Experience.Result.GetCurrentExperienceMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetCurrentExperienceMasterResult> asyncResult = null;
yield return client.GetCurrentExperienceMaster(
    new Gs2.Gs2Experience.Request.GetCurrentExperienceMasterRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getCurrentExperienceMaster(
        new Gs2Experience.GetCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Retrieve the currently available experience settings



Request

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

Result

Type Description
item CurrentExperienceMaster Currently available experience settings

updateCurrentExperienceMaster

updateCurrentExperienceMaster

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentExperienceMaster(
    &experience.UpdateCurrentExperienceMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateCurrentExperienceMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentExperienceMaster(
        (new UpdateCurrentExperienceMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.UpdateCurrentExperienceMasterRequest;
import io.gs2.experience.result.UpdateCurrentExperienceMasterResult;

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

try {
    UpdateCurrentExperienceMasterResult result = client.updateCurrentExperienceMaster(
        new UpdateCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    CurrentExperienceMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterRequest;
using Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterResult> asyncResult = null;
yield return client.UpdateCurrentExperienceMaster(
    new Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterRequest()
        .WithNamespaceName("namespace1")
        .WithSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.updateCurrentExperienceMaster(
        new Gs2Experience.UpdateCurrentExperienceMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\n  \"version\": \"2019-01-11\",\n  \"experienceModels\": [\n    {\n      \"name\": \"character_ssr\",\n      \"metadata\": \"SSR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 50,\n      \"maxRankCap\": 80,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_sr\",\n      \"metadata\": \"SR\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 40,\n      \"maxRankCap\": 70,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"character_r\",\n      \"metadata\": \"R\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 60,\n      \"rankThreshold\": {\n        \"metadata\": \"CHARACTER\",\n        \"values\": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 30,\n      \"maxRankCap\": 50,\n      \"rankThreshold\": {\n        \"metadata\": \"EQUIPMENT\",\n        \"values\": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      \"name\": \"skill\",\n      \"metadata\": \"SKILL\",\n      \"defaultExperience\": 0,\n      \"defaultRankCap\": 10,\n      \"maxRankCap\": 20,\n      \"rankThreshold\": {\n        \"metadata\": \"SKILL\",\n        \"values\": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.update_current_experience_master(
        experience.UpdateCurrentExperienceMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{\n  "version": "2019-01-11",\n  "experienceModels": [\n    {\n      "name": "character_ssr",\n      "metadata": "SSR",\n      "defaultExperience": 0,\n      "defaultRankCap": 50,\n      "maxRankCap": 80,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_sr",\n      "metadata": "SR",\n      "defaultExperience": 0,\n      "defaultRankCap": 40,\n      "maxRankCap": 70,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_r",\n      "metadata": "R",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 60,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 50,\n      "rankThreshold": {\n        "metadata": "EQUIPMENT",\n        "values": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      "name": "skill",\n      "metadata": "SKILL",\n      "defaultExperience": 0,\n      "defaultRankCap": 10,\n      "maxRankCap": 20,\n      "rankThreshold": {\n        "metadata": "SKILL",\n        "values": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.update_current_experience_master({
    namespaceName='namespace1',
    settings='{\n  "version": "2019-01-11",\n  "experienceModels": [\n    {\n      "name": "character_ssr",\n      "metadata": "SSR",\n      "defaultExperience": 0,\n      "defaultRankCap": 50,\n      "maxRankCap": 80,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_sr",\n      "metadata": "SR",\n      "defaultExperience": 0,\n      "defaultRankCap": 40,\n      "maxRankCap": 70,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "character_r",\n      "metadata": "R",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 60,\n      "rankThreshold": {\n        "metadata": "CHARACTER",\n        "values": [\n          100,\n          200,\n          300,\n          400,\n          500,\n          600,\n          700,\n          800,\n          900,\n          1000,\n          1100,\n          1200,\n          1300,\n          1400,\n          1500,\n          1600,\n          1700,\n          1800,\n          1900,\n          2000,\n          2100,\n          2200,\n          2300,\n          2400,\n          2500,\n          2600,\n          2700,\n          2800,\n          2900,\n          3000,\n          3100,\n          3200,\n          3300,\n          3400,\n          3500,\n          3600,\n          3700,\n          3800,\n          3900,\n          4000,\n          4100,\n          4200,\n          4300,\n          4400,\n          4500,\n          4600,\n          4700,\n          4800,\n          4900,\n          5000,\n          5100,\n          5200,\n          5300,\n          5400,\n          5500,\n          5600,\n          5700,\n          5800,\n          5900,\n          6000,\n          6100,\n          6200,\n          6300,\n          6400,\n          6500,\n          6600,\n          6700,\n          6800,\n          6900,\n          7000,\n          7100,\n          7200,\n          7300,\n          7400,\n          7500,\n          7600,\n          7700,\n          7800,\n          7900\n        ]\n      }\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "defaultExperience": 0,\n      "defaultRankCap": 30,\n      "maxRankCap": 50,\n      "rankThreshold": {\n        "metadata": "EQUIPMENT",\n        "values": [\n          200,\n          400,\n          600,\n          800,\n          1000,\n          1200,\n          1400,\n          1600,\n          1800,\n          2000,\n          2200,\n          2400,\n          2600,\n          2800,\n          3000,\n          3200,\n          3400,\n          3600,\n          3800,\n          4000,\n          4200,\n          4400,\n          4600,\n          4800,\n          5000,\n          5200,\n          5400,\n          5600,\n          5800,\n          6000,\n          6200,\n          6400,\n          6600,\n          6800,\n          7000,\n          7200,\n          7400,\n          7600,\n          7800,\n          8000,\n          8200,\n          8400,\n          8600,\n          8800,\n          9000,\n          9200,\n          9400,\n          9600,\n          9800\n        ]\n      }\n    },\n    {\n      "name": "skill",\n      "metadata": "SKILL",\n      "defaultExperience": 0,\n      "defaultRankCap": 10,\n      "maxRankCap": 20,\n      "rankThreshold": {\n        "metadata": "SKILL",\n        "values": [\n          300,\n          600,\n          900,\n          1200,\n          1500,\n          1800,\n          2100,\n          2400,\n          2700,\n          3000,\n          3300,\n          3600,\n          3900,\n          4200,\n          4500,\n          4800,\n          5100,\n          5400,\n          5700\n        ]\n      }\n    }\n  ]\n}',
})

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

result = api_result.result
item = result.item;

Update the currently available experience settings



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
settings string ~ 5242880 chars Master data

Result

Type Description
item CurrentExperienceMaster Updated and currently available experience settings

updateCurrentExperienceMasterFromGitHub

updateCurrentExperienceMasterFromGitHub

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentExperienceMasterFromGitHub(
    &experience.UpdateCurrentExperienceMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace1"),
        CheckoutSetting: {'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'},
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\UpdateCurrentExperienceMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

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

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

try {
    UpdateCurrentExperienceMasterFromGitHubResult result = client.updateCurrentExperienceMasterFromGitHub(
        new UpdateCurrentExperienceMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'})
    );
    CurrentExperienceMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterFromGitHubRequest;
using Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterFromGitHubResult;

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

AsyncResult<Gs2.Gs2Experience.Result.UpdateCurrentExperienceMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentExperienceMasterFromGitHub(
    new Gs2.Gs2Experience.Request.UpdateCurrentExperienceMasterFromGitHubRequest()
        .WithNamespaceName("namespace1")
        .WithCheckoutSetting({'apiKeyId': '$gitHubApiKey1.apiKeyId', 'repositoryName': 'gs2io/master-data', 'sourcePath': 'path/to/file.json', 'referenceType': 'branch', 'branchName': 'develop'}),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

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

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

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

client = gs2('experience')

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

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

result = api_result.result
item = result.item;

Update the currently available experience settings



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
checkoutSetting GitHubCheckoutSetting Setup to check out master data from GitHub

Result

Type Description
item CurrentExperienceMaster Updated and currently available experience settings

describeStatuses

describeStatuses

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeStatuses(
    &experience.DescribeStatusesRequest {
        NamespaceName: pointy.String("namespace1"),
        ExperienceName: pointy.String("character_ssr"),
        AccessToken: pointy.String("$access_token_0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeStatusesRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeStatuses(
        (new DescribeStatusesRequest())
            ->withNamespaceName(self::namespace1)
            ->withExperienceName("character_ssr")
            ->withAccessToken(self::$accessToken0001)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeStatusesRequest;
import io.gs2.experience.result.DescribeStatusesResult;

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

try {
    DescribeStatusesResult result = client.describeStatuses(
        new DescribeStatusesRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("character_ssr")
            .withAccessToken("$access_token_0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Status> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeStatusesRequest;
using Gs2.Gs2Experience.Result.DescribeStatusesResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeStatusesResult> asyncResult = null;
yield return client.DescribeStatuses(
    new Gs2.Gs2Experience.Request.DescribeStatusesRequest()
        .WithNamespaceName("namespace1")
        .WithExperienceName("character_ssr")
        .WithAccessToken("$access_token_0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeStatuses(
        new Gs2Experience.DescribeStatusesRequest()
            .withNamespaceName("namespace1")
            .withExperienceName("character_ssr")
            .withAccessToken("$access_token_0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.describe_statuses(
        experience.DescribeStatusesRequest()
            .with_namespace_name(self.hash1)
            .with_experience_name('character_ssr')
            .with_access_token(self.access_token_0001)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.describe_statuses({
    namespaceName='namespace1',
    experienceName='character_ssr',
    accessToken='$access_token_0001',
    pageToken=nil,
    limit=nil,
})

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

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

Get list of statuses



Request

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

Result

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

describeStatusesByUserId

describeStatusesByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DescribeStatusesByUserId(
    &experience.DescribeStatusesByUserIdRequest {
        NamespaceName: nil,
        ExperienceName: pointy.String("character_ssr"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DescribeStatusesByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeStatusesByUserId(
        (new DescribeStatusesByUserIdRequest())
            ->withNamespaceName(null)
            ->withExperienceName("character_ssr")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DescribeStatusesByUserIdRequest;
import io.gs2.experience.result.DescribeStatusesByUserIdResult;

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

try {
    DescribeStatusesByUserIdResult result = client.describeStatusesByUserId(
        new DescribeStatusesByUserIdRequest()
            .withNamespaceName(null)
            .withExperienceName("character_ssr")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Status> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DescribeStatusesByUserIdRequest;
using Gs2.Gs2Experience.Result.DescribeStatusesByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DescribeStatusesByUserIdResult> asyncResult = null;
yield return client.DescribeStatusesByUserId(
    new Gs2.Gs2Experience.Request.DescribeStatusesByUserIdRequest()
        .WithNamespaceName(null)
        .WithExperienceName("character_ssr")
        .WithUserId("user-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.describeStatusesByUserId(
        new Gs2Experience.DescribeStatusesByUserIdRequest()
            .withNamespaceName(null)
            .withExperienceName("character_ssr")
            .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 experience

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

try:
    result = client.describe_statuses_by_user_id(
        experience.DescribeStatusesByUserIdRequest()
            .with_namespace_name(None)
            .with_experience_name('character_ssr')
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.describe_statuses_by_user_id({
    namespaceName=nil,
    experienceName='character_ssr',
    userId='user-0001',
    pageToken=nil,
    limit=nil,
})

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

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

Get list of statuses by user ID



Request

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

Result

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

getStatus

getStatus

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatus(
    &experience.GetStatusRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("$access_token_0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatus(
        (new GetStatusRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusRequest;
import io.gs2.experience.result.GetStatusResult;

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

try {
    GetStatusResult result = client.getStatus(
        new GetStatusRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusRequest;
using Gs2.Gs2Experience.Result.GetStatusResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusResult> asyncResult = null;
yield return client.GetStatus(
    new Gs2.Gs2Experience.Request.GetStatusRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("$access_token_0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatus(
        new Gs2Experience.GetStatusRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status(
        experience.GetStatusRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status({
    namespaceName='namespace1',
    accessToken='$access_token_0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

Get Status



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
accessToken string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID

Result

Type Description
item Status Status

getStatusByUserId

getStatusByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusByUserId(
    &experience.GetStatusByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusByUserId(
        (new GetStatusByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusByUserIdRequest;
import io.gs2.experience.result.GetStatusByUserIdResult;

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

try {
    GetStatusByUserIdResult result = client.getStatusByUserId(
        new GetStatusByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusByUserIdRequest;
using Gs2.Gs2Experience.Result.GetStatusByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusByUserIdResult> asyncResult = null;
yield return client.GetStatusByUserId(
    new Gs2.Gs2Experience.Request.GetStatusByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusByUserId(
        new Gs2Experience.GetStatusByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_by_user_id(
        experience.GetStatusByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

Get status by specifying user ID



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID

Result

Type Description
item Status Status

getStatusWithSignature

getStatusWithSignature

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusWithSignature(
    &experience.GetStatusWithSignatureRequest {
        NamespaceName: nil,
        AccessToken: pointy.String("$access_token_0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusWithSignatureRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusWithSignature(
        (new GetStatusWithSignatureRequest())
            ->withNamespaceName(null)
            ->withAccessToken(self::$accessToken0001)
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusWithSignatureRequest;
import io.gs2.experience.result.GetStatusWithSignatureResult;

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

try {
    GetStatusWithSignatureResult result = client.getStatusWithSignature(
        new GetStatusWithSignatureRequest()
            .withNamespaceName(null)
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusWithSignatureRequest;
using Gs2.Gs2Experience.Result.GetStatusWithSignatureResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusWithSignatureResult> asyncResult = null;
yield return client.GetStatusWithSignature(
    new Gs2.Gs2Experience.Request.GetStatusWithSignatureRequest()
        .WithNamespaceName(null)
        .WithAccessToken("$access_token_0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusWithSignature(
        new Gs2Experience.GetStatusWithSignatureRequest()
            .withNamespaceName(null)
            .withAccessToken("$access_token_0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_with_signature(
        experience.GetStatusWithSignatureRequest()
            .with_namespace_name(None)
            .with_access_token(self.access_token_0001)
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_with_signature({
    namespaceName=nil,
    accessToken='$access_token_0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

Get status along with signature



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
accessToken string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
keyId string ~ 1024 chars encryption key GRN

Result

Type Description
item Status Status
body string Object to be verified
signature string signature

getStatusWithSignatureByUserId

getStatusWithSignatureByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.GetStatusWithSignatureByUserId(
    &experience.GetStatusWithSignatureByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\GetStatusWithSignatureByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getStatusWithSignatureByUserId(
        (new GetStatusWithSignatureByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.GetStatusWithSignatureByUserIdRequest;
import io.gs2.experience.result.GetStatusWithSignatureByUserIdResult;

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

try {
    GetStatusWithSignatureByUserIdResult result = client.getStatusWithSignatureByUserId(
        new GetStatusWithSignatureByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.GetStatusWithSignatureByUserIdRequest;
using Gs2.Gs2Experience.Result.GetStatusWithSignatureByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.GetStatusWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetStatusWithSignatureByUserId(
    new Gs2.Gs2Experience.Request.GetStatusWithSignatureByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.getStatusWithSignatureByUserId(
        new Gs2Experience.GetStatusWithSignatureByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.get_status_with_signature_by_user_id(
        experience.GetStatusWithSignatureByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.get_status_with_signature_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    keyId='$key1.keyId',
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;

Get status with signature by specifying user ID



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
keyId string ~ 1024 chars encryption key GRN

Result

Type Description
item Status Status
body string Object to be verified
signature string signature

addExperienceByUserId

addExperienceByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddExperienceByUserId(
    &experience.AddExperienceByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        ExperienceValue: pointy.Int64(10),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddExperienceByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addExperienceByUserId(
        (new AddExperienceByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withExperienceValue(10)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddExperienceByUserIdRequest;
import io.gs2.experience.result.AddExperienceByUserIdResult;

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

try {
    AddExperienceByUserIdResult result = client.addExperienceByUserId(
        new AddExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(10L)
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddExperienceByUserIdRequest;
using Gs2.Gs2Experience.Result.AddExperienceByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddExperienceByUserIdResult> asyncResult = null;
yield return client.AddExperienceByUserId(
    new Gs2.Gs2Experience.Request.AddExperienceByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithExperienceValue(10L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addExperienceByUserId(
        new Gs2Experience.AddExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(10)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_experience_by_user_id(
        experience.AddExperienceByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_experience_value(10)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.add_experience_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    experienceValue=10,
})

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

result = api_result.result
item = result.item;

Add experience



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
experienceValue long 0 ~ 9223372036854775806 Gained Experience

Result

Type Description
item Status Status after addition

setExperienceByUserId

setExperienceByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetExperienceByUserId(
    &experience.SetExperienceByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        ExperienceValue: pointy.Int64(100),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetExperienceByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setExperienceByUserId(
        (new SetExperienceByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withExperienceValue(100)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.SetExperienceByUserIdRequest;
import io.gs2.experience.result.SetExperienceByUserIdResult;

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

try {
    SetExperienceByUserIdResult result = client.setExperienceByUserId(
        new SetExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(100L)
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.SetExperienceByUserIdRequest;
using Gs2.Gs2Experience.Result.SetExperienceByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.SetExperienceByUserIdResult> asyncResult = null;
yield return client.SetExperienceByUserId(
    new Gs2.Gs2Experience.Request.SetExperienceByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithExperienceValue(100L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.setExperienceByUserId(
        new Gs2Experience.SetExperienceByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withExperienceValue(100)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.set_experience_by_user_id(
        experience.SetExperienceByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_experience_value(100)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.set_experience_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    experienceValue=100,
})

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

result = api_result.result
item = result.item;

Set cumulative experience gained



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
experienceValue long 0 ~ 9223372036854775806 Cumulative experience gained

Result

Type Description
item Status Updated Status

addRankCapByUserId

addRankCapByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddRankCapByUserId(
    &experience.AddRankCapByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        RankCapValue: pointy.Int64(30),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddRankCapByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addRankCapByUserId(
        (new AddRankCapByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withRankCapValue(30)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.AddRankCapByUserIdRequest;
import io.gs2.experience.result.AddRankCapByUserIdResult;

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

try {
    AddRankCapByUserIdResult result = client.addRankCapByUserId(
        new AddRankCapByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30L)
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddRankCapByUserIdRequest;
using Gs2.Gs2Experience.Result.AddRankCapByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddRankCapByUserIdResult> asyncResult = null;
yield return client.AddRankCapByUserId(
    new Gs2.Gs2Experience.Request.AddRankCapByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithRankCapValue(30L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addRankCapByUserId(
        new Gs2Experience.AddRankCapByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_rank_cap_by_user_id(
        experience.AddRankCapByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_rank_cap_value(30)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.add_rank_cap_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    rankCapValue=30,
})

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

result = api_result.result
item = result.item;

Add rank cap



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
rankCapValue long ~ 9223372036854775806 Current Rank Cap

Result

Type Description
item Status Status after addition

setRankCapByUserId

setRankCapByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetRankCapByUserId(
    &experience.SetRankCapByUserIdRequest {
        NamespaceName: nil,
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
        RankCapValue: pointy.Int64(30),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetRankCapByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setRankCapByUserId(
        (new SetRankCapByUserIdRequest())
            ->withNamespaceName(null)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
            ->withRankCapValue(30)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.SetRankCapByUserIdRequest;
import io.gs2.experience.result.SetRankCapByUserIdResult;

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

try {
    SetRankCapByUserIdResult result = client.setRankCapByUserId(
        new SetRankCapByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30L)
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.SetRankCapByUserIdRequest;
using Gs2.Gs2Experience.Result.SetRankCapByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.SetRankCapByUserIdResult> asyncResult = null;
yield return client.SetRankCapByUserId(
    new Gs2.Gs2Experience.Request.SetRankCapByUserIdRequest()
        .WithNamespaceName(null)
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001")
        .WithRankCapValue(30L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.setRankCapByUserId(
        new Gs2Experience.SetRankCapByUserIdRequest()
            .withNamespaceName(null)
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
            .withRankCapValue(30)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.set_rank_cap_by_user_id(
        experience.SetRankCapByUserIdRequest()
            .with_namespace_name(None)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
            .with_rank_cap_value(30)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.set_rank_cap_by_user_id({
    namespaceName=nil,
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
    rankCapValue=30,
})

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

result = api_result.result
item = result.item;

Set rank cap



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID
rankCapValue long ~ 9223372036854775806 Current Rank Cap

Result

Type Description
item Status Updated Status

deleteStatusByUserId

deleteStatusByUserId

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.DeleteStatusByUserId(
    &experience.DeleteStatusByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        ExperienceName: pointy.String("character_ssr"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\DeleteStatusByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteStatusByUserId(
        (new DeleteStatusByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withExperienceName("character_ssr")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.experience.rest.Gs2ExperienceRestClient;
import io.gs2.experience.request.DeleteStatusByUserIdRequest;
import io.gs2.experience.result.DeleteStatusByUserIdResult;

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

try {
    DeleteStatusByUserIdResult result = client.deleteStatusByUserId(
        new DeleteStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.DeleteStatusByUserIdRequest;
using Gs2.Gs2Experience.Result.DeleteStatusByUserIdResult;

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

AsyncResult<Gs2.Gs2Experience.Result.DeleteStatusByUserIdResult> asyncResult = null;
yield return client.DeleteStatusByUserId(
    new Gs2.Gs2Experience.Request.DeleteStatusByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithExperienceName("character_ssr")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.deleteStatusByUserId(
        new Gs2Experience.DeleteStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withExperienceName("character_ssr")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.delete_status_by_user_id(
        experience.DeleteStatusByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_experience_name('character_ssr')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)

client = gs2('experience')

api_result = client.delete_status_by_user_id({
    namespaceName='namespace1',
    userId='user-0001',
    experienceName='character_ssr',
    propertyId='property-0001',
})

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

result = api_result.result
item = result.item;

Delete status



Request

Type Require Default Limitation Description
namespaceName string ~ 32 chars Namespace name
userId string ~ 128 chars User Id
experienceName string ~ 128 chars Experience Model Name
propertyId string ~ 1024 chars Property ID

Result

Type Description
item Status Deleted Status

addExperienceByStampSheet

addExperienceByStampSheet

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddExperienceByStampSheet(
    &experience.AddExperienceByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddExperienceByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

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

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

try {
    AddExperienceByStampSheetResult result = client.addExperienceByStampSheet(
        new AddExperienceByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddExperienceByStampSheetRequest;
using Gs2.Gs2Experience.Result.AddExperienceByStampSheetResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddExperienceByStampSheetResult> asyncResult = null;
yield return client.AddExperienceByStampSheet(
    new Gs2.Gs2Experience.Request.AddExperienceByStampSheetRequest()
        .WithStampSheet("$stampSheet")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addExperienceByStampSheet(
        new Gs2Experience.AddExperienceByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_experience_by_stamp_sheet(
        experience.AddExperienceByStampSheetRequest()
            .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('experience')

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

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

result = api_result.result
item = result.item;

Use stamp sheets to add experience



Request

Type Require Default Limitation Description
stampSheet string ~ 5242880 chars Stamp sheet
keyId string ~ 1024 chars encryption key GRN

Result

Type Description
item Status Status after addition

addRankCapByStampSheet

addRankCapByStampSheet

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.AddRankCapByStampSheet(
    &experience.AddRankCapByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\AddRankCapByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

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

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

try {
    AddRankCapByStampSheetResult result = client.addRankCapByStampSheet(
        new AddRankCapByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    Status item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Experience.Gs2ExperienceRestClient;
using Gs2.Gs2Experience.Request.AddRankCapByStampSheetRequest;
using Gs2.Gs2Experience.Result.AddRankCapByStampSheetResult;

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

AsyncResult<Gs2.Gs2Experience.Result.AddRankCapByStampSheetResult> asyncResult = null;
yield return client.AddRankCapByStampSheet(
    new Gs2.Gs2Experience.Request.AddRankCapByStampSheetRequest()
        .WithStampSheet("$stampSheet")
        .WithKeyId("$key1.keyId"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Experience from '@/gs2/experience';

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

try {
    const result = await client.addRankCapByStampSheet(
        new Gs2Experience.AddRankCapByStampSheetRequest()
            .withStampSheet("$stampSheet")
            .withKeyId("$key1.keyId")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import experience

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

try:
    result = client.add_rank_cap_by_stamp_sheet(
        experience.AddRankCapByStampSheetRequest()
            .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('experience')

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

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

result = api_result.result
item = result.item;

Use stamp sheet to add rank cap



Request

Type Require Default Limitation Description
stampSheet string ~ 5242880 chars Stamp sheet
keyId string ~ 1024 chars encryption key GRN

Result

Type Description
item Status Status after addition

setRankCapByStampSheet

setRankCapByStampSheet

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

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

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

client := experience.Gs2ExperienceRestClient{
    Session: &session,
}
result, err := client.SetRankCapByStampSheet(
    &experience.SetRankCapByStampSheetRequest {
        StampSheet: pointy.String("$stampSheet"),
        KeyId: pointy.String("$key1.keyId"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Experience\Gs2ExperienceRestClient;
use Gs2\Experience\Request\SetRankCapByStampSheetRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->setRankCapByStampSheet(
        (new SetRankCapByStampSheetRequest())
            ->withStampSheet(self::$stampSheet)
            ->withKeyId(self::$key1.keyId)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region