API Reference of GS2-Ranking2 SDK

Model

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.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsNamespace GRN
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
logSettingLogSettingLog output settings
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

GlobalRankingModel

Global Ranking Model

The global ranking is a mode that allows you to create a ranking that targets all players. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequireDefaultLimitationDescription
globalRankingModelIdstring~ 1024 charsGlobal Ranking GRN
namestring~ 128 charsRanking Name
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

GlobalRankingModelMaster

Global Ranking Model

The global ranking is a mode that allows you to create a ranking that targets all players. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequireDefaultLimitationDescription
globalRankingModelIdstring~ 1024 charsGlobal Ranking Master GRN
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

GlobalRankingScore

Global Ranking Score

TypeConditionRequireDefaultLimitationDescription
globalRankingScoreIdstring~ 1024 charsGlobal Ranking Score GRN
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

GlobalRankingReceivedReward

Global Ranking Reward Received History

TypeConditionRequireDefaultLimitationDescription
globalRankingReceivedRewardIdstring~ 1024 charsGlobal Ranking Received Reward GRN
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
receivedAtlongDatetime of creation
revisionlong0~ 9223372036854775805Revision

GlobalRankingData

Global Ranking

TypeConditionRequireDefaultLimitationDescription
globalRankingDataIdstring~ 1024 charsGlobal Ranking GRN
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
indexint~ 2147483646Index of Ranking
rankint~ 2147483646Rank of Ranking
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

ClusterRankingModel

Cluster Ranking Model

The cluster ranking mode is a mode for realizing rankings targeting players in guilds or gatherings. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequireDefaultLimitationDescription
clusterRankingModelIdstring~ 1024 charsCluster Ranking GRN
namestring~ 128 charsRanking Name
metadatastring~ 1024 charsmetadata
clusterTypeenum [
“Raw”,
“Gs2Guild::Guild”,
“Gs2Matchmaking::SeasonGathering”
]
~ 128 charsCluster Type
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

ClusterRankingModelMaster

Cluster Ranking Model

The cluster ranking mode is a mode for realizing rankings targeting players in guilds or gatherings. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequireDefaultLimitationDescription
clusterRankingModelIdstring~ 1024 charsCluster Ranking Master GRN
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
clusterTypeenum [
“Raw”,
“Gs2Guild::Guild”,
“Gs2Matchmaking::SeasonGathering”
]
~ 128 charsCluster Type
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

ClusterRankingScore

Cluster Ranking Score

TypeConditionRequireDefaultLimitationDescription
clusterRankingScoreIdstring~ 1024 charsCluster Ranking Score GRN
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

ClusterRankingReceivedReward

Cluster Ranking Reward Received History

TypeConditionRequireDefaultLimitationDescription
clusterRankingReceivedRewardIdstring~ 1024 charsCluster Ranking Received Reward GRN
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
receivedAtlongDatetime of creation
revisionlong0~ 9223372036854775805Revision

ClusterRankingData

Cluster Ranking

TypeConditionRequireDefaultLimitationDescription
clusterRankingDataIdstring~ 1024 charsCluster Ranking GRN
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
indexint~ 2147483646Index of Ranking
rankint~ 2147483646Rank of Ranking
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

SubscribeRankingModel

Subscribe Ranking Model

A mode that aggregates the scores of other players who have subscribed and creates a ranking.

TypeConditionRequireDefaultLimitationDescription
subscribeRankingModelIdstring~ 1024 charsSubscribe Ranking GRN
namestring~ 128 charsRanking Name
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

SubscribeRankingModelMaster

Subscribe Ranking Model

The subscribe ranking mode is a mode for realizing rankings targeting players in guilds or gatherings. You can display the top 1000 rankings.

By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.

TypeConditionRequireDefaultLimitationDescription
subscribeRankingModelIdstring~ 1024 charsSubscribe Ranking Master GRN
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

Subscribe

Subscribe

TypeConditionRequireDefaultLimitationDescription
subscribeIdstring~ 1024 charsSubscribe Score GRN
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
targetUserIdsList<string>~ 100 itemsSubscribe Target User IDs
fromUserIdsList<string>~ 1000 itemsSubscribe From User IDs
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

SubscribeRankingScore

Subscribe Ranking Score

TypeConditionRequireDefaultLimitationDescription
subscribeRankingScoreIdstring~ 1024 charsSubscribe Ranking Score GRN
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

SubscribeRankingData

Subscribe Ranking

TypeConditionRequireDefaultLimitationDescription
subscribeRankingDataIdstring~ 1024 charsSubscribe Ranking GRN
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
userIdstring~ 128 charsUser Id
indexint~ 2147483646Index of Ranking
rankint~ 2147483646Rank of Ranking
scorerUserIdstring~ 128 charsScorer User ID
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
createdAtlongDatetime of creation
updatedAtlongDatetime of last update
revisionlong0~ 9223372036854775805Revision

CurrentRankingMaster

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.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsCurrently available Ranking Master GRN
settingsstring~ 5242880 charsMaster data

SubscribeUser

Subscribe Information

TypeConditionRequireDefaultLimitationDescription
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID

RankingReward

Ranking Reward Model

Set the rewards that can be received during the reference period when the score registration period is set in the ranking. If the repeat setting is enabled, the most recently ended period ranking will be the target for receiving rewards.

TypeConditionRequireDefaultLimitationDescription
thresholdRankint1 ~ 1001Rank threshold
metadatastring~ 1024 charsmetadata
acquireActionsList<AcquireAction>[]~ 100 itemsList of actions to be performed when rewards are received

TransactionSetting

Transaction settings

TypeConditionRequireDefaultLimitationDescription
enableAutoRunbooltrueAutomatically run issued stamp sheets on the server side, or
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor namespace used for stamp sheet execution
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsNamespace in GS2-JobQueue used to run the stamp sheet

LogSetting

Log setting

This type manages log output settings. This type holds the identifier of the log namespace used to output log data. The log namespace ID specifies the GS2-Log namespace to aggregate and store the log data. Through this setting, API request and response log data under this namespace will be output to the target GS2-Log. GS2-Log provides logs in real time, which can be used for system monitoring, analysis, debugging, etc.

TypeConditionRequireDefaultLimitationDescription
loggingNamespaceIdstring~ 1024 charsNamespace GRN

GitHubCheckoutSetting

Setup to check out master data from GitHub

TypeConditionRequireDefaultLimitationDescription
apiKeyIdstring~ 1024 charsGitHub API key GRN
repositoryNamestring~ 1024 charsRepository Name
sourcePathstring~ 1024 charsSource code file path
referenceTypeenum [
“commit_hash”,
“branch”,
“tag”
]
~ 128 charsSource of code
commitHashstring{referenceType} == “commit_hash”~ 1024 charsCommit hash
branchNamestring{referenceType} == “branch”~ 1024 charsBranch Name
tagNamestring{referenceType} == “tag”~ 1024 charsTag Name

AcquireAction

Acquire Action

TypeConditionRequireDefaultLimitationDescription
actionenum [
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:UnlockIncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2SerialKey:RevertUseByUserId",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
]
~ 128 charsTypes of actions to be performed in the acquire action
requeststring~ 1048576 charsJSON of request

Config

Configration

Set values to be applied to stamp sheet variables

TypeConditionRequireDefaultLimitationDescription
keystring~ 64 charsName
valuestring~ 51200 charsValue

Methods

describeNamespaces

Get list of namespaces

Request

TypeConditionRequireDefaultLimitationDescription
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<Namespace>List of Namespace
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

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;

createNamespace

Create a new namespace

Request

TypeConditionRequireDefaultLimitationDescription
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceNamespace created

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &ranking2.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        TransactionSetting: nil,
        LogSetting: &ranking2.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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\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)
            ->withTransactionSetting(null)
            ->withLogSetting((new \Gs2\Ranking2\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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateNamespaceRequest;
import io.gs2.ranking2.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withTransactionSetting(null)
            .withLogSetting(new io.gs2.ranking2.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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateNamespaceRequest;
using Gs2.Gs2Ranking2.Result.CreateNamespaceResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Ranking2.Request.CreateNamespaceRequest()
        .WithName("namespace1")
        .WithDescription(null)
        .WithTransactionSetting(null)
        .WithLogSetting(new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createNamespace(
        new Gs2Ranking2.CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withTransactionSetting(null)
            .withLogSetting(new Gs2Ranking2.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 ranking2

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

try:
    result = client.create_namespace(
        ranking2.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_transaction_setting(None)
            .with_log_setting(
                ranking2.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('ranking2')

api_result = client.create_namespace({
    name="namespace1",
    description=nil,
    transactionSetting=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;

getNamespaceStatus

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
statusstring

Implementation Example

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

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;

getNamespace

Get namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceNamespace

Implementation Example

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

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;

updateNamespace

Update namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceUpdated namespace

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &ranking2.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        TransactionSetting: nil,
        LogSetting: &ranking2.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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\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")
            ->withTransactionSetting(null)
            ->withLogSetting((new \Gs2\Ranking2\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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateNamespaceRequest;
import io.gs2.ranking2.result.UpdateNamespaceResult;

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Ranking2.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace1")
        .WithDescription("description1")
        .WithTransactionSetting(null)
        .WithLogSetting(new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateNamespace(
        new Gs2Ranking2.UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withLogSetting(new Gs2Ranking2.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 ranking2

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

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

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

deleteNamespace

Delete namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceDeleted namespace

Implementation Example

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

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;

dumpUserDataByUserId

Get dump data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &ranking2.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DumpUserDataByUserIdRequest;
import io.gs2.ranking2.result.DumpUserDataByUserIdResult;

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

try {
    DumpUserDataByUserIdResult result = client.dumpUserDataByUserId(
        new DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DumpUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DumpUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.dumpUserDataByUserId(
        new Gs2Ranking2.DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.dump_user_data_by_user_id(
        ranking2.DumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result

checkDumpUserDataByUserId

Check if the dump of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of output data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &ranking2.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.ranking2.result.CheckDumpUserDataByUserIdResult;

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

try {
    CheckDumpUserDataByUserIdResult result = client.checkDumpUserDataByUserId(
        new CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CheckDumpUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CheckDumpUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.checkDumpUserDataByUserId(
        new Gs2Ranking2.CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.check_dump_user_data_by_user_id(
        ranking2.CheckDumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.check_dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
url = result.url;

cleanUserDataByUserId

Get clean data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &ranking2.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CleanUserDataByUserIdRequest;
import io.gs2.ranking2.result.CleanUserDataByUserIdResult;

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

try {
    CleanUserDataByUserIdResult result = client.cleanUserDataByUserId(
        new CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CleanUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CleanUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.cleanUserDataByUserId(
        new Gs2Ranking2.CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.clean_user_data_by_user_id(
        ranking2.CleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result

checkCleanUserDataByUserId

Check if the clean of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &ranking2.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.ranking2.result.CheckCleanUserDataByUserIdResult;

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

try {
    CheckCleanUserDataByUserIdResult result = client.checkCleanUserDataByUserId(
        new CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CheckCleanUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CheckCleanUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.checkCleanUserDataByUserId(
        new Gs2Ranking2.CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.check_clean_user_data_by_user_id(
        ranking2.CheckCleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.check_clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result

prepareImportUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
uploadTokenstringToken used to reflect results after upload
uploadUrlstringURL used to upload user data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &ranking2.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.ranking2.result.PrepareImportUserDataByUserIdResult;

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

try {
    PrepareImportUserDataByUserIdResult result = client.prepareImportUserDataByUserId(
        new PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PrepareImportUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.PrepareImportUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2Ranking2.PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.prepare_import_user_data_by_user_id(
        ranking2.PrepareImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.prepare_import_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

importUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
uploadTokenstring~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &ranking2.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ImportUserDataByUserIdRequest;
import io.gs2.ranking2.result.ImportUserDataByUserIdResult;

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

try {
    ImportUserDataByUserIdResult result = client.importUserDataByUserId(
        new ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.ImportUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.ImportUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.importUserDataByUserId(
        new Gs2Ranking2.ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.import_user_data_by_user_id(
        ranking2.ImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result

checkImportUserDataByUserId

Check if the import of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
uploadTokenstring~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of log data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &ranking2.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CheckImportUserDataByUserIdRequest;
import io.gs2.ranking2.result.CheckImportUserDataByUserIdResult;

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

try {
    CheckImportUserDataByUserIdResult result = client.checkImportUserDataByUserId(
        new CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CheckImportUserDataByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CheckImportUserDataByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Ranking2.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2Ranking2.CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.check_import_user_data_by_user_id(
        ranking2.CheckImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.check_import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
url = result.url;

describeGlobalRankingModels

Get list of Global Ranking Models

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemsList<GlobalRankingModel>List of Global Ranking Models

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingModels(
    &ranking2.DescribeGlobalRankingModelsRequest {
        NamespaceName: nil,
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingModels(
        (new DescribeGlobalRankingModelsRequest())
            ->withNamespaceName(null)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingModelsRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingModelsResult;

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

try {
    DescribeGlobalRankingModelsResult result = client.describeGlobalRankingModels(
        new DescribeGlobalRankingModelsRequest()
            .withNamespaceName(null)
    );
    List<GlobalRankingModel> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingModelsRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingModelsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingModelsResult> asyncResult = null;
yield return client.DescribeGlobalRankingModels(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingModelsRequest()
        .WithNamespaceName(null),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingModels(
        new Gs2Ranking2.DescribeGlobalRankingModelsRequest()
            .withNamespaceName(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_ranking_models(
        ranking2.DescribeGlobalRankingModelsRequest()
            .with_namespace_name(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_models({
    namespaceName=nil,
})

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

result = api_result.result
items = result.items;

getGlobalRankingModel

Get Global Ranking Model

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingModel(
    &ranking2.GetGlobalRankingModelRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingModel(
        (new GetGlobalRankingModelRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingModelRequest;
import io.gs2.ranking2.result.GetGlobalRankingModelResult;

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

try {
    GetGlobalRankingModelResult result = client.getGlobalRankingModel(
        new GetGlobalRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    GlobalRankingModel 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingModelRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingModelResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingModelResult> asyncResult = null;
yield return client.GetGlobalRankingModel(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingModelRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingModel(
        new Gs2Ranking2.GetGlobalRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_model(
        ranking2.GetGlobalRankingModelRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_model({
    namespaceName="namespace1",
    rankingName="ranking-0001",
})

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

result = api_result.result
item = result.item;

describeGlobalRankingModelMasters

Get list of Global Ranking Model Masters

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<GlobalRankingModelMaster>List of Global Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingModelMasters(
    &ranking2.DescribeGlobalRankingModelMastersRequest {
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingModelMasters(
        (new DescribeGlobalRankingModelMastersRequest())
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingModelMastersRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingModelMastersResult;

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

try {
    DescribeGlobalRankingModelMastersResult result = client.describeGlobalRankingModelMasters(
        new DescribeGlobalRankingModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingModelMaster> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingModelMastersRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingModelMastersResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingModelMastersResult> asyncResult = null;
yield return client.DescribeGlobalRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingModelMastersRequest()
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingModelMasters(
        new Gs2Ranking2.DescribeGlobalRankingModelMastersRequest()
            .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 ranking2

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

try:
    result = client.describe_global_ranking_model_masters(
        ranking2.DescribeGlobalRankingModelMastersRequest()
            .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('ranking2')

api_result = client.describe_global_ranking_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;

createGlobalRankingModelMaster

Create Global Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemGlobalRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingModelMaster(
    &ranking2.CreateGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("global-0001"),
        Description: nil,
        Metadata: nil,
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        OrderDirection: pointy.String("asc"),
        RankingRewards: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateGlobalRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGlobalRankingModelMaster(
        (new CreateGlobalRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("global-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withOrderDirection("asc")
            ->withRankingRewards(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateGlobalRankingModelMasterRequest;
import io.gs2.ranking2.result.CreateGlobalRankingModelMasterResult;

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

try {
    CreateGlobalRankingModelMasterResult result = client.createGlobalRankingModelMaster(
        new CreateGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("global-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    GlobalRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateGlobalRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.CreateGlobalRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateGlobalRankingModelMasterResult> asyncResult = null;
yield return client.CreateGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("global-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithOrderDirection("asc")
        .WithRankingRewards(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createGlobalRankingModelMaster(
        new Gs2Ranking2.CreateGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("global-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_global_ranking_model_master(
        ranking2.CreateGlobalRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('global-0001')
            .with_description(None)
            .with_metadata(None)
            .with_minimum_value(None)
            .with_maximum_value(None)
            .with_sum(None)
            .with_order_direction('asc')
            .with_ranking_rewards(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_global_ranking_model_master({
    namespaceName="namespace1",
    name="global-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    rankingRewards=nil,
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

getGlobalRankingModelMaster

Get Global Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelMasterGlobal Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingModelMaster(
    &ranking2.GetGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("global-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingModelMaster(
        (new GetGlobalRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("global-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingModelMasterRequest;
import io.gs2.ranking2.result.GetGlobalRankingModelMasterResult;

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

try {
    GetGlobalRankingModelMasterResult result = client.getGlobalRankingModelMaster(
        new GetGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
    );
    GlobalRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingModelMasterResult> asyncResult = null;
yield return client.GetGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("global-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingModelMaster(
        new Gs2Ranking2.GetGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_model_master(
        ranking2.GetGlobalRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('global-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_model_master({
    namespaceName="namespace1",
    rankingName="global-0001",
})

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

result = api_result.result
item = result.item;

updateGlobalRankingModelMaster

Update Global Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemGlobalRankingModelMasterUpdated Global Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateGlobalRankingModelMaster(
    &ranking2.UpdateGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("global-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("CATEGORY_0001"),
        MinimumValue: pointy.Int64(100),
        MaximumValue: pointy.Int64(10000),
        Sum: nil,
        OrderDirection: pointy.String("desc"),
        RankingRewards: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateGlobalRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateGlobalRankingModelMaster(
        (new UpdateGlobalRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("global-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withOrderDirection("desc")
            ->withRankingRewards(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateGlobalRankingModelMasterRequest;
import io.gs2.ranking2.result.UpdateGlobalRankingModelMasterResult;

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

try {
    UpdateGlobalRankingModelMasterResult result = client.updateGlobalRankingModelMaster(
        new UpdateGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    GlobalRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.UpdateGlobalRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.UpdateGlobalRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateGlobalRankingModelMasterResult> asyncResult = null;
yield return client.UpdateGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("global-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithOrderDirection("desc")
        .WithRankingRewards(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateGlobalRankingModelMaster(
        new Gs2Ranking2.UpdateGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.update_global_ranking_model_master(
        ranking2.UpdateGlobalRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('global-0001')
            .with_description('description1')
            .with_metadata('CATEGORY_0001')
            .with_minimum_value(100)
            .with_maximum_value(10000)
            .with_sum(None)
            .with_order_direction('desc')
            .with_ranking_rewards(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_global_ranking_model_master({
    namespaceName="namespace1",
    rankingName="global-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    rankingRewards=nil,
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

deleteGlobalRankingModelMaster

Delete Global Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelMasterDeleted Global Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingModelMaster(
    &ranking2.DeleteGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("global-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteGlobalRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGlobalRankingModelMaster(
        (new DeleteGlobalRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("global-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteGlobalRankingModelMasterRequest;
import io.gs2.ranking2.result.DeleteGlobalRankingModelMasterResult;

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

try {
    DeleteGlobalRankingModelMasterResult result = client.deleteGlobalRankingModelMaster(
        new DeleteGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
    );
    GlobalRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteGlobalRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.DeleteGlobalRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteGlobalRankingModelMasterResult> asyncResult = null;
yield return client.DeleteGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("global-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteGlobalRankingModelMaster(
        new Gs2Ranking2.DeleteGlobalRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("global-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_global_ranking_model_master(
        ranking2.DeleteGlobalRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('global-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_global_ranking_model_master({
    namespaceName="namespace1",
    rankingName="global-0001",
})

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

result = api_result.result
item = result.item;

describeGlobalRankingScores

Get list of Global Ranking Scores

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<GlobalRankingScore>List of Global Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingScores(
    &ranking2.DescribeGlobalRankingScoresRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingScoresRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingScores(
        (new DescribeGlobalRankingScoresRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingScoresRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingScoresResult;

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

try {
    DescribeGlobalRankingScoresResult result = client.describeGlobalRankingScores(
        new DescribeGlobalRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresResult> asyncResult = null;
yield return client.DescribeGlobalRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingScores(
        new Gs2Ranking2.DescribeGlobalRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-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 ranking2

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

try:
    result = client.describe_global_ranking_scores(
        ranking2.DescribeGlobalRankingScoresRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-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('ranking2')

api_result = client.describe_global_ranking_scores({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-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;

describeGlobalRankingScoresByUserId

Get list of Global Ranking Scores specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<GlobalRankingScore>List of Global Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingScoresByUserId(
    &ranking2.DescribeGlobalRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingScoresByUserId(
        (new DescribeGlobalRankingScoresByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingScoresByUserIdResult;

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

try {
    DescribeGlobalRankingScoresByUserIdResult result = client.describeGlobalRankingScoresByUserId(
        new DescribeGlobalRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingScoresByUserId(
        new Gs2Ranking2.DescribeGlobalRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_ranking_scores_by_user_id(
        ranking2.DescribeGlobalRankingScoresByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_scores_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

putGlobalRankingScore

Register Global Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata

Result

TypeDescription
itemGlobalRankingScoreRegistered Global Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutGlobalRankingScore(
    &ranking2.PutGlobalRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutGlobalRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putGlobalRankingScore(
        (new PutGlobalRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withScore(100)
            ->withMetadata(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutGlobalRankingScoreRequest;
import io.gs2.ranking2.result.PutGlobalRankingScoreResult;

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

try {
    PutGlobalRankingScoreResult result = client.putGlobalRankingScore(
        new PutGlobalRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    GlobalRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutGlobalRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.PutGlobalRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutGlobalRankingScoreResult> asyncResult = null;
yield return client.PutGlobalRankingScore(
    new Gs2.Gs2Ranking2.Request.PutGlobalRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithScore(100L)
        .WithMetadata(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putGlobalRankingScore(
        new Gs2Ranking2.PutGlobalRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100)
            .withMetadata(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_global_ranking_score(
        ranking2.PutGlobalRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_score(100)
            .with_metadata(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_global_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=nil,
})

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

result = api_result.result
item = result.item;

putGlobalRankingScoreByUserId

Register Global Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreRegistered Global Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutGlobalRankingScoreByUserId(
    &ranking2.PutGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putGlobalRankingScoreByUserId(
        (new PutGlobalRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withScore(null)
            ->withMetadata(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutGlobalRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.PutGlobalRankingScoreByUserIdResult;

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

try {
    PutGlobalRankingScoreByUserIdResult result = client.putGlobalRankingScoreByUserId(
        new PutGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutGlobalRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.PutGlobalRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutGlobalRankingScoreByUserIdResult> asyncResult = null;
yield return client.PutGlobalRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.PutGlobalRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithScore(null)
        .WithMetadata(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putGlobalRankingScoreByUserId(
        new Gs2Ranking2.PutGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_global_ranking_score_by_user_id(
        ranking2.PutGlobalRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_score(None)
            .with_metadata(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_global_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

getGlobalRankingScore

Get Global Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingScore(
    &ranking2.GetGlobalRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingScore(
        (new GetGlobalRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingScoreRequest;
import io.gs2.ranking2.result.GetGlobalRankingScoreResult;

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

try {
    GetGlobalRankingScoreResult result = client.getGlobalRankingScore(
        new GetGlobalRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingScoreResult> asyncResult = null;
yield return client.GetGlobalRankingScore(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingScore(
        new Gs2Ranking2.GetGlobalRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_score(
        ranking2.GetGlobalRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

getGlobalRankingScoreByUserId

Get Global Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingScoreByUserId(
    &ranking2.GetGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingScoreByUserId(
        (new GetGlobalRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.GetGlobalRankingScoreByUserIdResult;

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

try {
    GetGlobalRankingScoreByUserIdResult result = client.getGlobalRankingScoreByUserId(
        new GetGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingScoreByUserIdResult> asyncResult = null;
yield return client.GetGlobalRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingScoreByUserId(
        new Gs2Ranking2.GetGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_score_by_user_id(
        ranking2.GetGlobalRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteGlobalRankingScoreByUserId

Delete Global Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreDeleted Global Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingScoreByUserId(
    &ranking2.DeleteGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGlobalRankingScoreByUserId(
        (new DeleteGlobalRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteGlobalRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.DeleteGlobalRankingScoreByUserIdResult;

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

try {
    DeleteGlobalRankingScoreByUserIdResult result = client.deleteGlobalRankingScoreByUserId(
        new DeleteGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteGlobalRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteGlobalRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteGlobalRankingScoreByUserIdResult> asyncResult = null;
yield return client.DeleteGlobalRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteGlobalRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteGlobalRankingScoreByUserId(
        new Gs2Ranking2.DeleteGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_global_ranking_score_by_user_id(
        ranking2.DeleteGlobalRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_global_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeGlobalRankingReceivedRewards

Get list of Global Ranking Rewards Received

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<GlobalRankingReceivedReward>List of Global Ranking Rewards Received
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingReceivedRewards(
    &ranking2.DescribeGlobalRankingReceivedRewardsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingReceivedRewardsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingReceivedRewards(
        (new DescribeGlobalRankingReceivedRewardsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingReceivedRewardsRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingReceivedRewardsResult;

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

try {
    DescribeGlobalRankingReceivedRewardsResult result = client.describeGlobalRankingReceivedRewards(
        new DescribeGlobalRankingReceivedRewardsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingReceivedReward> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsResult> asyncResult = null;
yield return client.DescribeGlobalRankingReceivedRewards(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(0L)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingReceivedRewards(
        new Gs2Ranking2.DescribeGlobalRankingReceivedRewardsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_ranking_received_rewards(
        ranking2.DescribeGlobalRankingReceivedRewardsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_season(0)
            .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('ranking2')

api_result = client.describe_global_ranking_received_rewards({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=0,
    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;

describeGlobalRankingReceivedRewardsByUserId

Get list of Global Ranking Rewards Received specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<GlobalRankingReceivedReward>List of Global Ranking Rewards Received
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingReceivedRewardsByUserId(
    &ranking2.DescribeGlobalRankingReceivedRewardsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingReceivedRewardsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingReceivedRewardsByUserId(
        (new DescribeGlobalRankingReceivedRewardsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingReceivedRewardsByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingReceivedRewardsByUserIdResult;

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

try {
    DescribeGlobalRankingReceivedRewardsByUserIdResult result = client.describeGlobalRankingReceivedRewardsByUserId(
        new DescribeGlobalRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingReceivedReward> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingReceivedRewardsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingReceivedRewardsByUserId(
        new Gs2Ranking2.DescribeGlobalRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_ranking_received_rewards_by_user_id(
        ranking2.DescribeGlobalRankingReceivedRewardsByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_received_rewards_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

createGlobalRankingReceivedReward

Create Global Ranking Reward Received History

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingReceivedReward(
    &ranking2.CreateGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGlobalRankingReceivedReward(
        (new CreateGlobalRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.CreateGlobalRankingReceivedRewardResult;

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

try {
    CreateGlobalRankingReceivedRewardResult result = client.createGlobalRankingReceivedReward(
        new CreateGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardResult> asyncResult = null;
yield return client.CreateGlobalRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createGlobalRankingReceivedReward(
        new Gs2Ranking2.CreateGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_global_ranking_received_reward(
        ranking2.CreateGlobalRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_global_ranking_received_reward({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

createGlobalRankingReceivedRewardByUserId

Get Global Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingReceivedRewardByUserId(
    &ranking2.CreateGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGlobalRankingReceivedRewardByUserId(
        (new CreateGlobalRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateGlobalRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.CreateGlobalRankingReceivedRewardByUserIdResult;

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

try {
    CreateGlobalRankingReceivedRewardByUserIdResult result = client.createGlobalRankingReceivedRewardByUserId(
        new CreateGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.CreateGlobalRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createGlobalRankingReceivedRewardByUserId(
        new Gs2Ranking2.CreateGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_global_ranking_received_reward_by_user_id(
        ranking2.CreateGlobalRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_global_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

receiveGlobalRankingReceivedReward

Receive Global Ranking Reward

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
configList<Config>[]~ 32 itemsSet values to be applied to stamp sheet variables

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringTransaction ID of the stamp sheet issued
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is stamp sheet auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveGlobalRankingReceivedReward(
    &ranking2.ReceiveGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receiveGlobalRankingReceivedReward(
        (new ReceiveGlobalRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.ReceiveGlobalRankingReceivedRewardResult;

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

try {
    ReceiveGlobalRankingReceivedRewardResult result = client.receiveGlobalRankingReceivedReward(
        new ReceiveGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withConfig(null)
    );
    GlobalRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.ReceiveGlobalRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.ReceiveGlobalRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.ReceiveGlobalRankingReceivedRewardResult> asyncResult = null;
yield return client.ReceiveGlobalRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.ReceiveGlobalRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(0L)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var acquireActions = result.AcquireActions;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.receiveGlobalRankingReceivedReward(
        new Gs2Ranking2.ReceiveGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0)
            .withConfig(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_global_ranking_received_reward(
        ranking2.ReceiveGlobalRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_season(0)
            .with_config(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.receive_global_ranking_received_reward({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=0,
    config=nil,
})

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

receiveGlobalRankingReceivedRewardByUserId

Receive Global Ranking Reward specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
configList<Config>[]~ 32 itemsSet values to be applied to stamp sheet variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringTransaction ID of the stamp sheet issued
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is stamp sheet auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveGlobalRankingReceivedRewardByUserId(
    &ranking2.ReceiveGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receiveGlobalRankingReceivedRewardByUserId(
        (new ReceiveGlobalRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveGlobalRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.ReceiveGlobalRankingReceivedRewardByUserIdResult;

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

try {
    ReceiveGlobalRankingReceivedRewardByUserIdResult result = client.receiveGlobalRankingReceivedRewardByUserId(
        new ReceiveGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.ReceiveGlobalRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.ReceiveGlobalRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.ReceiveGlobalRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.ReceiveGlobalRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.ReceiveGlobalRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(0L)
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var acquireActions = result.AcquireActions;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.receiveGlobalRankingReceivedRewardByUserId(
        new Gs2Ranking2.ReceiveGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(0)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_global_ranking_received_reward_by_user_id(
        ranking2.ReceiveGlobalRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_season(0)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.receive_global_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    season=0,
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

getGlobalRankingReceivedReward

Get Global Ranking Reward Received History

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingReceivedReward(
    &ranking2.GetGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingReceivedReward(
        (new GetGlobalRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.GetGlobalRankingReceivedRewardResult;

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

try {
    GetGlobalRankingReceivedRewardResult result = client.getGlobalRankingReceivedReward(
        new GetGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingReceivedRewardResult> asyncResult = null;
yield return client.GetGlobalRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingReceivedReward(
        new Gs2Ranking2.GetGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_received_reward(
        ranking2.GetGlobalRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_received_reward({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

getGlobalRankingReceivedRewardByUserId

Get Global Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingReceivedRewardByUserId(
    &ranking2.GetGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingReceivedRewardByUserId(
        (new GetGlobalRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.GetGlobalRankingReceivedRewardByUserIdResult;

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

try {
    GetGlobalRankingReceivedRewardByUserIdResult result = client.getGlobalRankingReceivedRewardByUserId(
        new GetGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.GetGlobalRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingReceivedRewardByUserId(
        new Gs2Ranking2.GetGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_received_reward_by_user_id(
        ranking2.GetGlobalRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteGlobalRankingReceivedRewardByUserId

Delete Global Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingReceivedRewardDeleted Global Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingReceivedRewardByUserId(
    &ranking2.DeleteGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteGlobalRankingReceivedRewardByUserId(
        (new DeleteGlobalRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteGlobalRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.DeleteGlobalRankingReceivedRewardByUserIdResult;

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

try {
    DeleteGlobalRankingReceivedRewardByUserIdResult result = client.deleteGlobalRankingReceivedRewardByUserId(
        new DeleteGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteGlobalRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteGlobalRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteGlobalRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.DeleteGlobalRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteGlobalRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteGlobalRankingReceivedRewardByUserId(
        new Gs2Ranking2.DeleteGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_global_ranking_received_reward_by_user_id(
        ranking2.DeleteGlobalRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_global_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

createGlobalRankingReceivedRewardByStampTask

Record Global Ranking Reward Received History using stamp task

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsConsume Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History
newContextStackstringRequest of context in which stamp task execution results are recorded

Implementation Example

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

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createGlobalRankingReceivedRewardByStampTask(
        (new CreateGlobalRankingReceivedRewardByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateGlobalRankingReceivedRewardByStampTaskRequest;
import io.gs2.ranking2.result.CreateGlobalRankingReceivedRewardByStampTaskResult;

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

try {
    CreateGlobalRankingReceivedRewardByStampTaskResult result = client.createGlobalRankingReceivedRewardByStampTask(
        new CreateGlobalRankingReceivedRewardByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    GlobalRankingReceivedReward item = result.getItem();
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardByStampTaskRequest;
using Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardByStampTaskResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateGlobalRankingReceivedRewardByStampTaskResult> asyncResult = null;
yield return client.CreateGlobalRankingReceivedRewardByStampTask(
    new Gs2.Gs2Ranking2.Request.CreateGlobalRankingReceivedRewardByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var newContextStack = result.NewContextStack;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createGlobalRankingReceivedRewardByStampTask(
        new Gs2Ranking2.CreateGlobalRankingReceivedRewardByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const newContextStack = result.getNewContextStack();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_global_ranking_received_reward_by_stamp_task(
        ranking2.CreateGlobalRankingReceivedRewardByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_global_ranking_received_reward_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

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

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

describeGlobalRankings

Get list of Global Rankings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<GlobalRankingData>List of Global Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankings(
    &ranking2.DescribeGlobalRankingsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankings(
        (new DescribeGlobalRankingsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingsRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingsResult;

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

try {
    DescribeGlobalRankingsResult result = client.describeGlobalRankings(
        new DescribeGlobalRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsResult> asyncResult = null;
yield return client.DescribeGlobalRankings(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankings(
        new Gs2Ranking2.DescribeGlobalRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_rankings(
        ranking2.DescribeGlobalRankingsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .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('ranking2')

api_result = client.describe_global_rankings({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    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;

describeGlobalRankingsByUserId

Get list of Global Rankings by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<GlobalRankingData>List of Global Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingsByUserId(
    &ranking2.DescribeGlobalRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingsByUserId(
        (new DescribeGlobalRankingsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingsByUserIdResult;

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

try {
    DescribeGlobalRankingsByUserIdResult result = client.describeGlobalRankingsByUserId(
        new DescribeGlobalRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeGlobalRankingsByUserId(
        new Gs2Ranking2.DescribeGlobalRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_global_rankings_by_user_id(
        ranking2.DescribeGlobalRankingsByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_rankings_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

getGlobalRanking

Get Global Ranking

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingDataGlobal Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRanking(
    &ranking2.GetGlobalRankingRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRanking(
        (new GetGlobalRankingRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingRequest;
import io.gs2.ranking2.result.GetGlobalRankingResult;

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

try {
    GetGlobalRankingResult result = client.getGlobalRanking(
        new GetGlobalRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    GlobalRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingResult> asyncResult = null;
yield return client.GetGlobalRanking(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRanking(
        new Gs2Ranking2.GetGlobalRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking(
        ranking2.GetGlobalRankingRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=nil,
})

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

result = api_result.result
item = result.item;

getGlobalRankingByUserId

Get Global Ranking by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingDataGlobal Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingByUserId(
    &ranking2.GetGlobalRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getGlobalRankingByUserId(
        (new GetGlobalRankingByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingByUserIdRequest;
import io.gs2.ranking2.result.GetGlobalRankingByUserIdResult;

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

try {
    GetGlobalRankingByUserIdResult result = client.getGlobalRankingByUserId(
        new GetGlobalRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetGlobalRankingByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetGlobalRankingByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingByUserIdResult> asyncResult = null;
yield return client.GetGlobalRankingByUserId(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getGlobalRankingByUserId(
        new Gs2Ranking2.GetGlobalRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_global_ranking_by_user_id(
        ranking2.GetGlobalRankingByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_global_ranking_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeClusterRankingModels

Get list of Cluster Ranking Models

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemsList<ClusterRankingModel>List of Cluster Ranking Models

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingModels(
    &ranking2.DescribeClusterRankingModelsRequest {
        NamespaceName: nil,
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingModels(
        (new DescribeClusterRankingModelsRequest())
            ->withNamespaceName(null)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingModelsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingModelsResult;

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

try {
    DescribeClusterRankingModelsResult result = client.describeClusterRankingModels(
        new DescribeClusterRankingModelsRequest()
            .withNamespaceName(null)
    );
    List<ClusterRankingModel> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelsRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelsResult> asyncResult = null;
yield return client.DescribeClusterRankingModels(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelsRequest()
        .WithNamespaceName(null),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingModels(
        new Gs2Ranking2.DescribeClusterRankingModelsRequest()
            .withNamespaceName(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_ranking_models(
        ranking2.DescribeClusterRankingModelsRequest()
            .with_namespace_name(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_models({
    namespaceName=nil,
})

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

result = api_result.result
items = result.items;

getClusterRankingModel

Get Cluster Ranking Model

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingModel(
    &ranking2.GetClusterRankingModelRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingModel(
        (new GetClusterRankingModelRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingModelRequest;
import io.gs2.ranking2.result.GetClusterRankingModelResult;

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

try {
    GetClusterRankingModelResult result = client.getClusterRankingModel(
        new GetClusterRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    ClusterRankingModel 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingModelRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingModelResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingModelResult> asyncResult = null;
yield return client.GetClusterRankingModel(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingModelRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingModel(
        new Gs2Ranking2.GetClusterRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_model(
        ranking2.GetClusterRankingModelRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_model({
    namespaceName="namespace1",
    rankingName="ranking-0001",
})

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

result = api_result.result
item = result.item;

describeClusterRankingModelMasters

Get list of Cluster Ranking Model Masters

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingModelMaster>List of Cluster Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingModelMasters(
    &ranking2.DescribeClusterRankingModelMastersRequest {
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingModelMasters(
        (new DescribeClusterRankingModelMastersRequest())
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingModelMastersRequest;
import io.gs2.ranking2.result.DescribeClusterRankingModelMastersResult;

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

try {
    DescribeClusterRankingModelMastersResult result = client.describeClusterRankingModelMasters(
        new DescribeClusterRankingModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingModelMaster> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelMastersRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelMastersResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelMastersResult> asyncResult = null;
yield return client.DescribeClusterRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelMastersRequest()
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingModelMasters(
        new Gs2Ranking2.DescribeClusterRankingModelMastersRequest()
            .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 ranking2

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

try:
    result = client.describe_cluster_ranking_model_masters(
        ranking2.DescribeClusterRankingModelMastersRequest()
            .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('ranking2')

api_result = client.describe_cluster_ranking_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;

createClusterRankingModelMaster

Create Cluster Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
clusterTypeenum [
“Raw”,
“Gs2Guild::Guild”,
“Gs2Matchmaking::SeasonGathering”
]
~ 128 charsCluster Type
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemClusterRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingModelMaster(
    &ranking2.CreateClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("cluster-0001"),
        Description: nil,
        Metadata: nil,
        ClusterType: pointy.String("Raw"),
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        ScoreTtlDays: nil,
        OrderDirection: pointy.String("asc"),
        RankingRewards: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createClusterRankingModelMaster(
        (new CreateClusterRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("cluster-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withClusterType("Raw")
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withScoreTtlDays(null)
            ->withOrderDirection("asc")
            ->withRankingRewards(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.CreateClusterRankingModelMasterResult;

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

try {
    CreateClusterRankingModelMasterResult result = client.createClusterRankingModelMaster(
        new CreateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("cluster-0001")
            .withDescription(null)
            .withMetadata(null)
            .withClusterType("Raw")
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    ClusterRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateClusterRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.CreateClusterRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateClusterRankingModelMasterResult> asyncResult = null;
yield return client.CreateClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("cluster-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithClusterType("Raw")
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithScoreTtlDays(null)
        .WithOrderDirection("asc")
        .WithRankingRewards(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createClusterRankingModelMaster(
        new Gs2Ranking2.CreateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("cluster-0001")
            .withDescription(null)
            .withMetadata(null)
            .withClusterType("Raw")
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_cluster_ranking_model_master(
        ranking2.CreateClusterRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('cluster-0001')
            .with_description(None)
            .with_metadata(None)
            .with_cluster_type('Raw')
            .with_minimum_value(None)
            .with_maximum_value(None)
            .with_sum(None)
            .with_score_ttl_days(None)
            .with_order_direction('asc')
            .with_ranking_rewards(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_cluster_ranking_model_master({
    namespaceName="namespace1",
    name="cluster-0001",
    description=nil,
    metadata=nil,
    clusterType="Raw",
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    scoreTtlDays=nil,
    orderDirection="asc",
    rankingRewards=nil,
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

getClusterRankingModelMaster

Get Cluster Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelMasterCluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingModelMaster(
    &ranking2.GetClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("cluster-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingModelMaster(
        (new GetClusterRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("cluster-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.GetClusterRankingModelMasterResult;

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

try {
    GetClusterRankingModelMasterResult result = client.getClusterRankingModelMaster(
        new GetClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
    );
    ClusterRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingModelMasterResult> asyncResult = null;
yield return client.GetClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("cluster-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingModelMaster(
        new Gs2Ranking2.GetClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_model_master(
        ranking2.GetClusterRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('cluster-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_model_master({
    namespaceName="namespace1",
    rankingName="cluster-0001",
})

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

result = api_result.result
item = result.item;

updateClusterRankingModelMaster

Update Cluster Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
clusterTypeenum [
“Raw”,
“Gs2Guild::Guild”,
“Gs2Matchmaking::SeasonGathering”
]
~ 128 charsCluster Type
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
rankingRewardsList<RankingReward>{entryPeriodEventId} != null~ 100 itemsList of ranking rewards
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemClusterRankingModelMasterUpdated Cluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateClusterRankingModelMaster(
    &ranking2.UpdateClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("cluster-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("CATEGORY_0001"),
        ClusterType: pointy.String("Gs2Guild::Guild"),
        MinimumValue: pointy.Int64(100),
        MaximumValue: pointy.Int64(10000),
        Sum: nil,
        ScoreTtlDays: nil,
        OrderDirection: pointy.String("desc"),
        RankingRewards: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateClusterRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateClusterRankingModelMaster(
        (new UpdateClusterRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("cluster-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withClusterType("Gs2Guild::Guild")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withScoreTtlDays(null)
            ->withOrderDirection("desc")
            ->withRankingRewards(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.UpdateClusterRankingModelMasterResult;

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

try {
    UpdateClusterRankingModelMasterResult result = client.updateClusterRankingModelMaster(
        new UpdateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withClusterType("Gs2Guild::Guild")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    ClusterRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.UpdateClusterRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.UpdateClusterRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateClusterRankingModelMasterResult> asyncResult = null;
yield return client.UpdateClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("cluster-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithClusterType("Gs2Guild::Guild")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithScoreTtlDays(null)
        .WithOrderDirection("desc")
        .WithRankingRewards(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateClusterRankingModelMaster(
        new Gs2Ranking2.UpdateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withClusterType("Gs2Guild::Guild")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.update_cluster_ranking_model_master(
        ranking2.UpdateClusterRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('cluster-0001')
            .with_description('description1')
            .with_metadata('CATEGORY_0001')
            .with_cluster_type('Gs2Guild::Guild')
            .with_minimum_value(100)
            .with_maximum_value(10000)
            .with_sum(None)
            .with_score_ttl_days(None)
            .with_order_direction('desc')
            .with_ranking_rewards(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_cluster_ranking_model_master({
    namespaceName="namespace1",
    rankingName="cluster-0001",
    description="description1",
    metadata="CATEGORY_0001",
    clusterType="Gs2Guild::Guild",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    scoreTtlDays=nil,
    orderDirection="desc",
    rankingRewards=nil,
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

deleteClusterRankingModelMaster

Delete Cluster Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelMasterDeleted Cluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingModelMaster(
    &ranking2.DeleteClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("cluster-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteClusterRankingModelMaster(
        (new DeleteClusterRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("cluster-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.DeleteClusterRankingModelMasterResult;

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

try {
    DeleteClusterRankingModelMasterResult result = client.deleteClusterRankingModelMaster(
        new DeleteClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
    );
    ClusterRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteClusterRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.DeleteClusterRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteClusterRankingModelMasterResult> asyncResult = null;
yield return client.DeleteClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("cluster-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteClusterRankingModelMaster(
        new Gs2Ranking2.DeleteClusterRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("cluster-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_cluster_ranking_model_master(
        ranking2.DeleteClusterRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('cluster-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_cluster_ranking_model_master({
    namespaceName="namespace1",
    rankingName="cluster-0001",
})

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

result = api_result.result
item = result.item;

describeClusterRankingScores

Get list of Cluster Ranking Scores

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingScore>List of Cluster Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingScores(
    &ranking2.DescribeClusterRankingScoresRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingScoresRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingScores(
        (new DescribeClusterRankingScoresRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingScoresRequest;
import io.gs2.ranking2.result.DescribeClusterRankingScoresResult;

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

try {
    DescribeClusterRankingScoresResult result = client.describeClusterRankingScores(
        new DescribeClusterRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresResult> asyncResult = null;
yield return client.DescribeClusterRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingScores(
        new Gs2Ranking2.DescribeClusterRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_ranking_scores(
        ranking2.DescribeClusterRankingScoresRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .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('ranking2')

api_result = client.describe_cluster_ranking_scores({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    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;

describeClusterRankingScoresByUserId

Get list of Cluster Ranking Scores specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<ClusterRankingScore>List of Cluster Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingScoresByUserId(
    &ranking2.DescribeClusterRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingScoresByUserId(
        (new DescribeClusterRankingScoresByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingScoresByUserIdResult;

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

try {
    DescribeClusterRankingScoresByUserIdResult result = client.describeClusterRankingScoresByUserId(
        new DescribeClusterRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingScoresByUserId(
        new Gs2Ranking2.DescribeClusterRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_ranking_scores_by_user_id(
        ranking2.DescribeClusterRankingScoresByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name(None)
            .with_cluster_name('cluster-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_scores_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName=nil,
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

putClusterRankingScore

Register Cluster Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
accessTokenstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata

Result

TypeDescription
itemClusterRankingScoreRegistered Cluster Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutClusterRankingScore(
    &ranking2.PutClusterRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutClusterRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putClusterRankingScore(
        (new PutClusterRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withScore(100)
            ->withMetadata(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutClusterRankingScoreRequest;
import io.gs2.ranking2.result.PutClusterRankingScoreResult;

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

try {
    PutClusterRankingScoreResult result = client.putClusterRankingScore(
        new PutClusterRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    ClusterRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutClusterRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.PutClusterRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutClusterRankingScoreResult> asyncResult = null;
yield return client.PutClusterRankingScore(
    new Gs2.Gs2Ranking2.Request.PutClusterRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithAccessToken("accessToken-0001")
        .WithScore(100L)
        .WithMetadata(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putClusterRankingScore(
        new Gs2Ranking2.PutClusterRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100)
            .withMetadata(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_cluster_ranking_score(
        ranking2.PutClusterRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token(self.access_token_0001)
            .with_score(100)
            .with_metadata(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_cluster_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=nil,
})

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

result = api_result.result
item = result.item;

putClusterRankingScoreByUserId

Register Cluster Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingScoreRegistered Cluster Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutClusterRankingScoreByUserId(
    &ranking2.PutClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putClusterRankingScoreByUserId(
        (new PutClusterRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withScore(null)
            ->withMetadata(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutClusterRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.PutClusterRankingScoreByUserIdResult;

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

try {
    PutClusterRankingScoreByUserIdResult result = client.putClusterRankingScoreByUserId(
        new PutClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutClusterRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.PutClusterRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutClusterRankingScoreByUserIdResult> asyncResult = null;
yield return client.PutClusterRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.PutClusterRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithScore(null)
        .WithMetadata(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putClusterRankingScoreByUserId(
        new Gs2Ranking2.PutClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_cluster_ranking_score_by_user_id(
        ranking2.PutClusterRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_score(None)
            .with_metadata(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_cluster_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

getClusterRankingScore

Get Cluster Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingScore(
    &ranking2.GetClusterRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingScore(
        (new GetClusterRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingScoreRequest;
import io.gs2.ranking2.result.GetClusterRankingScoreResult;

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

try {
    GetClusterRankingScoreResult result = client.getClusterRankingScore(
        new GetClusterRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingScoreResult> asyncResult = null;
yield return client.GetClusterRankingScore(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingScore(
        new Gs2Ranking2.GetClusterRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_score(
        ranking2.GetClusterRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

getClusterRankingScoreByUserId

Get Cluster Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingScoreByUserId(
    &ranking2.GetClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingScoreByUserId(
        (new GetClusterRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.GetClusterRankingScoreByUserIdResult;

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

try {
    GetClusterRankingScoreByUserIdResult result = client.getClusterRankingScoreByUserId(
        new GetClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingScoreByUserIdResult> asyncResult = null;
yield return client.GetClusterRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingScoreByUserId(
        new Gs2Ranking2.GetClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_score_by_user_id(
        ranking2.GetClusterRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteClusterRankingScoreByUserId

Delete Cluster Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingScoreDeleted Cluster Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingScoreByUserId(
    &ranking2.DeleteClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteClusterRankingScoreByUserId(
        (new DeleteClusterRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteClusterRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.DeleteClusterRankingScoreByUserIdResult;

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

try {
    DeleteClusterRankingScoreByUserIdResult result = client.deleteClusterRankingScoreByUserId(
        new DeleteClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteClusterRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteClusterRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteClusterRankingScoreByUserIdResult> asyncResult = null;
yield return client.DeleteClusterRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteClusterRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteClusterRankingScoreByUserId(
        new Gs2Ranking2.DeleteClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_cluster_ranking_score_by_user_id(
        ranking2.DeleteClusterRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_cluster_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeClusterRankingReceivedRewards

Get list of Cluster Ranking Rewards Received

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingReceivedReward>List of Cluster Ranking Rewards Received
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingReceivedRewards(
    &ranking2.DescribeClusterRankingReceivedRewardsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingReceivedRewardsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingReceivedRewards(
        (new DescribeClusterRankingReceivedRewardsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingReceivedRewardsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingReceivedRewardsResult;

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

try {
    DescribeClusterRankingReceivedRewardsResult result = client.describeClusterRankingReceivedRewards(
        new DescribeClusterRankingReceivedRewardsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingReceivedReward> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsResult> asyncResult = null;
yield return client.DescribeClusterRankingReceivedRewards(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingReceivedRewards(
        new Gs2Ranking2.DescribeClusterRankingReceivedRewardsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_ranking_received_rewards(
        ranking2.DescribeClusterRankingReceivedRewardsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .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('ranking2')

api_result = client.describe_cluster_ranking_received_rewards({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    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;

describeClusterRankingReceivedRewardsByUserId

Get list of Cluster Ranking Rewards Received specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<ClusterRankingReceivedReward>List of Cluster Ranking Rewards Received
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingReceivedRewardsByUserId(
    &ranking2.DescribeClusterRankingReceivedRewardsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingReceivedRewardsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingReceivedRewardsByUserId(
        (new DescribeClusterRankingReceivedRewardsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingReceivedRewardsByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingReceivedRewardsByUserIdResult;

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

try {
    DescribeClusterRankingReceivedRewardsByUserIdResult result = client.describeClusterRankingReceivedRewardsByUserId(
        new DescribeClusterRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingReceivedReward> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingReceivedRewardsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingReceivedRewardsByUserId(
        new Gs2Ranking2.DescribeClusterRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_ranking_received_rewards_by_user_id(
        ranking2.DescribeClusterRankingReceivedRewardsByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_received_rewards_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

createClusterRankingReceivedReward

Create Cluster Ranking Reward Received History

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingReceivedReward(
    &ranking2.CreateClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createClusterRankingReceivedReward(
        (new CreateClusterRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.CreateClusterRankingReceivedRewardResult;

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

try {
    CreateClusterRankingReceivedRewardResult result = client.createClusterRankingReceivedReward(
        new CreateClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardResult> asyncResult = null;
yield return client.CreateClusterRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createClusterRankingReceivedReward(
        new Gs2Ranking2.CreateClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_cluster_ranking_received_reward(
        ranking2.CreateClusterRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_cluster_ranking_received_reward({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

createClusterRankingReceivedRewardByUserId

Get Cluster Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingReceivedRewardByUserId(
    &ranking2.CreateClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createClusterRankingReceivedRewardByUserId(
        (new CreateClusterRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.CreateClusterRankingReceivedRewardByUserIdResult;

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

try {
    CreateClusterRankingReceivedRewardByUserIdResult result = client.createClusterRankingReceivedRewardByUserId(
        new CreateClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.CreateClusterRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createClusterRankingReceivedRewardByUserId(
        new Gs2Ranking2.CreateClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_cluster_ranking_received_reward_by_user_id(
        ranking2.CreateClusterRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_cluster_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

receiveClusterRankingReceivedReward

Receive Cluster Ranking Reward

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
configList<Config>[]~ 32 itemsSet values to be applied to stamp sheet variables

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringTransaction ID of the stamp sheet issued
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is stamp sheet auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveClusterRankingReceivedReward(
    &ranking2.ReceiveClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receiveClusterRankingReceivedReward(
        (new ReceiveClusterRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.ReceiveClusterRankingReceivedRewardResult;

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

try {
    ReceiveClusterRankingReceivedRewardResult result = client.receiveClusterRankingReceivedReward(
        new ReceiveClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withConfig(null)
    );
    ClusterRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.ReceiveClusterRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.ReceiveClusterRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.ReceiveClusterRankingReceivedRewardResult> asyncResult = null;
yield return client.ReceiveClusterRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.ReceiveClusterRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var acquireActions = result.AcquireActions;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.receiveClusterRankingReceivedReward(
        new Gs2Ranking2.ReceiveClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withConfig(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_cluster_ranking_received_reward(
        ranking2.ReceiveClusterRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_config(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.receive_cluster_ranking_received_reward({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    config=nil,
})

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

receiveClusterRankingReceivedRewardByUserId

Receive Cluster Ranking Reward specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
configList<Config>[]~ 32 itemsSet values to be applied to stamp sheet variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringTransaction ID of the stamp sheet issued
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is stamp sheet auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveClusterRankingReceivedRewardByUserId(
    &ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receiveClusterRankingReceivedRewardByUserId(
        (new ReceiveClusterRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} 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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveClusterRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.ReceiveClusterRankingReceivedRewardByUserIdResult;

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

try {
    ReceiveClusterRankingReceivedRewardByUserIdResult result = client.receiveClusterRankingReceivedRewardByUserId(
        new ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.ReceiveClusterRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.ReceiveClusterRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.ReceiveClusterRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.ReceiveClusterRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.ReceiveClusterRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var acquireActions = result.AcquireActions;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.receiveClusterRankingReceivedRewardByUserId(
        new Gs2Ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_cluster_ranking_received_reward_by_user_id(
        ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.receive_cluster_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

getClusterRankingReceivedReward

Get Cluster Ranking Reward Received History

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingReceivedReward(
    &ranking2.GetClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingReceivedReward(
        (new GetClusterRankingReceivedRewardRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.GetClusterRankingReceivedRewardResult;

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

try {
    GetClusterRankingReceivedRewardResult result = client.getClusterRankingReceivedReward(
        new GetClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingReceivedRewardRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingReceivedRewardResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingReceivedRewardResult> asyncResult = null;
yield return client.GetClusterRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingReceivedRewardRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingReceivedReward(
        new Gs2Ranking2.GetClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_received_reward(
        ranking2.GetClusterRankingReceivedRewardRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_received_reward({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

getClusterRankingReceivedRewardByUserId

Get Cluster Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingReceivedRewardByUserId(
    &ranking2.GetClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingReceivedRewardByUserId(
        (new GetClusterRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.GetClusterRankingReceivedRewardByUserIdResult;

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

try {
    GetClusterRankingReceivedRewardByUserIdResult result = client.getClusterRankingReceivedRewardByUserId(
        new GetClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.GetClusterRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingReceivedRewardByUserId(
        new Gs2Ranking2.GetClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_received_reward_by_user_id(
        ranking2.GetClusterRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteClusterRankingReceivedRewardByUserId

Delete Cluster Ranking Reward Received History specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingReceivedRewardDeleted Cluster Ranking Reward Received History

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingReceivedRewardByUserId(
    &ranking2.DeleteClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteClusterRankingReceivedRewardByUserId(
        (new DeleteClusterRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteClusterRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.DeleteClusterRankingReceivedRewardByUserIdResult;

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

try {
    DeleteClusterRankingReceivedRewardByUserIdResult result = client.deleteClusterRankingReceivedRewardByUserId(
        new DeleteClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteClusterRankingReceivedRewardByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteClusterRankingReceivedRewardByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteClusterRankingReceivedRewardByUserIdResult> asyncResult = null;
yield return client.DeleteClusterRankingReceivedRewardByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteClusterRankingReceivedRewardByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteClusterRankingReceivedRewardByUserId(
        new Gs2Ranking2.DeleteClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_cluster_ranking_received_reward_by_user_id(
        ranking2.DeleteClusterRankingReceivedRewardByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_cluster_ranking_received_reward_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

createClusterRankingReceivedRewardByStampTask

Record Cluster Ranking Reward Received History using stamp task

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsConsume Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History
newContextStackstringRequest of context in which stamp task execution results are recorded

Implementation Example

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

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createClusterRankingReceivedRewardByStampTask(
        (new CreateClusterRankingReceivedRewardByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingReceivedRewardByStampTaskRequest;
import io.gs2.ranking2.result.CreateClusterRankingReceivedRewardByStampTaskResult;

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

try {
    CreateClusterRankingReceivedRewardByStampTaskResult result = client.createClusterRankingReceivedRewardByStampTask(
        new CreateClusterRankingReceivedRewardByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    ClusterRankingReceivedReward item = result.getItem();
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardByStampTaskRequest;
using Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardByStampTaskResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateClusterRankingReceivedRewardByStampTaskResult> asyncResult = null;
yield return client.CreateClusterRankingReceivedRewardByStampTask(
    new Gs2.Gs2Ranking2.Request.CreateClusterRankingReceivedRewardByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var newContextStack = result.NewContextStack;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createClusterRankingReceivedRewardByStampTask(
        new Gs2Ranking2.CreateClusterRankingReceivedRewardByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const newContextStack = result.getNewContextStack();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_cluster_ranking_received_reward_by_stamp_task(
        ranking2.CreateClusterRankingReceivedRewardByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_cluster_ranking_received_reward_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

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

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

describeClusterRankings

Get list of Cluster Rankings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingData>List of Cluster Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankings(
    &ranking2.DescribeClusterRankingsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankings(
        (new DescribeClusterRankingsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingsResult;

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

try {
    DescribeClusterRankingsResult result = client.describeClusterRankings(
        new DescribeClusterRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingsRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingsResult> asyncResult = null;
yield return client.DescribeClusterRankings(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingsRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankings(
        new Gs2Ranking2.DescribeClusterRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_rankings(
        ranking2.DescribeClusterRankingsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(None)
            .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('ranking2')

api_result = client.describe_cluster_rankings({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    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;

describeClusterRankingsByUserId

Get list of Cluster Rankings by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<ClusterRankingData>List of Cluster Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingsByUserId(
    &ranking2.DescribeClusterRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeClusterRankingsByUserId(
        (new DescribeClusterRankingsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingsByUserIdResult;

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

try {
    DescribeClusterRankingsByUserIdResult result = client.describeClusterRankingsByUserId(
        new DescribeClusterRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeClusterRankingsByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeClusterRankingsByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeClusterRankingsByUserId(
        new Gs2Ranking2.DescribeClusterRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_cluster_rankings_by_user_id(
        ranking2.DescribeClusterRankingsByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_rankings_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

getClusterRanking

Get Cluster Ranking

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingDataCluster Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRanking(
    &ranking2.GetClusterRankingRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRanking(
        (new GetClusterRankingRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingRequest;
import io.gs2.ranking2.result.GetClusterRankingResult;

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

try {
    GetClusterRankingResult result = client.getClusterRanking(
        new GetClusterRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    ClusterRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingResult> asyncResult = null;
yield return client.GetClusterRanking(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRanking(
        new Gs2Ranking2.GetClusterRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking(
        ranking2.GetClusterRankingRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token(self.access_token_0001)
            .with_season(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=nil,
})

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

result = api_result.result
item = result.item;

getClusterRankingByUserId

Get Cluster Ranking by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingDataCluster Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingByUserId(
    &ranking2.GetClusterRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getClusterRankingByUserId(
        (new GetClusterRankingByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingByUserIdRequest;
import io.gs2.ranking2.result.GetClusterRankingByUserIdResult;

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

try {
    GetClusterRankingByUserIdResult result = client.getClusterRankingByUserId(
        new GetClusterRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetClusterRankingByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetClusterRankingByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingByUserIdResult> asyncResult = null;
yield return client.GetClusterRankingByUserId(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getClusterRankingByUserId(
        new Gs2Ranking2.GetClusterRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_cluster_ranking_by_user_id(
        ranking2.GetClusterRankingByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeSubscribeRankingModels

Get list of Subscribe Ranking Models

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemsList<SubscribeRankingModel>List of Subscribe Ranking Models

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingModels(
    &ranking2.DescribeSubscribeRankingModelsRequest {
        NamespaceName: nil,
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingModelsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingModels(
        (new DescribeSubscribeRankingModelsRequest())
            ->withNamespaceName(null)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingModelsRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingModelsResult;

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

try {
    DescribeSubscribeRankingModelsResult result = client.describeSubscribeRankingModels(
        new DescribeSubscribeRankingModelsRequest()
            .withNamespaceName(null)
    );
    List<SubscribeRankingModel> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelsRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelsResult> asyncResult = null;
yield return client.DescribeSubscribeRankingModels(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelsRequest()
        .WithNamespaceName(null),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankingModels(
        new Gs2Ranking2.DescribeSubscribeRankingModelsRequest()
            .withNamespaceName(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_subscribe_ranking_models(
        ranking2.DescribeSubscribeRankingModelsRequest()
            .with_namespace_name(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_ranking_models({
    namespaceName=nil,
})

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

result = api_result.result
items = result.items;

getSubscribeRankingModel

Get Subscribe Ranking Model

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelSubscribe Ranking Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingModel(
    &ranking2.GetSubscribeRankingModelRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingModelRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingModel(
        (new GetSubscribeRankingModelRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingModelRequest;
import io.gs2.ranking2.result.GetSubscribeRankingModelResult;

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

try {
    GetSubscribeRankingModelResult result = client.getSubscribeRankingModel(
        new GetSubscribeRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    SubscribeRankingModel 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelResult> asyncResult = null;
yield return client.GetSubscribeRankingModel(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRankingModel(
        new Gs2Ranking2.GetSubscribeRankingModelRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking_model(
        ranking2.GetSubscribeRankingModelRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_model({
    namespaceName="namespace1",
    rankingName="ranking-0001",
})

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

result = api_result.result
item = result.item;

describeSubscribeRankingModelMasters

Get list of Subscribe Ranking Model Masters

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingModelMaster>List of Subscribe Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingModelMasters(
    &ranking2.DescribeSubscribeRankingModelMastersRequest {
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingModelMastersRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingModelMasters(
        (new DescribeSubscribeRankingModelMastersRequest())
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingModelMastersRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingModelMastersResult;

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

try {
    DescribeSubscribeRankingModelMastersResult result = client.describeSubscribeRankingModelMasters(
        new DescribeSubscribeRankingModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingModelMaster> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelMastersRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelMastersResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelMastersResult> asyncResult = null;
yield return client.DescribeSubscribeRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelMastersRequest()
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankingModelMasters(
        new Gs2Ranking2.DescribeSubscribeRankingModelMastersRequest()
            .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 ranking2

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

try:
    result = client.describe_subscribe_ranking_model_masters(
        ranking2.DescribeSubscribeRankingModelMastersRequest()
            .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('ranking2')

api_result = client.describe_subscribe_ranking_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;

createSubscribeRankingModelMaster

Create Subscribe Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
namestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemSubscribeRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateSubscribeRankingModelMaster(
    &ranking2.CreateSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("subscribe-0001"),
        Description: nil,
        Metadata: nil,
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        ScoreTtlDays: nil,
        OrderDirection: pointy.String("asc"),
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateSubscribeRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createSubscribeRankingModelMaster(
        (new CreateSubscribeRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("subscribe-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withScoreTtlDays(null)
            ->withOrderDirection("asc")
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.CreateSubscribeRankingModelMasterResult;

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

try {
    CreateSubscribeRankingModelMasterResult result = client.createSubscribeRankingModelMaster(
        new CreateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("subscribe-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("asc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    SubscribeRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.CreateSubscribeRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.CreateSubscribeRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.CreateSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.CreateSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("subscribe-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithScoreTtlDays(null)
        .WithOrderDirection("asc")
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.createSubscribeRankingModelMaster(
        new Gs2Ranking2.CreateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("subscribe-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("asc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.create_subscribe_ranking_model_master(
        ranking2.CreateSubscribeRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('subscribe-0001')
            .with_description(None)
            .with_metadata(None)
            .with_minimum_value(None)
            .with_maximum_value(None)
            .with_sum(None)
            .with_score_ttl_days(None)
            .with_order_direction('asc')
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_subscribe_ranking_model_master({
    namespaceName="namespace1",
    name="subscribe-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    scoreTtlDays=nil,
    orderDirection="asc",
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

getSubscribeRankingModelMaster

Get Subscribe Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelMasterSubscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingModelMaster(
    &ranking2.GetSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("subscribe-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingModelMaster(
        (new GetSubscribeRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("subscribe-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.GetSubscribeRankingModelMasterResult;

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

try {
    GetSubscribeRankingModelMasterResult result = client.getSubscribeRankingModelMaster(
        new GetSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
    );
    SubscribeRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.GetSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("subscribe-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRankingModelMaster(
        new Gs2Ranking2.GetSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking_model_master(
        ranking2.GetSubscribeRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('subscribe-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_model_master({
    namespaceName="namespace1",
    rankingName="subscribe-0001",
})

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

result = api_result.result
item = result.item;

updateSubscribeRankingModelMaster

Update Subscribe Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsmetadata
minimumValuelong~ 9223372036854775805Minimum Score
maximumValuelong~ 9223372036854775805Maximum Score
sumboolfalseAdd up the scores of put and compete for the total value.
scoreTtlDaysint301 ~ 365Validity period of registered scores (days)
orderDirectionenum [
“asc”,
“desc”
]
~ 128 charsSort direction of scores
entryPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsGS2-Schedule Event GRN

Result

TypeDescription
itemSubscribeRankingModelMasterUpdated Subscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateSubscribeRankingModelMaster(
    &ranking2.UpdateSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("subscribe-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("CATEGORY_0001"),
        MinimumValue: pointy.Int64(100),
        MaximumValue: pointy.Int64(10000),
        Sum: nil,
        ScoreTtlDays: nil,
        OrderDirection: pointy.String("desc"),
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateSubscribeRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateSubscribeRankingModelMaster(
        (new UpdateSubscribeRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("subscribe-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withScoreTtlDays(null)
            ->withOrderDirection("desc")
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.UpdateSubscribeRankingModelMasterResult;

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

try {
    UpdateSubscribeRankingModelMasterResult result = client.updateSubscribeRankingModelMaster(
        new UpdateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("desc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    SubscribeRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.UpdateSubscribeRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.UpdateSubscribeRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.UpdateSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("subscribe-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithScoreTtlDays(null)
        .WithOrderDirection("desc")
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateSubscribeRankingModelMaster(
        new Gs2Ranking2.UpdateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withScoreTtlDays(null)
            .withOrderDirection("desc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.update_subscribe_ranking_model_master(
        ranking2.UpdateSubscribeRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('subscribe-0001')
            .with_description('description1')
            .with_metadata('CATEGORY_0001')
            .with_minimum_value(100)
            .with_maximum_value(10000)
            .with_sum(None)
            .with_score_ttl_days(None)
            .with_order_direction('desc')
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_subscribe_ranking_model_master({
    namespaceName="namespace1",
    rankingName="subscribe-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    scoreTtlDays=nil,
    orderDirection="desc",
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

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

result = api_result.result
item = result.item;

deleteSubscribeRankingModelMaster

Delete Subscribe Ranking Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelMasterDeleted Subscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeRankingModelMaster(
    &ranking2.DeleteSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("subscribe-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRankingModelMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteSubscribeRankingModelMaster(
        (new DeleteSubscribeRankingModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("subscribe-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.DeleteSubscribeRankingModelMasterResult;

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

try {
    DeleteSubscribeRankingModelMasterResult result = client.deleteSubscribeRankingModelMaster(
        new DeleteSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
    );
    SubscribeRankingModelMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteSubscribeRankingModelMasterRequest;
using Gs2.Gs2Ranking2.Result.DeleteSubscribeRankingModelMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.DeleteSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("subscribe-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteSubscribeRankingModelMaster(
        new Gs2Ranking2.DeleteSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace1")
            .withRankingName("subscribe-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_subscribe_ranking_model_master(
        ranking2.DeleteSubscribeRankingModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('subscribe-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe_ranking_model_master({
    namespaceName="namespace1",
    rankingName="subscribe-0001",
})

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

result = api_result.result
item = result.item;

describeSubscribes

Get list of Subscribe Target User IDs

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeUser>List of Subscribe Target User IDs
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribes(
    &ranking2.DescribeSubscribesRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribesRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribes(
        (new DescribeSubscribesRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribesRequest;
import io.gs2.ranking2.result.DescribeSubscribesResult;

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

try {
    DescribeSubscribesResult result = client.describeSubscribes(
        new DescribeSubscribesRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeUser> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribesRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribesResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribesResult> asyncResult = null;
yield return client.DescribeSubscribes(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribesRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribes(
        new Gs2Ranking2.DescribeSubscribesRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-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 ranking2

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

try:
    result = client.describe_subscribes(
        ranking2.DescribeSubscribesRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-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('ranking2')

api_result = client.describe_subscribes({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-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;

describeSubscribesByUserId

Get list of Subscribe Target User IDs specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<SubscribeUser>List of Subscribe Target User IDs
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribesByUserId(
    &ranking2.DescribeSubscribesByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribesByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribesByUserId(
        (new DescribeSubscribesByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribesByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribesByUserIdResult;

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

try {
    DescribeSubscribesByUserIdResult result = client.describeSubscribesByUserId(
        new DescribeSubscribesByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeUser> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribesByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribesByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribesByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribesByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribesByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribesByUserId(
        new Gs2Ranking2.DescribeSubscribesByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_subscribes_by_user_id(
        ranking2.DescribeSubscribesByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribes_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

addSubscribe

Register Subscribe Target User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserRegistered Subscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.AddSubscribe(
    &ranking2.AddSubscribeRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\AddSubscribeRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addSubscribe(
        (new AddSubscribeRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.AddSubscribeRequest;
import io.gs2.ranking2.result.AddSubscribeResult;

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

try {
    AddSubscribeResult result = client.addSubscribe(
        new AddSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.AddSubscribeRequest;
using Gs2.Gs2Ranking2.Result.AddSubscribeResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.AddSubscribeResult> asyncResult = null;
yield return client.AddSubscribe(
    new Gs2.Gs2Ranking2.Request.AddSubscribeRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithTargetUserId("user-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.addSubscribe(
        new Gs2Ranking2.AddSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.add_subscribe(
        ranking2.AddSubscribeRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.add_subscribe({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;

addSubscribeByUserId

Register Subscribe Target User ID specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserRegistered Subscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.AddSubscribeByUserId(
    &ranking2.AddSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\AddSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->addSubscribeByUserId(
        (new AddSubscribeByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.AddSubscribeByUserIdRequest;
import io.gs2.ranking2.result.AddSubscribeByUserIdResult;

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

try {
    AddSubscribeByUserIdResult result = client.addSubscribeByUserId(
        new AddSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.AddSubscribeByUserIdRequest;
using Gs2.Gs2Ranking2.Result.AddSubscribeByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.AddSubscribeByUserIdResult> asyncResult = null;
yield return client.AddSubscribeByUserId(
    new Gs2.Gs2Ranking2.Request.AddSubscribeByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithTargetUserId("user-0002")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.addSubscribeByUserId(
        new Gs2Ranking2.AddSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.add_subscribe_by_user_id(
        ranking2.AddSubscribeByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.add_subscribe_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeSubscribeRankingScores

Get list of Subscribe Ranking Scores

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingScore>List of Subscribe Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingScores(
    &ranking2.DescribeSubscribeRankingScoresRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingScoresRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingScores(
        (new DescribeSubscribeRankingScoresRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingScoresRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingScoresResult;

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

try {
    DescribeSubscribeRankingScoresResult result = client.describeSubscribeRankingScores(
        new DescribeSubscribeRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresResult> asyncResult = null;
yield return client.DescribeSubscribeRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankingScores(
        new Gs2Ranking2.DescribeSubscribeRankingScoresRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-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 ranking2

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

try:
    result = client.describe_subscribe_ranking_scores(
        ranking2.DescribeSubscribeRankingScoresRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-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('ranking2')

api_result = client.describe_subscribe_ranking_scores({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-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;

describeSubscribeRankingScoresByUserId

Get list of Subscribe Ranking Scores specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<SubscribeRankingScore>List of Subscribe Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingScoresByUserId(
    &ranking2.DescribeSubscribeRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingScoresByUserId(
        (new DescribeSubscribeRankingScoresByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingScoresByUserIdResult;

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

try {
    DescribeSubscribeRankingScoresByUserIdResult result = client.describeSubscribeRankingScoresByUserId(
        new DescribeSubscribeRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeRankingScore> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribeRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankingScoresByUserId(
        new Gs2Ranking2.DescribeSubscribeRankingScoresByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_subscribe_ranking_scores_by_user_id(
        ranking2.DescribeSubscribeRankingScoresByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_ranking_scores_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

putSubscribeRankingScore

Register Subscribe Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata

Result

TypeDescription
itemSubscribeRankingScoreRegistered Subscribe Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutSubscribeRankingScore(
    &ranking2.PutSubscribeRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutSubscribeRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putSubscribeRankingScore(
        (new PutSubscribeRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withScore(100)
            ->withMetadata(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutSubscribeRankingScoreRequest;
import io.gs2.ranking2.result.PutSubscribeRankingScoreResult;

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

try {
    PutSubscribeRankingScoreResult result = client.putSubscribeRankingScore(
        new PutSubscribeRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    SubscribeRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutSubscribeRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.PutSubscribeRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutSubscribeRankingScoreResult> asyncResult = null;
yield return client.PutSubscribeRankingScore(
    new Gs2.Gs2Ranking2.Request.PutSubscribeRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithScore(100L)
        .WithMetadata(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putSubscribeRankingScore(
        new Gs2Ranking2.PutSubscribeRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100)
            .withMetadata(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_subscribe_ranking_score(
        ranking2.PutSubscribeRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_score(100)
            .with_metadata(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_subscribe_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=nil,
})

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

result = api_result.result
item = result.item;

putSubscribeRankingScoreByUserId

Register Subscribe Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
scorelong~ 9223372036854775805Score
metadatastring~ 512 charsmetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreRegistered Subscribe Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutSubscribeRankingScoreByUserId(
    &ranking2.PutSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->putSubscribeRankingScoreByUserId(
        (new PutSubscribeRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withScore(null)
            ->withMetadata(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutSubscribeRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.PutSubscribeRankingScoreByUserIdResult;

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

try {
    PutSubscribeRankingScoreByUserIdResult result = client.putSubscribeRankingScoreByUserId(
        new PutSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.PutSubscribeRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.PutSubscribeRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.PutSubscribeRankingScoreByUserIdResult> asyncResult = null;
yield return client.PutSubscribeRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.PutSubscribeRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithScore(null)
        .WithMetadata(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.putSubscribeRankingScoreByUserId(
        new Gs2Ranking2.PutSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.put_subscribe_ranking_score_by_user_id(
        ranking2.PutSubscribeRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_score(None)
            .with_metadata(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.put_subscribe_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

getSubscribeRankingScore

Get Subscribe Ranking Score

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingScore(
    &ranking2.GetSubscribeRankingScoreRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingScoreRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingScore(
        (new GetSubscribeRankingScoreRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(0)
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingScoreRequest;
import io.gs2.ranking2.result.GetSubscribeRankingScoreResult;

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

try {
    GetSubscribeRankingScoreResult result = client.getSubscribeRankingScore(
        new GetSubscribeRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    SubscribeRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingScoreRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingScoreResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingScoreResult> asyncResult = null;
yield return client.GetSubscribeRankingScore(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingScoreRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(0L),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRankingScore(
        new Gs2Ranking2.GetSubscribeRankingScoreRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking_score(
        ranking2.GetSubscribeRankingScoreRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_score({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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

result = api_result.result
item = result.item;

getSubscribeRankingScoreByUserId

Get Subscribe Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingScoreByUserId(
    &ranking2.GetSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingScoreByUserId(
        (new GetSubscribeRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.GetSubscribeRankingScoreByUserIdResult;

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

try {
    GetSubscribeRankingScoreByUserIdResult result = client.getSubscribeRankingScoreByUserId(
        new GetSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingScoreByUserIdResult> asyncResult = null;
yield return client.GetSubscribeRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRankingScoreByUserId(
        new Gs2Ranking2.GetSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking_score_by_user_id(
        ranking2.GetSubscribeRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteSubscribeRankingScoreByUserId

Delete Subscribe Ranking Score specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreDeleted Subscribe Ranking Score

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeRankingScoreByUserId(
    &ranking2.DeleteSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteSubscribeRankingScoreByUserId(
        (new DeleteSubscribeRankingScoreByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.DeleteSubscribeRankingScoreByUserIdResult;

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

try {
    DeleteSubscribeRankingScoreByUserIdResult result = client.deleteSubscribeRankingScoreByUserId(
        new DeleteSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteSubscribeRankingScoreByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteSubscribeRankingScoreByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteSubscribeRankingScoreByUserIdResult> asyncResult = null;
yield return client.DeleteSubscribeRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteSubscribeRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(0L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteSubscribeRankingScoreByUserId(
        new Gs2Ranking2.DeleteSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_subscribe_ranking_score_by_user_id(
        ranking2.DeleteSubscribeRankingScoreByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(0)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe_ranking_score_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

describeSubscribeRankings

Get list of Subscribe Rankings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingData>List of Subscribe Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankings(
    &ranking2.DescribeSubscribeRankingsRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingsRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankings(
        (new DescribeSubscribeRankingsRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingsRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingsResult;

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

try {
    DescribeSubscribeRankingsResult result = client.describeSubscribeRankings(
        new DescribeSubscribeRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsResult> asyncResult = null;
yield return client.DescribeSubscribeRankings(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankings(
        new Gs2Ranking2.DescribeSubscribeRankingsRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_subscribe_rankings(
        ranking2.DescribeSubscribeRankingsRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .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('ranking2')

api_result = client.describe_subscribe_rankings({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    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;

describeSubscribeRankingsByUserId

Get list of Subscribe Rankings by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
rankingNamestring~ 128 charsRanking Name
seasonlong~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<SubscribeRankingData>List of Subscribe Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingsByUserId(
    &ranking2.DescribeSubscribeRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: 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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingsByUserId(
        (new DescribeSubscribeRankingsByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingsByUserIdResult;

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

try {
    DescribeSubscribeRankingsByUserIdResult result = client.describeSubscribeRankingsByUserId(
        new DescribeSubscribeRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeRankingData> 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribeRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.describeSubscribeRankingsByUserId(
        new Gs2Ranking2.DescribeSubscribeRankingsByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.describe_subscribe_rankings_by_user_id(
        ranking2.DescribeSubscribeRankingsByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_rankings_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=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;

getSubscribeRanking

Get Subscribe Ranking

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
scorerUserIdstring~ 128 charsScorer User ID

Result

TypeDescription
itemSubscribeRankingDataSubscribe Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRanking(
    &ranking2.GetSubscribeRankingRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
        ScorerUserId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRanking(
        (new GetSubscribeRankingRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withSeason(null)
            ->withScorerUserId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingRequest;
import io.gs2.ranking2.result.GetSubscribeRankingResult;

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

try {
    GetSubscribeRankingResult result = client.getSubscribeRanking(
        new GetSubscribeRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
            .withScorerUserId(null)
    );
    SubscribeRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingResult> asyncResult = null;
yield return client.GetSubscribeRanking(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithSeason(null)
        .WithScorerUserId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRanking(
        new Gs2Ranking2.GetSubscribeRankingRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
            .withScorerUserId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking(
        ranking2.GetSubscribeRankingRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_season(None)
            .with_scorer_user_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=nil,
    scorerUserId=nil,
})

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

result = api_result.result
item = result.item;

getSubscribeRankingByUserId

Get Subscribe Ranking by specifying the user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
seasonlong~ 9223372036854775805Season
scorerUserIdstring~ 128 charsScorer User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingDataSubscribe Ranking

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingByUserId(
    &ranking2.GetSubscribeRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        ScorerUserId: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingByUserId(
        (new GetSubscribeRankingByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withSeason(null)
            ->withScorerUserId(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingByUserIdRequest;
import io.gs2.ranking2.result.GetSubscribeRankingByUserIdResult;

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

try {
    GetSubscribeRankingByUserIdResult result = client.getSubscribeRankingByUserId(
        new GetSubscribeRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withScorerUserId(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingData 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRankingByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeRankingByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingByUserIdResult> asyncResult = null;
yield return client.GetSubscribeRankingByUserId(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithSeason(null)
        .WithScorerUserId(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeRankingByUserId(
        new Gs2Ranking2.GetSubscribeRankingByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withScorerUserId(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_ranking_by_user_id(
        ranking2.GetSubscribeRankingByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_scorer_user_id(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    scorerUserId=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

exportMaster

Export master data for currently available ranking settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentRankingMasterCurrently available ranking settings

Implementation Example

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

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

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

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

AsyncResult<Gs2.Gs2Ranking2.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Ranking2.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 Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

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;

getCurrentRankingMaster

Get the currently available ranking settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentRankingMasterCurrently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetCurrentRankingMaster(
    &ranking2.GetCurrentRankingMasterRequest {
        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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetCurrentRankingMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentRankingMaster(
        (new GetCurrentRankingMasterRequest())
            ->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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetCurrentRankingMasterRequest;
import io.gs2.ranking2.result.GetCurrentRankingMasterResult;

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

try {
    GetCurrentRankingMasterResult result = client.getCurrentRankingMaster(
        new GetCurrentRankingMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentRankingMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetCurrentRankingMasterRequest;
using Gs2.Gs2Ranking2.Result.GetCurrentRankingMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetCurrentRankingMasterResult> asyncResult = null;
yield return client.GetCurrentRankingMaster(
    new Gs2.Gs2Ranking2.Request.GetCurrentRankingMasterRequest()
        .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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getCurrentRankingMaster(
        new Gs2Ranking2.GetCurrentRankingMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_current_ranking_master(
        ranking2.GetCurrentRankingMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_current_ranking_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;

updateCurrentRankingMaster

Update and currently available ranking settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
settingsstring~ 5242880 charsMaster data

Result

TypeDescription
itemCurrentRankingMasterUpdated and currently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRankingMaster(
    &ranking2.UpdateCurrentRankingMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}"),
    }
)
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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateCurrentRankingMasterRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentRankingMaster(
        (new UpdateCurrentRankingMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
    );
    $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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateCurrentRankingMasterRequest;
import io.gs2.ranking2.result.UpdateCurrentRankingMasterResult;

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

try {
    UpdateCurrentRankingMasterResult result = client.updateCurrentRankingMaster(
        new UpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
    );
    CurrentRankingMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterRequest;
using Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterResult> asyncResult = null;
yield return client.UpdateCurrentRankingMaster(
    new Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterRequest()
        .WithNamespaceName("namespace1")
        .WithSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}"),
    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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateCurrentRankingMaster(
        new Gs2Ranking2.UpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.update_current_ranking_master(
        ranking2.UpdateCurrentRankingMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{"version": "2024-05-30", "globalRankingModels": [{"name": "ranking-0001", "orderDirection": "asc"}, {"name": "ranking-0002", "orderDirection": "desc"}], "clusterRankingModels": [{"name": "ranking-0001", "clusterType": "Raw", "orderDirection": "asc"}, {"name": "ranking-0002", "clusterType": "Gs2Guild::Guild", "orderDirection": "desc"}], "subscribeRankingModels": [{"name": "ranking-0001", "orderDirection": "asc"}, {"name": "ranking-0002", "orderDirection": "desc"}]}')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_current_ranking_master({
    namespaceName="namespace1",
    settings="{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}",
})

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

result = api_result.result
item = result.item;

updateCurrentRankingMasterFromGitHub

Update and currently available ranking settings

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
checkoutSettingGitHubCheckoutSettingSetup to check out master data from GitHub

Result

TypeDescription
itemCurrentRankingMasterUpdated and currently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRankingMasterFromGitHub(
    &ranking2.UpdateCurrentRankingMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace1"),
        CheckoutSetting: &ranking2.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("$gitHubApiKey1.apiKeyId"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("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\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateCurrentRankingMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentRankingMasterFromGitHub(
        (new UpdateCurrentRankingMasterFromGitHubRequest())
            ->withNamespaceName(self::namespace1)
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId(self::$gitHubApiKey1.apiKeyId)
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("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.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateCurrentRankingMasterFromGitHubRequest;
import io.gs2.ranking2.result.UpdateCurrentRankingMasterFromGitHubResult;

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

try {
    UpdateCurrentRankingMasterFromGitHubResult result = client.updateCurrentRankingMasterFromGitHub(
        new UpdateCurrentRankingMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentRankingMaster 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterFromGitHubRequest;
using Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterFromGitHubResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentRankingMasterFromGitHub(
    new Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterFromGitHubRequest()
        .WithNamespaceName("namespace1")
        .WithCheckoutSetting(new Gs2.Gs2Ranking2.Model.GitHubCheckoutSetting()
            .WithApiKeyId("$gitHubApiKey1.apiKeyId")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("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 Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.updateCurrentRankingMasterFromGitHub(
        new Gs2Ranking2.UpdateCurrentRankingMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting(new Gs2Ranking2.model.GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.update_current_ranking_master_from_git_hub(
        ranking2.UpdateCurrentRankingMasterFromGitHubRequest()
            .with_namespace_name(self.hash1)
            .with_checkout_setting(ranking2.GitHubCheckoutSetting()
                .with_api_key_id(self.git_hub_api_key1.api_key_id)
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_current_ranking_master_from_git_hub({
    namespaceName="namespace1",
    checkoutSetting={
        api_key_id="$gitHubApiKey1.apiKeyId",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

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

result = api_result.result
item = result.item;

getSubscribe

Get Subscribe Target User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserSubscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribe(
    &ranking2.GetSubscribeRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribe(
        (new GetSubscribeRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRequest;
import io.gs2.ranking2.result.GetSubscribeResult;

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

try {
    GetSubscribeResult result = client.getSubscribe(
        new GetSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeResult> asyncResult = null;
yield return client.GetSubscribe(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithTargetUserId("user-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribe(
        new Gs2Ranking2.GetSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe(
        ranking2.GetSubscribeRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;

getSubscribeByUserId

Get Subscribe Target User ID specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserSubscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeByUserId(
    &ranking2.GetSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getSubscribeByUserId(
        (new GetSubscribeByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeByUserIdRequest;
import io.gs2.ranking2.result.GetSubscribeByUserIdResult;

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

try {
    GetSubscribeByUserIdResult result = client.getSubscribeByUserId(
        new GetSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.GetSubscribeByUserIdRequest;
using Gs2.Gs2Ranking2.Result.GetSubscribeByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeByUserIdResult> asyncResult = null;
yield return client.GetSubscribeByUserId(
    new Gs2.Gs2Ranking2.Request.GetSubscribeByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithTargetUserId("user-0002")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.getSubscribeByUserId(
        new Gs2Ranking2.GetSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe_by_user_id(
        ranking2.GetSubscribeByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

deleteSubscribe

Delete Subscribe Target User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserDeleted Subscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribe(
    &ranking2.DeleteSubscribeRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteSubscribe(
        (new DeleteSubscribeRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeRequest;
import io.gs2.ranking2.result.DeleteSubscribeResult;

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

try {
    DeleteSubscribeResult result = client.deleteSubscribe(
        new DeleteSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteSubscribeRequest;
using Gs2.Gs2Ranking2.Result.DeleteSubscribeResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteSubscribeResult> asyncResult = null;
yield return client.DeleteSubscribe(
    new Gs2.Gs2Ranking2.Request.DeleteSubscribeRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithAccessToken("accessToken-0001")
        .WithTargetUserId("user-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteSubscribe(
        new Gs2Ranking2.DeleteSubscribeRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_subscribe(
        ranking2.DeleteSubscribeRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_access_token(self.access_token_0001)
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;

deleteSubscribeByUserId

Delete Subscribe Target User ID specifying User ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
rankingNamestring~ 128 charsRanking Name
userIdstring~ 128 charsUser Id
targetUserIdstring~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserDeleted Subscribe Target User ID

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
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 := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeByUserId(
    &ranking2.DeleteSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteSubscribeByUserId(
        (new DeleteSubscribeByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeByUserIdRequest;
import io.gs2.ranking2.result.DeleteSubscribeByUserIdResult;

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

try {
    DeleteSubscribeByUserIdResult result = client.deleteSubscribeByUserId(
        new DeleteSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser 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.Gs2Ranking2.Gs2Ranking2RestClient;
using Gs2.Gs2Ranking2.Request.DeleteSubscribeByUserIdRequest;
using Gs2.Gs2Ranking2.Result.DeleteSubscribeByUserIdResult;

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

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteSubscribeByUserIdResult> asyncResult = null;
yield return client.DeleteSubscribeByUserId(
    new Gs2.Gs2Ranking2.Request.DeleteSubscribeByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithRankingName("ranking-0001")
        .WithUserId("user-0001")
        .WithTargetUserId("user-0002")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.deleteSubscribeByUserId(
        new Gs2Ranking2.DeleteSubscribeByUserIdRequest()
            .withNamespaceName("namespace1")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_subscribe_by_user_id(
        ranking2.DeleteSubscribeByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe_by_user_id({
    namespaceName="namespace1",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;