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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceId | string | ✓ | ~ 1024 chars | Namespace GRN | ||
name | string | ✓ | ~ 128 chars | Namespace name | ||
description | string | ~ 1024 chars | Description | |||
transactionSetting | TransactionSetting | ✓ | Transaction settings | |||
logSetting | LogSetting | Log output settings | ||||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
GlobalRankingModel
Global Ranking Model
The global ranking is a model 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
globalRankingModelId | string | ✓ | ~ 1024 chars | Global Ranking GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
GlobalRankingModelMaster
Global Ranking Model
The global ranking is a model 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
globalRankingModelId | string | ✓ | ~ 1024 chars | Global Ranking Master GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
description | string | ~ 1024 chars | Description | |||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
GlobalRankingScore
Global Ranking Score
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
globalRankingScoreId | string | ✓ | ~ 1024 chars | Global Ranking Score GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
GlobalRankingReceivedReward
Global Ranking Reward Received History
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
globalRankingReceivedRewardId | string | ✓ | ~ 1024 chars | Global Ranking Received Reward GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
receivedAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
GlobalRankingData
Global Ranking
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
globalRankingDataId | string | ✓ | ~ 1024 chars | Global Ranking GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
index | int | ~ 2147483646 | Index of Ranking | |||
rank | int | ~ 2147483646 | Rank of Ranking | |||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
ClusterRankingModel
Cluster Ranking Model
The cluster ranking mode is a model 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
clusterRankingModelId | string | ✓ | ~ 1024 chars | Cluster Ranking GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
metadata | string | ~ 1024 chars | metadata | |||
clusterType | enum { “Raw”, “Gs2Guild::Guild”, “Gs2Matchmaking::SeasonGathering” } | ✓ | ~ 128 chars | Cluster Type | ||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as clusterType
Enumerator String Definition | Description |
---|---|
Raw | No verification |
Gs2Guild::Guild | GS2-Guild Guild |
Gs2Matchmaking::SeasonGathering | GS2-Matchmaking Season Gathering |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
ClusterRankingModelMaster
Cluster Ranking Model
The cluster ranking mode is a model 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
clusterRankingModelId | string | ✓ | ~ 1024 chars | Cluster Ranking Master GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
description | string | ~ 1024 chars | Description | |||
metadata | string | ~ 1024 chars | metadata | |||
clusterType | enum { “Raw”, “Gs2Guild::Guild”, “Gs2Matchmaking::SeasonGathering” } | ✓ | ~ 128 chars | Cluster Type | ||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
scoreTtlDays | int | ✓ | 30 | 1 ~ 365 | Validity period of registered scores (days) | |
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
Enumeration type definition to specify as clusterType
Enumerator String Definition | Description |
---|---|
Raw | No verification |
Gs2Guild::Guild | GS2-Guild Guild |
Gs2Matchmaking::SeasonGathering | GS2-Matchmaking Season Gathering |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
ClusterRankingScore
Cluster Ranking Score
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
clusterRankingScoreId | string | ✓ | ~ 1024 chars | Cluster Ranking Score GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
ClusterRankingReceivedReward
Cluster Ranking Reward Received History
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
clusterRankingReceivedRewardId | string | ✓ | ~ 1024 chars | Cluster Ranking Received Reward GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
receivedAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
ClusterRankingData
Cluster Ranking
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
clusterRankingDataId | string | ✓ | ~ 1024 chars | Cluster Ranking GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
index | int | ~ 2147483646 | Index of Ranking | |||
rank | int | ~ 2147483646 | Rank of Ranking | |||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
SubscribeRankingModel
Subscribe Ranking Model
A model that aggregates the scores of other players who have subscribed and creates a ranking.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
subscribeRankingModelId | string | ✓ | ~ 1024 chars | Subscribe Ranking GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
SubscribeRankingModelMaster
Subscribe Ranking Model
The subscribe ranking model is a model 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
subscribeRankingModelId | string | ✓ | ~ 1024 chars | Subscribe Ranking Master GRN | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
description | string | ~ 1024 chars | Description | |||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
scoreTtlDays | int | ✓ | 30 | 1 ~ 365 | Validity period of registered scores (days) | |
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
Subscribe
Subscribe
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
subscribeId | string | ✓ | ~ 1024 chars | Subscribe Score GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
targetUserIds | List<string> | ~ 100 items | Subscribe Target User IDs | |||
fromUserIds | List<string> | ~ 1000 items | Subscribe From User IDs | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
SubscribeRankingScore
Subscribe Ranking Score
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
subscribeRankingScoreId | string | ✓ | ~ 1024 chars | Subscribe Ranking Score GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
SubscribeRankingData
Subscribe Ranking
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
subscribeRankingDataId | string | ✓ | ~ 1024 chars | Subscribe Ranking GRN | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
season | long | ✓ | ~ 9223372036854775805 | Season | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
index | int | ~ 2147483646 | Index of Ranking | |||
rank | int | ~ 2147483646 | Rank of Ranking | |||
scorerUserId | string | ✓ | ~ 128 chars | Scorer User ID | ||
score | long | ✓ | ~ 9223372036854775805 | Score | ||
metadata | string | ~ 512 chars | metadata | |||
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) | ||
revision | long | 0 | ~ 9223372036854775805 | Revision |
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.
Note
Please refer to Master Data Reference of GS2-Ranking2 for the JSON file format.Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceId | string | ✓ | ~ 1024 chars | Currently available Ranking Master GRN | ||
settings | string | ✓ | ~ 5242880 chars | Master data |
SubscribeUser
Subscribe Information
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
userId | string | ✓ | ~ 128 chars | User Id | ||
targetUserId | string | ✓ | ~ 128 chars | Subscribe 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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
thresholdRank | int | ✓ | 1 ~ 1001 | Rank threshold | ||
metadata | string | ~ 1024 chars | metadata | |||
acquireActions | List<AcquireAction> | [] | ~ 100 items | List of actions to be performed when rewards are received |
VerifyActionResult
Verify action execution result
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the verify task | ||
verifyRequest | string | ✓ | ~ 1048576 chars | JSON of request | ||
statusCode | int | ~ 999 | Status code | |||
verifyResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
ConsumeActionResult
Consume action execution result
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the consume action | ||
consumeRequest | string | ✓ | ~ 1048576 chars | JSON of request | ||
statusCode | int | ~ 999 | Status code | |||
consumeResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
AcquireActionResult
Acquire action execution result
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the acquire action | ||
acquireRequest | string | ✓ | ~ 1048576 chars | JSON of request | ||
statusCode | int | ~ 999 | Status code | |||
acquireResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
TransactionResult
Transaction execution results
Transaction execution results executed using server-side transaction auto-execution functionality
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
transactionId | string | ✓ | 36 ~ 36 chars | Transaction ID | ||
verifyResults | List<VerifyActionResult> | ~ 10 items | List of verify action execution results | |||
consumeResults | List<ConsumeActionResult> | ~ 10 items | List of consume action execution results | |||
acquireResults | List<AcquireActionResult> | ~ 100 items | List of acquire action execution results |
TransactionSetting
Transaction settings
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
enableAutoRun | bool | ✓ | false | Whether to automatically execute issued transactions on the server side | ||
enableAtomicCommit | bool | {enableAutoRun} == true | ✓ | false | Whether to commit the execution of transactions atomically | |
transactionUseDistributor | bool | {enableAtomicCommit} == true | ✓ | false | Whether to execute transactions asynchronously | |
acquireActionUseJobQueue | bool | {enableAtomicCommit} == true | ✓ | false | Whether to use GS2-JobQueue to execute the acquire action | |
distributorNamespaceId | string | ✓ | “grn:gs2:{region}:{ownerId}:distributor:default” | ~ 1024 chars | GS2-Distributor namespace used for transaction execution | |
queueNamespaceId | string | ✓ | “grn:gs2:{region}:{ownerId}:queue:default” | ~ 1024 chars | Namespace in GS2-JobQueue used to run the transaction |
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.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
loggingNamespaceId | string | ✓ | ~ 1024 chars | Namespace GRN |
GitHubCheckoutSetting
Setup to check out master data from GitHub
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
apiKeyId | string | ✓ | ~ 1024 chars | GitHub API key GRN | ||
repositoryName | string | ✓ | ~ 1024 chars | Repository Name | ||
sourcePath | string | ✓ | ~ 1024 chars | Source code file path | ||
referenceType | enum { “commit_hash”, “branch”, “tag” } | ✓ | ~ 128 chars | Source of code | ||
commitHash | string | {referenceType} == “commit_hash” | ✓ | ~ 1024 chars | Commit hash | |
branchName | string | {referenceType} == “branch” | ✓ | ~ 1024 chars | Branch Name | |
tagName | string | {referenceType} == “tag” | ✓ | ~ 1024 chars | Tag Name |
Enumeration type definition to specify as referenceType
Enumerator String Definition | Description |
---|---|
commit_hash | Commit hash |
branch | Branch |
tag | Tag |
AcquireAction
Acquire Action
Config
Configration
Set values to be applied to transaction variables
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
key | string | ✓ | ~ 64 chars | Name | ||
value | string | ~ 51200 chars | Value |
Methods
describeNamespaces
Get list of namespaces
Request
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<Namespace> | List of Namespace |
nextPageToken | string | Page 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;
client = gs2('ranking2')
api_result_handler = client.describe_namespaces_async({
pageToken=nil,
limit=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
name | string | ✓ | ~ 128 chars | Namespace name | ||
description | string | ~ 1024 chars | Description | |||
transactionSetting | TransactionSetting | ✓ | Transaction settings | |||
logSetting | LogSetting | Log output settings |
Result
Type | Description | |
---|---|---|
item | Namespace | Namespace 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;
client = gs2('ranking2')
api_result_handler = client.create_namespace_async({
name="namespace1",
description=nil,
transactionSetting=nil,
logSetting={
loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
},
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
status | string |
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;
client = gs2('ranking2')
api_result_handler = client.get_namespace_status_async({
namespaceName="namespace1",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
item | Namespace | 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.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;
client = gs2('ranking2')
api_result_handler = client.get_namespace_async({
namespaceName="namespace1",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
description | string | ~ 1024 chars | Description | |||
transactionSetting | TransactionSetting | ✓ | Transaction settings | |||
logSetting | LogSetting | Log output settings |
Result
Type | Description | |
---|---|---|
item | Namespace | Updated 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;
client = gs2('ranking2')
api_result_handler = client.update_namespace_async({
namespaceName="namespace1",
description="description1",
transactionSetting=nil,
logSetting={
loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
},
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
item | Namespace | Deleted 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;
client = gs2('ranking2')
api_result_handler = client.delete_namespace_async({
namespaceName="namespace1",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description |
---|
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
client = gs2('ranking2')
api_result_handler = client.dump_user_data_by_user_id_async({
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description | |
---|---|---|
url | string | URL 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;
client = gs2('ranking2')
api_result_handler = client.check_dump_user_data_by_user_id_async({
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description |
---|
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
client = gs2('ranking2')
api_result_handler = client.clean_user_data_by_user_id_async({
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description |
---|
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
client = gs2('ranking2')
api_result_handler = client.check_clean_user_data_by_user_id_async({
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description | |
---|---|---|
uploadToken | string | Token used to reflect results after upload |
uploadUrl | string | URL 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;
client = gs2('ranking2')
api_result_handler = client.prepare_import_user_data_by_user_id_async({
userId="user-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
uploadToken | string | ✓ | ~ 1024 chars | Token received in preparation for upload | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description |
---|
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
client = gs2('ranking2')
api_result_handler = client.import_user_data_by_user_id_async({
userId="user-0001",
uploadToken="upload-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | ||
uploadToken | string | ✓ | ~ 1024 chars | Token received in preparation for upload | ||
timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
Type | Description | |
---|---|---|
url | string | URL 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;
client = gs2('ranking2')
api_result_handler = client.check_import_user_data_by_user_id_async({
userId="user-0001",
uploadToken="upload-0001",
timeOffsetToken=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
items | List<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;
client = gs2('ranking2')
api_result_handler = client.describe_global_ranking_models_async({
namespaceName=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | GlobalRankingModel | Global 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;
client = gs2('ranking2')
api_result_handler = client.get_global_ranking_model_async({
namespaceName="namespace1",
rankingName="ranking-0001",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<GlobalRankingModelMaster> | List of Global Ranking Model Masters |
nextPageToken | string | Page 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;
client = gs2('ranking2')
api_result_handler = client.describe_global_ranking_model_masters_async({
namespaceName="namespace1",
pageToken=nil,
limit=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
name | string | ✓ | ~ 128 chars | Ranking Name | ||
description | string | ~ 1024 chars | Description | |||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
Result
Type | Description | |
---|---|---|
item | GlobalRankingModelMaster | Created 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;
client = gs2('ranking2')
api_result_handler = client.create_global_ranking_model_master_async({
namespaceName="namespace1",
name="global-0001",
description=nil,
metadata=nil,
minimumValue=nil,
maximumValue=nil,
sum=nil,
orderDirection="asc",
rankingRewards=nil,
entryPeriodEventId=nil,
accessPeriodEventId=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | GlobalRankingModelMaster | 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.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;
client = gs2('ranking2')
api_result_handler = client.get_global_ranking_model_master_async({
namespaceName="namespace1",
rankingName="global-0001",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name | ||
description | string | ~ 1024 chars | Description | |||
metadata | string | ~ 1024 chars | metadata | |||
minimumValue | long | ~ 9223372036854775805 | Minimum Score | |||
maximumValue | long | ~ 9223372036854775805 | Maximum Score | |||
sum | bool | ✓ | false | Add up the scores of put and compete for the total value. | ||
orderDirection | enum { “asc”, “desc” } | ✓ | ~ 128 chars | Sort direction of scores | ||
rankingRewards | List<RankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | |||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as orderDirection
Enumerator String Definition | Description |
---|---|
asc | ascending-order |
desc | descending-order |
Result
Type | Description | |
---|---|---|
item | GlobalRankingModelMaster | Updated 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;
client = gs2('ranking2')
api_result_handler = client.update_global_ranking_model_master_async({
namespaceName="namespace1",
rankingName="global-0001",
description="description1",
metadata="CATEGORY_0001",
minimumValue=100,
maximumValue=10000,
sum=nil,
orderDirection="desc",
rankingRewards=nil,
entryPeriodEventId=nil,
accessPeriodEventId=nil,
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | GlobalRankingModelMaster | Deleted 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;
client = gs2('ranking2')
api_result_handler = client.delete_global_ranking_model_master_async({
namespaceName="namespace1",
rankingName="global-0001",
})
api_result = api_result_handler() -- Call the handler to get the result
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
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
accessToken | string | ✓ | ~ 128 chars | User Id | ||
rankingName | string | ~ 128 chars | Ranking Name | |||
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<GlobalRankingScore> | List of Global Ranking Scores |
nextPageToken | string | Page 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;