API Reference of GS2-Ranking2 SDK

Specification of models and API references for GS2-SDK for various programming languages

Model

Namespace

Namespace

A namespace is a mechanism that allows multiple uses of the same service for different purposes within a single project. Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the namespace differs, the data is treated as a completely independent data space.

Therefore, you must create a namespace before you can start using each service.

TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
~ 1024 charsNamespace GRN
namestring
~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSetting
Transaction settings
logSettingLogSettingLog output settings
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

GlobalRankingScore

Global Ranking Score

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingScoreIdstring
~ 1024 charsGlobal Ranking Score GRN
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong
0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

GlobalRankingReceivedReward

Global Ranking Reward Received History

It is possible to set rewards for global ranking positions. To set rewards, set the ranking threshold and reward details.

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingReceivedRewardIdstring
~ 1024 charsGlobal Ranking Received Reward GRN
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong
0 ~ 9223372036854775805Season
receivedAtlong
NowDatetime of creation
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

GlobalRankingData

Global Ranking

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingDataIdstring
~ 1024 charsGlobal Ranking GRN
rankingNamestring
~ 128 charsRanking Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
indexint0 ~ 2147483646Index of Ranking
rankint0 ~ 2147483646Rank of Ranking
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
invertUpdatedAtlong
0 ~ 9223372036854775805Inverted Updated At
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

ClusterRankingScore

Cluster Ranking Score

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingScoreIdstring
~ 1024 charsCluster Ranking Score GRN
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

ClusterRankingReceivedReward

Cluster Ranking Reward Received History

You can set rewards according to the cluster ranking. To set rewards, set the ranking threshold and reward details.

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingReceivedRewardIdstring
~ 1024 charsCluster Ranking Received Reward GRN
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
receivedAtlong
NowDatetime of creation
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

ClusterRankingData

Cluster Ranking

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingDataIdstring
~ 1024 charsCluster Ranking GRN
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
indexint0 ~ 2147483646Index of Ranking
rankint0 ~ 2147483646Rank of Ranking
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
invertUpdatedAtlong
0 ~ 9223372036854775805Inverted Created At
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

Subscribe

Subscribe

By designating other players as subscribers, you can include their latest scores on your ranking board.

TypeConditionRequiredDefaultValue LimitsDescription
subscribeIdstring
~ 1024 charsSubscribe Score GRN
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
targetUserIdsList<string>0 ~ 100 itemsSubscribe Target User IDs
fromUserIdsList<string>0 ~ 1000 itemsSubscribe From User IDs
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

SubscribeRankingScore

Subscribe Ranking Score

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingScoreIdstring
~ 1024 charsSubscribe Ranking Score GRN
rankingNamestring
~ 128 charsRanking Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

SubscribeRankingData

Subscribe Ranking

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingDataIdstring
~ 1024 charsSubscribe Ranking GRN
rankingNamestring
~ 128 charsRanking Name
seasonlong
0 ~ 9223372036854775805Season
userIdstring
~ 128 charsUser Id
indexint0 ~ 2147483646Index of Ranking
rankint0 ~ 2147483646Rank of Ranking
scorerUserIdstring
~ 128 charsScorer User ID
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
invertUpdatedAtlong
0 ~ 9223372036854775805Inverted Updated At
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

SubscribeUser

Subscribe Information

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

RankingReward

Ranking Reward Model

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

TypeConditionRequiredDefaultValue LimitsDescription
thresholdRankint
1 ~ 1001Rank threshold
metadatastring~ 1024 charsMetadata
acquireActionsList<AcquireAction>0 ~ 100 itemsList of actions to be performed when rewards are received

VerifyActionResult

Verify action execution result

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
~ 128 charsTypes of actions to be performed in the verify task
verifyRequeststring
~ 524288 charsJSON of request
statusCodeint0 ~ 999Status code
verifyResultstring~ 1048576 charsResult payload

ConsumeActionResult

Consume action execution result

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
~ 128 charsTypes of actions to be performed in the consume action
consumeRequeststring
~ 524288 charsJSON of request
statusCodeint0 ~ 999Status code
consumeResultstring~ 1048576 charsResult payload

AcquireActionResult

Acquire action execution result

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
~ 128 charsTypes of actions to be performed in the acquire action
acquireRequeststring
~ 524288 charsJSON of request
statusCodeint0 ~ 999Status code
acquireResultstring~ 1048576 charsResult payload

TransactionResult

Transaction execution results

Transaction execution results executed using server-side transaction auto-execution functionality

TypeConditionRequiredDefaultValue LimitsDescription
transactionIdstring
36 ~ 36 charsTransaction ID
verifyResultsList<VerifyActionResult>0 ~ 10 itemsList of verify action execution results
consumeResultsList<ConsumeActionResult>0 ~ 10 itemsList of consume action execution results
acquireResultsList<AcquireActionResult>0 ~ 100 itemsList of acquire action execution results
hasErrorbool
falseWhether an error occurred during transaction execution

TransactionSetting

Transaction settings

Transaction settings control how transactions are executed, their consistency, asynchronous processing, and conflict avoidance mechanisms. Combining features like AutoRun, AtomicCommit, Distributor, batch application of script results, and asynchronous acquisition actions via JobQueue enables robust transaction management tailored to game logic.

TypeConditionRequiredDefaultValue LimitsDescription
enableAutoRunbool
falseWhether to automatically execute issued transactions on the server side
enableAtomicCommitbool{enableAutoRun} == true
✓*
falseWhether to commit the execution of transactions atomically
* Required if enableAutoRun is true
transactionUseDistributorbool{enableAtomicCommit} == true
✓*
falseWhether to execute transactions asynchronously
* Required if enableAtomicCommit is true
commitScriptResultInUseDistributorbool{transactionUseDistributor} == true
✓*
falseWhether to execute the commit processing of the script result asynchronously
* Required if transactionUseDistributor is true
acquireActionUseJobQueuebool{enableAtomicCommit} == true
✓*
falseWhether to use GS2-JobQueue to execute the acquire action
* Required if enableAtomicCommit is true
distributorNamespaceIdstring
“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor namespace used for transaction execution
queueNamespaceIdstring
“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsNamespace in GS2-JobQueue used to run the transaction

LogSetting

Log Export Settings

Manages log data export settings. This type holds the GS2-Log namespace identifier (Namespace ID) used to export log data. Specify the GS2-Log namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId). Configuring this setting ensures that log data for API requests and responses occurring within the specified namespace is output to the target GS2-Log namespace. GS2-Log provides real-time logs that can be used for system monitoring, analysis, and debugging.

TypeConditionRequiredDefaultValue LimitsDescription
loggingNamespaceIdstring
~ 1024 charsGS2-Log namespace GRN to output logs

AcquireAction

Acquire Action

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

Config

Configuration

Set values to be applied to transaction variables

TypeConditionRequiredDefaultValue LimitsDescription
keystring
~ 64 charsName
valuestring~ 51200 charsValue

GitHubCheckoutSetting

Setup to check out master data from GitHub

TypeConditionRequiredDefaultValue LimitsDescription
apiKeyIdstring
~ 1024 charsGitHub API key GRN
repositoryNamestring
~ 1024 charsRepository Name
sourcePathstring
~ 1024 charsMaster data (JSON) file path
referenceTypeString Enum
enum {
  “commit_hash”,
  “branch”,
  “tag”
}
~ 128 charsSource of code
Enumerator String DefinitionDescription
“commit_hash”Commit hash
“branch”Branch
“tag”Tag
commitHashstring{referenceType} == “commit_hash”
✓*
~ 1024 charsCommit hash
* Required if referenceType is “commit_hash”
branchNamestring{referenceType} == “branch”
✓*
~ 1024 charsBranch Name
* Required if referenceType is “branch”
tagNamestring{referenceType} == “tag”
✓*
~ 1024 charsTag Name
* Required if referenceType is “tag”

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.

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingModelIdstring
~ 1024 charsGlobal Ranking GRN
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

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.

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingModelIdstring
~ 1024 charsCluster Ranking GRN
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
~ 128 charsCluster Type
Enumerator String DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index

SubscribeRankingModel

Subscribe Ranking Model

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

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingModelIdstring
~ 1024 charsSubscribe Ranking GRN
namestring
~ 128 charsRanking Name
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN

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.

To create JSON files, we provide a master data editor within the management console. Additionally, you can utilize the service by creating tools more suited to game operations and exporting JSON files in the appropriate format.

TypeConditionRequiredDefaultValue LimitsDescription
namespaceIdstring
~ 1024 charsNamespace GRN
settingsstring
~ 5242880 bytes (5MB)Master Data

GlobalRankingModelMaster

Global ranking model master

The global ranking model 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.

TypeConditionRequiredDefaultValue LimitsDescription
globalRankingModelIdstring
~ 1024 charsGlobal Ranking Master GRN
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

ClusterRankingModelMaster

Cluster ranking model master

The cluster 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.

TypeConditionRequiredDefaultValue LimitsDescription
clusterRankingModelIdstring
~ 1024 charsCluster Ranking Master GRN
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
~ 128 charsCluster Type
Enumerator String DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
rankingRewardsList<RankingReward>{entryPeriodEventId} != null0 ~ 100 itemsList of ranking rewards
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

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.

TypeConditionRequiredDefaultValue LimitsDescription
subscribeRankingModelIdstring
~ 1024 charsSubscribe Ranking Master GRN
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed
createdAtlong
NowDatetime of creation
Unix time, milliseconds
updatedAtlong
NowDatetime of last update
Unix time, milliseconds
revisionlong00 ~ 9223372036854775805Revision

Methods

describeNamespaces

Get list of namespaces

Request

TypeConditionRequiredDefaultValue LimitsDescription
namePrefixstring~ 64 charsFilter by namespace name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

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

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.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()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_namespaces_async({
    namePrefix=nil,
    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

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSetting
Transaction settings
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceNamespace created

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &ranking2.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: nil,
        LogSetting: &ranking2.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting(null)
            ->withLogSetting((new \Gs2\Ranking2\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.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("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withLogSetting(new io.gs2.ranking2.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Ranking2.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(null)
        .WithLogSetting(new Gs2.Gs2Ranking2.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.createNamespace(
        new Gs2Ranking2.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withLogSetting(new Gs2Ranking2.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.create_namespace(
        ranking2.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(None)
            .with_log_setting(
                ranking2.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.create_namespace_async({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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;

getNamespaceStatus

Get namespace status

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
statusstring

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &ranking2.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName("namespace-0001")
    );
    $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("namespace-0001")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Ranking2.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace-0001"),
    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("namespace-0001")
    );
    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('namespace-0001')
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_namespace_status({
    namespaceName="namespace-0001",
})

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="namespace-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
status = result.status;

getNamespace

Get namespace

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceNamespace

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &ranking2.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-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\GetNamespaceRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName("namespace-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.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("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Ranking2.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace-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.getNamespace(
        new Gs2Ranking2.GetNamespaceRequest()
            .withNamespaceName("namespace-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_namespace(
        ranking2.GetNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_namespace({
    namespaceName="namespace-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_namespace_async({
    namespaceName="namespace-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;

updateNamespace

Update namespace

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSetting
Transaction settings
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceUpdated namespace

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &ranking2.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: nil,
        LogSetting: &ranking2.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting(null)
            ->withLogSetting((new \Gs2\Ranking2\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.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("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withLogSetting(new io.gs2.ranking2.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Ranking2.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(null)
        .WithLogSetting(new Gs2.Gs2Ranking2.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.updateNamespace(
        new Gs2Ranking2.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withLogSetting(new Gs2Ranking2.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.update_namespace(
        ranking2.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(None)
            .with_log_setting(
                ranking2.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-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;

deleteNamespace

Delete namespace

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceDeleted namespace

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &ranking2.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-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\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName("namespace-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.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("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Ranking2.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace-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.deleteNamespace(
        new Gs2Ranking2.DeleteNamespaceRequest()
            .withNamespaceName("namespace-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_namespace(
        ranking2.DeleteNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_namespace({
    namespaceName="namespace-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_namespace_async({
    namespaceName="namespace-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;

getServiceVersion

Get version of microservice

Request

TypeConditionRequiredDefaultValue LimitsDescription

Result

TypeDescription
itemstringVersion

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.GetServiceVersion(
    &ranking2.GetServiceVersionRequest {
    }
)
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\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getServiceVersion(
        (new GetServiceVersionRequest())
    );
    $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.GetServiceVersionRequest;
import io.gs2.ranking2.result.GetServiceVersionResult;

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

try {
    GetServiceVersionResult result = client.getServiceVersion(
        new GetServiceVersionRequest()
    );
    String item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Ranking2.Request.GetServiceVersionRequest(),
    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.getServiceVersion(
        new Gs2Ranking2.GetServiceVersionRequest()
    );
    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_service_version(
        ranking2.GetServiceVersionRequest()
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_service_version({
})

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_service_version_async({
})

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

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &ranking2.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of output data

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &ranking2.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &ranking2.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &ranking2.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &ranking2.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

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

Result

TypeDescription

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &ranking2.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

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

Result

TypeDescription
urlstringURL of log data

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &ranking2.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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;

describeGlobalRankingScores

Get list of Global Ranking Scores

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingScores(
    &ranking2.DescribeGlobalRankingScoresRequest {
        NamespaceName: pointy.String("namespace-0001"),
        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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingScores(
        (new DescribeGlobalRankingScoresRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingScoresRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingScoresResult;

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

try {
    DescribeGlobalRankingScoresResult result = client.describeGlobalRankingScores(
        new DescribeGlobalRankingScoresRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresResult> asyncResult = null;
yield return client.DescribeGlobalRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_global_ranking_scores(
        ranking2.DescribeGlobalRankingScoresRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_scores({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_ranking_scores_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    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;

describeGlobalRankingScoresByUserId

Get list of Global Ranking Scores specifying User ID

Request

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

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingScoresByUserId(
    &ranking2.DescribeGlobalRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingScoresByUserId(
        (new DescribeGlobalRankingScoresByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingScoresByUserIdResult;

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

try {
    DescribeGlobalRankingScoresByUserIdResult result = client.describeGlobalRankingScoresByUserId(
        new DescribeGlobalRankingScoresByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_global_ranking_scores_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_ranking_scores_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

putGlobalRankingScore

Register Global Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata

Result

TypeDescription
itemGlobalRankingScoreRegistered Global Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutGlobalRankingScore(
    &ranking2.PutGlobalRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutGlobalRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    PutGlobalRankingScoreResult result = client.putGlobalRankingScore(
        new PutGlobalRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_global_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=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;

putGlobalRankingScoreByUserId

Register Global Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreRegistered Global Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutGlobalRankingScoreByUserId(
    &ranking2.PutGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    PutGlobalRankingScoreByUserIdResult result = client.putGlobalRankingScoreByUserId(
        new PutGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_global_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    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
item = result.item;

getGlobalRankingScore

Get Global Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingScore(
    &ranking2.GetGlobalRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getGlobalRankingScore(
        (new GetGlobalRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingScoreRequest;
import io.gs2.ranking2.result.GetGlobalRankingScoreResult;

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

try {
    GetGlobalRankingScoreResult result = client.getGlobalRankingScore(
        new GetGlobalRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

getGlobalRankingScoreByUserId

Get Global Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingScoreByUserId(
    &ranking2.GetGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetGlobalRankingScoreByUserIdResult result = client.getGlobalRankingScoreByUserId(
        new GetGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    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
item = result.item;

deleteGlobalRankingScoreByUserId

Delete Global Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreDeleted Global Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingScoreByUserId(
    &ranking2.DeleteGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    DeleteGlobalRankingScoreByUserIdResult result = client.deleteGlobalRankingScoreByUserId(
        new DeleteGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_global_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

verifyGlobalRankingScore

Verify the score of the global ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifyGlobalRankingScore(
    &ranking2.VerifyGlobalRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: 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\VerifyGlobalRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifyGlobalRankingScore(
        (new VerifyGlobalRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(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.VerifyGlobalRankingScoreRequest;
import io.gs2.ranking2.result.VerifyGlobalRankingScoreResult;

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

try {
    VerifyGlobalRankingScoreResult result = client.verifyGlobalRankingScore(
        new VerifyGlobalRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifyGlobalRankingScoreResult> asyncResult = null;
yield return client.VerifyGlobalRankingScore(
    new Gs2.Gs2Ranking2.Request.VerifyGlobalRankingScoreRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(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.verifyGlobalRankingScore(
        new Gs2Ranking2.VerifyGlobalRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(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.verify_global_ranking_score(
        ranking2.VerifyGlobalRankingScoreRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_global_ranking_score({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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.verify_global_ranking_score_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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;

verifyGlobalRankingScoreByUserId

Verify the score of the global ranking specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
userIdstring
~ 128 charsUser Id
rankingNamestring
~ 128 charsRanking Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingScoreGlobal Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifyGlobalRankingScoreByUserId(
    &ranking2.VerifyGlobalRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\VerifyGlobalRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifyGlobalRankingScoreByUserId(
        (new VerifyGlobalRankingScoreByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.VerifyGlobalRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.VerifyGlobalRankingScoreByUserIdResult;

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

try {
    VerifyGlobalRankingScoreByUserIdResult result = client.verifyGlobalRankingScoreByUserId(
        new VerifyGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifyGlobalRankingScoreByUserIdResult> asyncResult = null;
yield return client.VerifyGlobalRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.VerifyGlobalRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.verifyGlobalRankingScoreByUserId(
        new Gs2Ranking2.VerifyGlobalRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.verify_global_ranking_score_by_user_id(
        ranking2.VerifyGlobalRankingScoreByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_global_ranking_score_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.verify_global_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    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
item = result.item;

describeGlobalRankingReceivedRewards

Get list of Global Ranking Rewards Received

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring~ 128 charsRanking Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingReceivedRewards(
    &ranking2.DescribeGlobalRankingReceivedRewardsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingReceivedRewardsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingReceivedRewards(
        (new DescribeGlobalRankingReceivedRewardsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingReceivedRewardsRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingReceivedRewardsResult;

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

try {
    DescribeGlobalRankingReceivedRewardsResult result = client.describeGlobalRankingReceivedRewards(
        new DescribeGlobalRankingReceivedRewardsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingReceivedReward> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsResult> asyncResult = null;
yield return client.DescribeGlobalRankingReceivedRewards(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(0L)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_global_ranking_received_rewards(
        ranking2.DescribeGlobalRankingReceivedRewardsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_season(0)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_received_rewards({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=0,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_ranking_received_rewards_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=0,
    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;

describeGlobalRankingReceivedRewardsByUserId

Get list of Global Ranking Rewards Received specifying User ID

Request

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

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingReceivedRewardsByUserId(
    &ranking2.DescribeGlobalRankingReceivedRewardsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingReceivedRewardsByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingReceivedRewardsByUserId(
        (new DescribeGlobalRankingReceivedRewardsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingReceivedRewardsByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingReceivedRewardsByUserIdResult;

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

try {
    DescribeGlobalRankingReceivedRewardsByUserIdResult result = client.describeGlobalRankingReceivedRewardsByUserId(
        new DescribeGlobalRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingReceivedReward> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingReceivedRewardsByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingReceivedRewardsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingReceivedRewardsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_global_ranking_received_rewards_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_ranking_received_rewards_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

createGlobalRankingReceivedReward

Record history of receiving global ranking rewards

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingReceivedReward(
    &ranking2.CreateGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createGlobalRankingReceivedReward(
        (new CreateGlobalRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.CreateGlobalRankingReceivedRewardResult;

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

try {
    CreateGlobalRankingReceivedRewardResult result = client.createGlobalRankingReceivedReward(
        new CreateGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.create_global_ranking_received_reward_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

createGlobalRankingReceivedRewardByUserId

Record history of receiving global ranking rewards specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingReceivedRewardByUserId(
    &ranking2.CreateGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    CreateGlobalRankingReceivedRewardByUserIdResult result = client.createGlobalRankingReceivedRewardByUserId(
        new CreateGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.create_global_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

receiveGlobalRankingReceivedReward

Receive Global Ranking Reward

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
seasonlong0 ~ 9223372036854775805Season
configList<Config>[]0 ~ 32 itemsSet values to be applied to transaction variables

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Whether automatic transaction execution is enabled
atomicCommitbool?Whether to commit the transaction atomically
transactionstringIssued transaction
transactionResultTransactionResultTransaction execution result

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveGlobalRankingReceivedReward(
    &ranking2.ReceiveGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->receiveGlobalRankingReceivedReward(
        (new ReceiveGlobalRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.ReceiveGlobalRankingReceivedRewardResult;

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

try {
    ReceiveGlobalRankingReceivedRewardResult result = client.receiveGlobalRankingReceivedReward(
        new ReceiveGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withConfig(null)
    );
    GlobalRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('ranking2')

api_result_handler = client.receive_global_ranking_received_reward_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=0,
    config=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;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

receiveGlobalRankingReceivedRewardByUserId

Receive Global Ranking Reward specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
userIdstring
~ 128 charsUser Id
rankingNamestring
~ 128 charsRanking Name
seasonlong0 ~ 9223372036854775805Season
configList<Config>[]0 ~ 32 itemsSet values to be applied to transaction variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Whether automatic transaction execution is enabled
atomicCommitbool?Whether to commit the transaction atomically
transactionstringIssued transaction
transactionResultTransactionResultTransaction execution result

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveGlobalRankingReceivedRewardByUserId(
    &ranking2.ReceiveGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: pointy.Int64(0),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->receiveGlobalRankingReceivedRewardByUserId(
        (new ReceiveGlobalRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(0)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveGlobalRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.ReceiveGlobalRankingReceivedRewardByUserIdResult;

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

try {
    ReceiveGlobalRankingReceivedRewardByUserIdResult result = client.receiveGlobalRankingReceivedRewardByUserId(
        new ReceiveGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(0L)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('ranking2')

api_result_handler = client.receive_global_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=0,
    config=nil,
    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
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

getGlobalRankingReceivedReward

Get Global Ranking Reward Received History

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingReceivedReward(
    &ranking2.GetGlobalRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getGlobalRankingReceivedReward(
        (new GetGlobalRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetGlobalRankingReceivedRewardRequest;
import io.gs2.ranking2.result.GetGlobalRankingReceivedRewardResult;

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

try {
    GetGlobalRankingReceivedRewardResult result = client.getGlobalRankingReceivedReward(
        new GetGlobalRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    GlobalRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_received_reward_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

getGlobalRankingReceivedRewardByUserId

Get Global Ranking Reward Received History specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingReceivedRewardGlobal Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingReceivedRewardByUserId(
    &ranking2.GetGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetGlobalRankingReceivedRewardByUserIdResult result = client.getGlobalRankingReceivedRewardByUserId(
        new GetGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

deleteGlobalRankingReceivedRewardByUserId

Delete Global Ranking Reward Received History specifying User ID

Request

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

Result

TypeDescription
itemGlobalRankingReceivedRewardDeleted Global Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingReceivedRewardByUserId(
    &ranking2.DeleteGlobalRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteGlobalRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    DeleteGlobalRankingReceivedRewardByUserIdResult result = client.deleteGlobalRankingReceivedRewardByUserId(
        new DeleteGlobalRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    GlobalRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_global_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

describeGlobalRankings

Get list of Global Rankings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankings(
    &ranking2.DescribeGlobalRankingsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankings(
        (new DescribeGlobalRankingsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingsRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingsResult;

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

try {
    DescribeGlobalRankingsResult result = client.describeGlobalRankings(
        new DescribeGlobalRankingsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsResult> asyncResult = null;
yield return client.DescribeGlobalRankings(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_global_rankings(
        ranking2.DescribeGlobalRankingsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_rankings({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_rankings_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    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;

describeGlobalRankingsByUserId

Get list of Global Rankings by specifying the user ID

Request

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

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingsByUserId(
    &ranking2.DescribeGlobalRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingsByUserId(
        (new DescribeGlobalRankingsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeGlobalRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeGlobalRankingsByUserIdResult;

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

try {
    DescribeGlobalRankingsByUserIdResult result = client.describeGlobalRankingsByUserId(
        new DescribeGlobalRankingsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<GlobalRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeGlobalRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_global_rankings_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_rankings_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

getGlobalRanking

Get Global Ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemGlobalRankingDataGlobal Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRanking(
    &ranking2.GetGlobalRankingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetGlobalRankingResult result = client.getGlobalRanking(
        new GetGlobalRankingRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    GlobalRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=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;

getGlobalRankingByUserId

Get Global Ranking by specifying the user ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemGlobalRankingDataGlobal Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingByUserId(
    &ranking2.GetGlobalRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetGlobalRankingByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetGlobalRankingByUserIdResult result = client.getGlobalRankingByUserId(
        new GetGlobalRankingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    GlobalRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_global_ranking_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    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
item = result.item;

describeClusterRankingScores

Get list of Cluster Ranking Scores

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingScores(
    &ranking2.DescribeClusterRankingScoresRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingScoresRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingScores(
        (new DescribeClusterRankingScoresRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingScoresRequest;
import io.gs2.ranking2.result.DescribeClusterRankingScoresResult;

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

try {
    DescribeClusterRankingScoresResult result = client.describeClusterRankingScores(
        new DescribeClusterRankingScoresRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresResult> asyncResult = null;
yield return client.DescribeClusterRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_cluster_ranking_scores(
        ranking2.DescribeClusterRankingScoresRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_scores({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

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

describeClusterRankingScoresByUserId

Get list of Cluster Ranking Scores specifying User ID

Request

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

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingScoresByUserId(
    &ranking2.DescribeClusterRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingScoresByUserId(
        (new DescribeClusterRankingScoresByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingScoresByUserIdResult;

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

try {
    DescribeClusterRankingScoresByUserIdResult result = client.describeClusterRankingScoresByUserId(
        new DescribeClusterRankingScoresByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName(null)
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_cluster_ranking_scores_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_ranking_scores_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

putClusterRankingScore

Register Cluster Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
accessTokenstring
~ 128 charsAccess token
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata

Result

TypeDescription
itemClusterRankingScoreRegistered Cluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutClusterRankingScore(
    &ranking2.PutClusterRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutClusterRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    PutClusterRankingScoreResult result = client.putClusterRankingScore(
        new PutClusterRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_cluster_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=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;

putClusterRankingScoreByUserId

Register Cluster Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
userIdstring
~ 128 charsUser Id
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingScoreRegistered Cluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutClusterRankingScoreByUserId(
    &ranking2.PutClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    PutClusterRankingScoreByUserIdResult result = client.putClusterRankingScoreByUserId(
        new PutClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_cluster_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    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
item = result.item;

getClusterRankingScore

Get Cluster Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingScore(
    &ranking2.GetClusterRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getClusterRankingScore(
        (new GetClusterRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingScoreRequest;
import io.gs2.ranking2.result.GetClusterRankingScoreResult;

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

try {
    GetClusterRankingScoreResult result = client.getClusterRankingScore(
        new GetClusterRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

getClusterRankingScoreByUserId

Get Cluster Ranking Score specifying User ID

Request

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

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingScoreByUserId(
    &ranking2.GetClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetClusterRankingScoreByUserIdResult result = client.getClusterRankingScoreByUserId(
        new GetClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=nil,
    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
item = result.item;

deleteClusterRankingScoreByUserId

Delete Cluster Ranking Score specifying User ID

Request

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

Result

TypeDescription
itemClusterRankingScoreDeleted Cluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingScoreByUserId(
    &ranking2.DeleteClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    DeleteClusterRankingScoreByUserIdResult result = client.deleteClusterRankingScoreByUserId(
        new DeleteClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_cluster_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

verifyClusterRankingScore

Verify the score of the cluster ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifyClusterRankingScore(
    &ranking2.VerifyClusterRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: 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\VerifyClusterRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifyClusterRankingScore(
        (new VerifyClusterRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(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.VerifyClusterRankingScoreRequest;
import io.gs2.ranking2.result.VerifyClusterRankingScoreResult;

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

try {
    VerifyClusterRankingScoreResult result = client.verifyClusterRankingScore(
        new VerifyClusterRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifyClusterRankingScoreResult> asyncResult = null;
yield return client.VerifyClusterRankingScore(
    new Gs2.Gs2Ranking2.Request.VerifyClusterRankingScoreRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(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.verifyClusterRankingScore(
        new Gs2Ranking2.VerifyClusterRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(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.verify_cluster_ranking_score(
        ranking2.VerifyClusterRankingScoreRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_cluster_ranking_score({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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.verify_cluster_ranking_score_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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;

verifyClusterRankingScoreByUserId

Verify the score of the cluster ranking specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
userIdstring
~ 128 charsUser Id
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingScoreCluster Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifyClusterRankingScoreByUserId(
    &ranking2.VerifyClusterRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\VerifyClusterRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifyClusterRankingScoreByUserId(
        (new VerifyClusterRankingScoreByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.VerifyClusterRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.VerifyClusterRankingScoreByUserIdResult;

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

try {
    VerifyClusterRankingScoreByUserIdResult result = client.verifyClusterRankingScoreByUserId(
        new VerifyClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifyClusterRankingScoreByUserIdResult> asyncResult = null;
yield return client.VerifyClusterRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.VerifyClusterRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.verifyClusterRankingScoreByUserId(
        new Gs2Ranking2.VerifyClusterRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.verify_cluster_ranking_score_by_user_id(
        ranking2.VerifyClusterRankingScoreByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_cluster_ranking_score_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.verify_cluster_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    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
item = result.item;

describeClusterRankingReceivedRewards

Get list of Cluster Ranking Rewards Received

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring~ 128 charsRanking Name
clusterNamestring~ 1024 charsCluster Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingReceivedRewards(
    &ranking2.DescribeClusterRankingReceivedRewardsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingReceivedRewardsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingReceivedRewards(
        (new DescribeClusterRankingReceivedRewardsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingReceivedRewardsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingReceivedRewardsResult;

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

try {
    DescribeClusterRankingReceivedRewardsResult result = client.describeClusterRankingReceivedRewards(
        new DescribeClusterRankingReceivedRewardsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingReceivedReward> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsResult> asyncResult = null;
yield return client.DescribeClusterRankingReceivedRewards(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_cluster_ranking_received_rewards(
        ranking2.DescribeClusterRankingReceivedRewardsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_received_rewards({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

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

describeClusterRankingReceivedRewardsByUserId

Get list of Cluster Ranking Rewards Received specifying User ID

Request

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

Result

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

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingReceivedRewardsByUserId(
    &ranking2.DescribeClusterRankingReceivedRewardsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingReceivedRewardsByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingReceivedRewardsByUserId(
        (new DescribeClusterRankingReceivedRewardsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingReceivedRewardsByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingReceivedRewardsByUserIdResult;

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

try {
    DescribeClusterRankingReceivedRewardsByUserIdResult result = client.describeClusterRankingReceivedRewardsByUserId(
        new DescribeClusterRankingReceivedRewardsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingReceivedReward> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingReceivedRewardsByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingReceivedRewardsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingReceivedRewardsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_cluster_ranking_received_rewards_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_ranking_received_rewards_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

createClusterRankingReceivedReward

Record history of cluster ranking rewards received

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingReceivedReward(
    &ranking2.CreateClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createClusterRankingReceivedReward(
        (new CreateClusterRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.CreateClusterRankingReceivedRewardResult;

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

try {
    CreateClusterRankingReceivedRewardResult result = client.createClusterRankingReceivedReward(
        new CreateClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.create_cluster_ranking_received_reward(
        ranking2.CreateClusterRankingReceivedRewardRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token('accessToken-0001')
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.create_cluster_ranking_received_reward_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

createClusterRankingReceivedRewardByUserId

Record history of cluster ranking rewards received by specifying user ID

Request

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

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingReceivedRewardByUserId(
    &ranking2.CreateClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    CreateClusterRankingReceivedRewardByUserIdResult result = client.createClusterRankingReceivedRewardByUserId(
        new CreateClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.create_cluster_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

receiveClusterRankingReceivedReward

Receive Cluster Ranking Reward

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong0 ~ 9223372036854775805Season
configList<Config>[]0 ~ 32 itemsSet values to be applied to transaction variables

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Whether automatic transaction execution is enabled
atomicCommitbool?Whether to commit the transaction atomically
transactionstringIssued transaction
transactionResultTransactionResultTransaction execution result

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveClusterRankingReceivedReward(
    &ranking2.ReceiveClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->receiveClusterRankingReceivedReward(
        (new ReceiveClusterRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.ReceiveClusterRankingReceivedRewardResult;

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

try {
    ReceiveClusterRankingReceivedRewardResult result = client.receiveClusterRankingReceivedReward(
        new ReceiveClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withConfig(null)
    );
    ClusterRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.ReceiveClusterRankingReceivedRewardResult> asyncResult = null;
yield return client.ReceiveClusterRankingReceivedReward(
    new Gs2.Gs2Ranking2.Request.ReceiveClusterRankingReceivedRewardRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(0L)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var acquireActions = result.AcquireActions;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.receiveClusterRankingReceivedReward(
        new Gs2Ranking2.ReceiveClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withConfig(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_cluster_ranking_received_reward(
        ranking2.ReceiveClusterRankingReceivedRewardRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_config(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.receive_cluster_ranking_received_reward({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    config=nil,
})

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('ranking2')

api_result_handler = client.receive_cluster_ranking_received_reward_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    config=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;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

receiveClusterRankingReceivedRewardByUserId

Receive Cluster Ranking Reward specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
userIdstring
~ 128 charsUser Id
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong0 ~ 9223372036854775805Season
configList<Config>[]0 ~ 32 itemsSet values to be applied to transaction variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model
acquireActionsList<AcquireAction>List of actions to be performed when rewards are received
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the exchange process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Whether automatic transaction execution is enabled
atomicCommitbool?Whether to commit the transaction atomically
transactionstringIssued transaction
transactionResultTransactionResultTransaction execution result

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ReceiveClusterRankingReceivedRewardByUserId(
    &ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: pointy.Int64(0),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
acquireActions := result.AcquireActions
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\ReceiveClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->receiveClusterRankingReceivedRewardByUserId(
        (new ReceiveClusterRankingReceivedRewardByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(0)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $acquireActions = $result->getAcquireActions();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.ReceiveClusterRankingReceivedRewardByUserIdRequest;
import io.gs2.ranking2.result.ReceiveClusterRankingReceivedRewardByUserIdResult;

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

try {
    ReceiveClusterRankingReceivedRewardByUserIdResult result = client.receiveClusterRankingReceivedRewardByUserId(
        new ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0L)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingModel item = result.getItem();
    List<AcquireAction> acquireActions = result.getAcquireActions();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

try {
    const result = await client.receiveClusterRankingReceivedRewardByUserId(
        new Gs2Ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(0)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const acquireActions = result.getAcquireActions();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.receive_cluster_ranking_received_reward_by_user_id(
        ranking2.ReceiveClusterRankingReceivedRewardByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(0)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    acquire_actions = result.acquire_actions
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('ranking2')

api_result_handler = client.receive_cluster_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=0,
    config=nil,
    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
item = result.item;
acquireActions = result.acquireActions;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

getClusterRankingReceivedReward

Get Cluster Ranking Reward Received History

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingReceivedReward(
    &ranking2.GetClusterRankingReceivedRewardRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingReceivedRewardRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getClusterRankingReceivedReward(
        (new GetClusterRankingReceivedRewardRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingReceivedRewardRequest;
import io.gs2.ranking2.result.GetClusterRankingReceivedRewardResult;

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

try {
    GetClusterRankingReceivedRewardResult result = client.getClusterRankingReceivedReward(
        new GetClusterRankingReceivedRewardRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    ClusterRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_cluster_ranking_received_reward(
        ranking2.GetClusterRankingReceivedRewardRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token('accessToken-0001')
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_received_reward_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

getClusterRankingReceivedRewardByUserId

Get Cluster Ranking Reward Received History specifying User ID

Request

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

Result

TypeDescription
itemClusterRankingReceivedRewardCluster Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingReceivedRewardByUserId(
    &ranking2.GetClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetClusterRankingReceivedRewardByUserIdResult result = client.getClusterRankingReceivedRewardByUserId(
        new GetClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

deleteClusterRankingReceivedRewardByUserId

Delete Cluster Ranking Reward Received History specifying User ID

Request

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

Result

TypeDescription
itemClusterRankingReceivedRewardDeleted Cluster Ranking Reward Received History

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingReceivedRewardByUserId(
    &ranking2.DeleteClusterRankingReceivedRewardByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingReceivedRewardByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    DeleteClusterRankingReceivedRewardByUserIdResult result = client.deleteClusterRankingReceivedRewardByUserId(
        new DeleteClusterRankingReceivedRewardByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    ClusterRankingReceivedReward item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_cluster_ranking_received_reward_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

describeClusterRankings

Get list of Cluster Rankings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingData>List of Cluster Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankings(
    &ranking2.DescribeClusterRankingsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankings(
        (new DescribeClusterRankingsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingsResult;

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

try {
    DescribeClusterRankingsResult result = client.describeClusterRankings(
        new DescribeClusterRankingsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingsResult> asyncResult = null;
yield return client.DescribeClusterRankings(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_cluster_rankings(
        ranking2.DescribeClusterRankingsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_rankings({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_rankings_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    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;

describeClusterRankingsByUserId

Get list of Cluster Rankings by specifying the user ID

Request

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

Result

TypeDescription
itemsList<ClusterRankingData>List of Cluster Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingsByUserId(
    &ranking2.DescribeClusterRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingsByUserId(
        (new DescribeClusterRankingsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeClusterRankingsByUserIdResult;

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

try {
    DescribeClusterRankingsByUserIdResult result = client.describeClusterRankingsByUserId(
        new DescribeClusterRankingsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ClusterRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeClusterRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithClusterName("cluster-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_cluster_rankings_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_rankings_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

getClusterRanking

Get Cluster Ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
clusterNamestring
~ 1024 charsCluster Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemClusterRankingDataCluster Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRanking(
    &ranking2.GetClusterRankingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getClusterRanking(
        (new GetClusterRankingRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withClusterName("cluster-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingRequest;
import io.gs2.ranking2.result.GetClusterRankingResult;

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

try {
    GetClusterRankingResult result = client.getClusterRanking(
        new GetClusterRankingRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
    );
    ClusterRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_cluster_ranking(
        ranking2.GetClusterRankingRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_cluster_name('cluster-0001')
            .with_access_token('accessToken-0001')
            .with_season(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    accessToken="accessToken-0001",
    season=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;

getClusterRankingByUserId

Get Cluster Ranking by specifying the user ID

Request

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

Result

TypeDescription
itemClusterRankingDataCluster Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingByUserId(
    &ranking2.GetClusterRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        ClusterName: pointy.String("cluster-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetClusterRankingByUserIdResult result = client.getClusterRankingByUserId(
        new GetClusterRankingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withClusterName("cluster-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    ClusterRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    clusterName="cluster-0001",
    userId="user-0001",
    season=nil,
    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
item = result.item;

describeSubscribes

Get list of Subscribe Target User IDs

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeUser>List of Subscribe Target User IDs
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribes(
    &ranking2.DescribeSubscribesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribesRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribes(
        (new DescribeSubscribesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribesRequest;
import io.gs2.ranking2.result.DescribeSubscribesResult;

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

try {
    DescribeSubscribesResult result = client.describeSubscribes(
        new DescribeSubscribesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeUser> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribesResult> asyncResult = null;
yield return client.DescribeSubscribes(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_subscribes(
        ranking2.DescribeSubscribesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribes({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribes_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    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;

describeSubscribesByUserId

Get list of Subscribe Target User IDs specifying User ID

Request

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

Result

TypeDescription
itemsList<SubscribeUser>List of Subscribe Target User IDs
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribesByUserId(
    &ranking2.DescribeSubscribesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribesByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribesByUserId(
        (new DescribeSubscribesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribesByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribesByUserIdResult;

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

try {
    DescribeSubscribesByUserIdResult result = client.describeSubscribesByUserId(
        new DescribeSubscribesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeUser> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribesByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribesByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_subscribes_by_user_id(
        ranking2.DescribeSubscribesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribes_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribes_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

addSubscribe

Register Subscribe Target User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
targetUserIdstring
~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserRegistered Subscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.AddSubscribe(
    &ranking2.AddSubscribeRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\AddSubscribeRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->addSubscribe(
        (new AddSubscribeRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.AddSubscribeRequest;
import io.gs2.ranking2.result.AddSubscribeResult;

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

try {
    AddSubscribeResult result = client.addSubscribe(
        new AddSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

try {
    const result = await client.addSubscribe(
        new Gs2Ranking2.AddSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.add_subscribe(
        ranking2.AddSubscribeRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.add_subscribe({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.add_subscribe_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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;

addSubscribeByUserId

Register Subscribe Target User ID specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
targetUserIdstring
~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserRegistered Subscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.AddSubscribeByUserId(
    &ranking2.AddSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\AddSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->addSubscribeByUserId(
        (new AddSubscribeByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.AddSubscribeByUserIdRequest;
import io.gs2.ranking2.result.AddSubscribeByUserIdResult;

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

try {
    AddSubscribeByUserIdResult result = client.addSubscribeByUserId(
        new AddSubscribeByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.add_subscribe_by_user_id(
        ranking2.AddSubscribeByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.add_subscribe_by_user_id({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.add_subscribe_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    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
item = result.item;

describeSubscribeRankingScores

Get list of Subscribe Ranking Scores

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring~ 128 charsRanking Name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingScore>List of Subscribe Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingScores(
    &ranking2.DescribeSubscribeRankingScoresRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingScoresRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingScores(
        (new DescribeSubscribeRankingScoresRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingScoresRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingScoresResult;

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

try {
    DescribeSubscribeRankingScoresResult result = client.describeSubscribeRankingScores(
        new DescribeSubscribeRankingScoresRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresResult> asyncResult = null;
yield return client.DescribeSubscribeRankingScores(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_subscribe_ranking_scores(
        ranking2.DescribeSubscribeRankingScoresRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_ranking_scores({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_ranking_scores_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    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;

describeSubscribeRankingScoresByUserId

Get list of Subscribe Ranking Scores specifying User ID

Request

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

Result

TypeDescription
itemsList<SubscribeRankingScore>List of Subscribe Ranking Scores
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingScoresByUserId(
    &ranking2.DescribeSubscribeRankingScoresByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingScoresByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingScoresByUserId(
        (new DescribeSubscribeRankingScoresByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingScoresByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingScoresByUserIdResult;

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

try {
    DescribeSubscribeRankingScoresByUserIdResult result = client.describeSubscribeRankingScoresByUserId(
        new DescribeSubscribeRankingScoresByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeRankingScore> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingScoresByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribeRankingScoresByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingScoresByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_subscribe_ranking_scores_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_ranking_scores_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

putSubscribeRankingScore

Register Subscribe Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata

Result

TypeDescription
itemSubscribeRankingScoreRegistered Subscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutSubscribeRankingScore(
    &ranking2.PutSubscribeRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Score: pointy.Int64(100),
        Metadata: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutSubscribeRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->putSubscribeRankingScore(
        (new PutSubscribeRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withScore(100)
            ->withMetadata(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.PutSubscribeRankingScoreRequest;
import io.gs2.ranking2.result.PutSubscribeRankingScoreResult;

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

try {
    PutSubscribeRankingScoreResult result = client.putSubscribeRankingScore(
        new PutSubscribeRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withScore(100L)
            .withMetadata(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.put_subscribe_ranking_score(
        ranking2.PutSubscribeRankingScoreRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_score(100)
            .with_metadata(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_subscribe_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    score=100,
    metadata=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;

putSubscribeRankingScoreByUserId

Register Subscribe Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
scorelong
0 ~ 9223372036854775805Score
metadatastring~ 512 charsMetadata
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreRegistered Subscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.PutSubscribeRankingScoreByUserId(
    &ranking2.PutSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Score: nil,
        Metadata: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\PutSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    PutSubscribeRankingScoreByUserIdResult result = client.putSubscribeRankingScoreByUserId(
        new PutSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withScore(null)
            .withMetadata(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.put_subscribe_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    score=nil,
    metadata=nil,
    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
item = result.item;

getSubscribeRankingScore

Get Subscribe Ranking Score

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingScore(
    &ranking2.GetSubscribeRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: pointy.Int64(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingScore(
        (new GetSubscribeRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(0)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingScoreRequest;
import io.gs2.ranking2.result.GetSubscribeRankingScoreResult;

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

try {
    GetSubscribeRankingScoreResult result = client.getSubscribeRankingScore(
        new GetSubscribeRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(0L)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_subscribe_ranking_score(
        ranking2.GetSubscribeRankingScoreRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_season(0)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_ranking_score_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=0,
})

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;

getSubscribeRankingScoreByUserId

Get Subscribe Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingScoreByUserId(
    &ranking2.GetSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetSubscribeRankingScoreByUserIdResult result = client.getSubscribeRankingScoreByUserId(
        new GetSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    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
item = result.item;

deleteSubscribeRankingScoreByUserId

Delete Subscribe Ranking Score specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreDeleted Subscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeRankingScoreByUserId(
    &ranking2.DeleteSubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: pointy.Int64(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    DeleteSubscribeRankingScoreByUserIdResult result = client.deleteSubscribeRankingScoreByUserId(
        new DeleteSubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(0L)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_subscribe_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=0,
    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
item = result.item;

verifySubscribeRankingScore

Verify the score of the subscribe ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifySubscribeRankingScore(
    &ranking2.VerifySubscribeRankingScoreRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: 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\VerifySubscribeRankingScoreRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifySubscribeRankingScore(
        (new VerifySubscribeRankingScoreRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(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.VerifySubscribeRankingScoreRequest;
import io.gs2.ranking2.result.VerifySubscribeRankingScoreResult;

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

try {
    VerifySubscribeRankingScoreResult result = client.verifySubscribeRankingScore(
        new VerifySubscribeRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifySubscribeRankingScoreResult> asyncResult = null;
yield return client.VerifySubscribeRankingScore(
    new Gs2.Gs2Ranking2.Request.VerifySubscribeRankingScoreRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(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.verifySubscribeRankingScore(
        new Gs2Ranking2.VerifySubscribeRankingScoreRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(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.verify_subscribe_ranking_score(
        ranking2.VerifySubscribeRankingScoreRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_subscribe_ranking_score({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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.verify_subscribe_ranking_score_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=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;

verifySubscribeRankingScoreByUserId

Verify the score of the subscribe ranking specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
userIdstring
~ 128 charsUser Id
rankingNamestring
~ 128 charsRanking Name
verifyTypeString Enum
enum {
  “less”,
  “lessEqual”,
  “greater”,
  “greaterEqual”,
  “equal”,
  “notEqual”
}
~ 128 charsType of verification
Enumerator String DefinitionDescription
“less”Possession quantity is less than the specified value
“lessEqual”Possession quantity is less than or equal to the specified value
“greater”Possession quantity is greater than the specified value
“greaterEqual”Possession quantity is greater than or equal to the specified value
“equal”Possession quantity is equal to the specified value
“notEqual”Possession quantity is not equal to the specified value
seasonlong0 ~ 9223372036854775805Season
scorelong
0 ~ 9223372036854775805Score
multiplyValueSpecifyingQuantitybool
trueWhether to multiply the value used for verification when specifying the quantity
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingScoreSubscribe Ranking Score

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.VerifySubscribeRankingScoreByUserId(
    &ranking2.VerifySubscribeRankingScoreByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        VerifyType: pointy.String("less"),
        Season: nil,
        Score: pointy.Int64(100),
        MultiplyValueSpecifyingQuantity: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\VerifySubscribeRankingScoreByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->verifySubscribeRankingScoreByUserId(
        (new VerifySubscribeRankingScoreByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withVerifyType("less")
            ->withSeason(null)
            ->withScore(100)
            ->withMultiplyValueSpecifyingQuantity(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.VerifySubscribeRankingScoreByUserIdRequest;
import io.gs2.ranking2.result.VerifySubscribeRankingScoreByUserIdResult;

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

try {
    VerifySubscribeRankingScoreByUserIdResult result = client.verifySubscribeRankingScoreByUserId(
        new VerifySubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100L)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingScore item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.VerifySubscribeRankingScoreByUserIdResult> asyncResult = null;
yield return client.VerifySubscribeRankingScoreByUserId(
    new Gs2.Gs2Ranking2.Request.VerifySubscribeRankingScoreByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithVerifyType("less")
        .WithSeason(null)
        .WithScore(100L)
        .WithMultiplyValueSpecifyingQuantity(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

try {
    const result = await client.verifySubscribeRankingScoreByUserId(
        new Gs2Ranking2.VerifySubscribeRankingScoreByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withVerifyType("less")
            .withSeason(null)
            .withScore(100)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.verify_subscribe_ranking_score_by_user_id(
        ranking2.VerifySubscribeRankingScoreByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_ranking_name('ranking-0001')
            .with_verify_type('less')
            .with_season(None)
            .with_score(100)
            .with_multiply_value_specifying_quantity(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.verify_subscribe_ranking_score_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.verify_subscribe_ranking_score_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    verifyType="less",
    season=nil,
    score=100,
    multiplyValueSpecifyingQuantity=nil,
    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
item = result.item;

describeSubscribeRankings

Get list of Subscribe Rankings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
accessTokenstring
~ 128 charsAccess token
rankingNamestring
~ 128 charsRanking Name
seasonlong0 ~ 9223372036854775805Season
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingData>List of Subscribe Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankings(
    &ranking2.DescribeSubscribeRankingsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankings(
        (new DescribeSubscribeRankingsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingsRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingsResult;

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

try {
    DescribeSubscribeRankingsResult result = client.describeSubscribeRankings(
        new DescribeSubscribeRankingsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsResult> asyncResult = null;
yield return client.DescribeSubscribeRankings(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

try:
    result = client.describe_subscribe_rankings(
        ranking2.DescribeSubscribeRankingsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_ranking_name('ranking-0001')
            .with_season(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_rankings({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_rankings_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    rankingName="ranking-0001",
    season=nil,
    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;

describeSubscribeRankingsByUserId

Get list of Subscribe Rankings by specifying the user ID

Request

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

Result

TypeDescription
itemsList<SubscribeRankingData>List of Subscribe Rankings
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingsByUserId(
    &ranking2.DescribeSubscribeRankingsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        RankingName: pointy.String("ranking-0001"),
        Season: nil,
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingsByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingsByUserId(
        (new DescribeSubscribeRankingsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withRankingName("ranking-0001")
            ->withSeason(null)
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingsByUserIdRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingsByUserIdResult;

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

try {
    DescribeSubscribeRankingsByUserIdResult result = client.describeSubscribeRankingsByUserId(
        new DescribeSubscribeRankingsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withRankingName("ranking-0001")
            .withSeason(null)
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<SubscribeRankingData> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingsByUserIdResult> asyncResult = null;
yield return client.DescribeSubscribeRankingsByUserId(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithRankingName("ranking-0001")
        .WithSeason(null)
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

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

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

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

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

api_result = client.describe_subscribe_rankings_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_rankings_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    rankingName="ranking-0001",
    season=nil,
    pageToken=nil,
    limit=nil,
    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
items = result.items;
nextPageToken = result.nextPageToken;

getSubscribeRanking

Get Subscribe Ranking

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
seasonlong0 ~ 9223372036854775805Season
scorerUserIdstring~ 128 charsScorer User ID

Result

TypeDescription
itemSubscribeRankingDataSubscribe Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRanking(
    &ranking2.GetSubscribeRankingRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Season: nil,
        ScorerUserId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribeRanking(
        (new GetSubscribeRankingRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withSeason(null)
            ->withScorerUserId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingRequest;
import io.gs2.ranking2.result.GetSubscribeRankingResult;

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

try {
    GetSubscribeRankingResult result = client.getSubscribeRanking(
        new GetSubscribeRankingRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withSeason(null)
            .withScorerUserId(null)
    );
    SubscribeRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_subscribe_ranking(
        ranking2.GetSubscribeRankingRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_season(None)
            .with_scorer_user_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=nil,
    scorerUserId=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_ranking_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    season=nil,
    scorerUserId=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;

getSubscribeRankingByUserId

Get Subscribe Ranking by specifying the user ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
seasonlong0 ~ 9223372036854775805Season
scorerUserIdstring~ 128 charsScorer User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeRankingDataSubscribe Ranking

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingByUserId(
    &ranking2.GetSubscribeRankingByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        Season: nil,
        ScorerUserId: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

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

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

try {
    GetSubscribeRankingByUserIdResult result = client.getSubscribeRankingByUserId(
        new GetSubscribeRankingByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withSeason(null)
            .withScorerUserId(null)
            .withTimeOffsetToken(null)
    );
    SubscribeRankingData item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_subscribe_ranking_by_user_id(
        ranking2.GetSubscribeRankingByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_season(None)
            .with_scorer_user_id(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

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

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_ranking_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    season=nil,
    scorerUserId=nil,
    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
item = result.item;

getSubscribe

Get Subscribe Target User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
targetUserIdstring
~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserSubscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribe(
    &ranking2.GetSubscribeRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribe(
        (new GetSubscribeRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRequest;
import io.gs2.ranking2.result.GetSubscribeResult;

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

try {
    GetSubscribeResult result = client.getSubscribe(
        new GetSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

try {
    const result = await client.getSubscribe(
        new Gs2Ranking2.GetSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.get_subscribe(
        ranking2.GetSubscribeRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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;

getSubscribeByUserId

Get Subscribe Target User ID specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
targetUserIdstring
~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserSubscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeByUserId(
    &ranking2.GetSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribeByUserId(
        (new GetSubscribeByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeByUserIdRequest;
import io.gs2.ranking2.result.GetSubscribeByUserIdResult;

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

try {
    GetSubscribeByUserIdResult result = client.getSubscribeByUserId(
        new GetSubscribeByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.get_subscribe_by_user_id(
        ranking2.GetSubscribeByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_by_user_id({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    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
item = result.item;

deleteSubscribe

Delete Subscribe Target User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
accessTokenstring
~ 128 charsAccess token
targetUserIdstring
~ 128 charsSubscribe Target User ID

Result

TypeDescription
itemSubscribeUserDeleted Subscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribe(
    &ranking2.DeleteSubscribeRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        TargetUserId: pointy.String("user-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteSubscribe(
        (new DeleteSubscribeRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withAccessToken("accessToken-0001")
            ->withTargetUserId("user-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeRequest;
import io.gs2.ranking2.result.DeleteSubscribeResult;

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

try {
    DeleteSubscribeResult result = client.deleteSubscribe(
        new DeleteSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

try {
    const result = await client.deleteSubscribe(
        new Gs2Ranking2.DeleteSubscribeRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withAccessToken("accessToken-0001")
            .withTargetUserId("user-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

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

try:
    result = client.delete_subscribe(
        ranking2.DeleteSubscribeRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_access_token('accessToken-0001')
            .with_target_user_id('user-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_subscribe_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    accessToken="accessToken-0001",
    targetUserId="user-0002",
})

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;

deleteSubscribeByUserId

Delete Subscribe Target User ID specifying User ID

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
userIdstring
~ 128 charsUser Id
targetUserIdstring
~ 128 charsSubscribe Target User ID
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemSubscribeUserDeleted Subscribe Target User ID

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeByUserId(
    &ranking2.DeleteSubscribeByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
        UserId: pointy.String("user-0001"),
        TargetUserId: pointy.String("user-0002"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeByUserIdRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteSubscribeByUserId(
        (new DeleteSubscribeByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
            ->withUserId("user-0001")
            ->withTargetUserId("user-0002")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeByUserIdRequest;
import io.gs2.ranking2.result.DeleteSubscribeByUserIdResult;

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

try {
    DeleteSubscribeByUserIdResult result = client.deleteSubscribeByUserId(
        new DeleteSubscribeByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
            .withUserId("user-0001")
            .withTargetUserId("user-0002")
            .withTimeOffsetToken(null)
    );
    SubscribeUser item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

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

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

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

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

try:
    result = client.delete_subscribe_by_user_id(
        ranking2.DeleteSubscribeByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
            .with_user_id('user-0001')
            .with_target_user_id('user-0002')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe_by_user_id({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_subscribe_by_user_id_async({
    namespaceName="namespace-0001",
    rankingName="ranking-0001",
    userId="user-0001",
    targetUserId="user-0002",
    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
item = result.item;

describeGlobalRankingModels

Get list of Global Ranking Models

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemsList<GlobalRankingModel>List of Global Ranking Models

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingModels(
    &ranking2.DescribeGlobalRankingModelsRequest {
        NamespaceName: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingModelsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $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;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelGlobal Ranking Model

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingModel(
    &ranking2.GetGlobalRankingModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getGlobalRankingModel(
        (new GetGlobalRankingModelRequest())
            ->withNamespaceName("namespace-0001")
            ->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("namespace-0001")
            .withRankingName("ranking-0001")
    );
    GlobalRankingModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingModelResult> asyncResult = null;
yield return client.GetGlobalRankingModel(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingModelRequest()
        .WithNamespaceName("namespace-0001")
        .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("namespace-0001")
            .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('namespace-0001')
            .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="namespace-0001",
    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="namespace-0001",
    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;

describeClusterRankingModels

Get list of Cluster Ranking Models

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemsList<ClusterRankingModel>List of Cluster Ranking Models

Implementation Example

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

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

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

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingModels(
    &ranking2.DescribeClusterRankingModelsRequest {
        NamespaceName: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingModelsRequest;

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

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingModels(
        (new DescribeClusterRankingModelsRequest())
            ->withNamespaceName(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingModelsRequest;
import io.gs2.ranking2.result.DescribeClusterRankingModelsResult;

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

try {
    DescribeClusterRankingModelsResult result = client.describeClusterRankingModels(
        new DescribeClusterRankingModelsRequest()
            .withNamespaceName(null)
    );
    List<ClusterRankingModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelsResult> asyncResult = null;
yield return client.DescribeClusterRankingModels(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelsRequest()
        .WithNamespaceName(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.describeClusterRankingModels(
        new Gs2Ranking2.DescribeClusterRankingModelsRequest()
            .withNamespaceName(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.describe_cluster_ranking_models(
        ranking2.DescribeClusterRankingModelsRequest()
            .with_namespace_name(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_models({
    namespaceName=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_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;

getClusterRankingModel

Get Cluster Ranking Model

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelCluster Ranking Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingModel(
    &ranking2.GetClusterRankingModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getClusterRankingModel(
        (new GetClusterRankingModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingModelRequest;
import io.gs2.ranking2.result.GetClusterRankingModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    GetClusterRankingModelResult result = client.getClusterRankingModel(
        new GetClusterRankingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
    );
    ClusterRankingModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingModelResult> asyncResult = null;
yield return client.GetClusterRankingModel(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("ranking-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.getClusterRankingModel(
        new Gs2Ranking2.GetClusterRankingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.get_cluster_ranking_model(
        ranking2.GetClusterRankingModelRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_model({
    namespaceName="namespace-0001",
    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_cluster_ranking_model_async({
    namespaceName="namespace-0001",
    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;

describeSubscribeRankingModels

Get list of Subscribe Ranking Models

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemsList<SubscribeRankingModel>List of Subscribe Ranking Models

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingModels(
    &ranking2.DescribeSubscribeRankingModelsRequest {
        NamespaceName: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingModels(
        (new DescribeSubscribeRankingModelsRequest())
            ->withNamespaceName(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingModelsRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    DescribeSubscribeRankingModelsResult result = client.describeSubscribeRankingModels(
        new DescribeSubscribeRankingModelsRequest()
            .withNamespaceName(null)
    );
    List<SubscribeRankingModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelsResult> asyncResult = null;
yield return client.DescribeSubscribeRankingModels(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelsRequest()
        .WithNamespaceName(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.describeSubscribeRankingModels(
        new Gs2Ranking2.DescribeSubscribeRankingModelsRequest()
            .withNamespaceName(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.describe_subscribe_ranking_models(
        ranking2.DescribeSubscribeRankingModelsRequest()
            .with_namespace_name(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_ranking_models({
    namespaceName=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_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;

getSubscribeRankingModel

Get Subscribe Ranking Model

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelSubscribe Ranking Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingModel(
    &ranking2.GetSubscribeRankingModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("ranking-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingModel(
        (new GetSubscribeRankingModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("ranking-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingModelRequest;
import io.gs2.ranking2.result.GetSubscribeRankingModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    GetSubscribeRankingModelResult result = client.getSubscribeRankingModel(
        new GetSubscribeRankingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
    );
    SubscribeRankingModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelResult> asyncResult = null;
yield return client.GetSubscribeRankingModel(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("ranking-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.getSubscribeRankingModel(
        new Gs2Ranking2.GetSubscribeRankingModelRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("ranking-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.get_subscribe_ranking_model(
        ranking2.GetSubscribeRankingModelRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('ranking-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_model({
    namespaceName="namespace-0001",
    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_subscribe_ranking_model_async({
    namespaceName="namespace-0001",
    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;

exportMaster

Export master data for currently available ranking settings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemCurrentRankingMasterCurrently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &ranking2.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-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\ExportMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName("namespace-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.ExportMasterRequest;
import io.gs2.ranking2.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentRankingMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Ranking2.Request.ExportMasterRequest()
        .WithNamespaceName("namespace-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.exportMaster(
        new Gs2Ranking2.ExportMasterRequest()
            .withNamespaceName("namespace-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.export_master(
        ranking2.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.export_master({
    namespaceName="namespace-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.export_master_async({
    namespaceName="namespace-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;

getCurrentRankingMaster

Get the currently available ranking settings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
itemCurrentRankingMasterCurrently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetCurrentRankingMaster(
    &ranking2.GetCurrentRankingMasterRequest {
        NamespaceName: pointy.String("namespace-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\GetCurrentRankingMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getCurrentRankingMaster(
        (new GetCurrentRankingMasterRequest())
            ->withNamespaceName("namespace-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.GetCurrentRankingMasterRequest;
import io.gs2.ranking2.result.GetCurrentRankingMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    GetCurrentRankingMasterResult result = client.getCurrentRankingMaster(
        new GetCurrentRankingMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentRankingMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetCurrentRankingMasterResult> asyncResult = null;
yield return client.GetCurrentRankingMaster(
    new Gs2.Gs2Ranking2.Request.GetCurrentRankingMasterRequest()
        .WithNamespaceName("namespace-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.getCurrentRankingMaster(
        new Gs2Ranking2.GetCurrentRankingMasterRequest()
            .withNamespaceName("namespace-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_current_ranking_master(
        ranking2.GetCurrentRankingMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_current_ranking_master({
    namespaceName="namespace-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_current_ranking_master_async({
    namespaceName="namespace-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;

preUpdateCurrentRankingMaster

Update the currently available model settings (3-phase version)

When uploading master data larger than 1MB, the update is performed in 3 phases.

  1. Execute this API to obtain a token and URL for uploading.
  2. Upload the master data to the obtained URL.
  3. Execute UpdateCurrentModelMaster with the token used for the upload to reflect the master data.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name

Result

TypeDescription
uploadTokenstringToken used to reflect results after upload
uploadUrlstringURL used to upload

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.PreUpdateCurrentRankingMaster(
    &ranking2.PreUpdateCurrentRankingMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
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\PreUpdateCurrentRankingMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentRankingMaster(
        (new PreUpdateCurrentRankingMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $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.PreUpdateCurrentRankingMasterRequest;
import io.gs2.ranking2.result.PreUpdateCurrentRankingMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    PreUpdateCurrentRankingMasterResult result = client.preUpdateCurrentRankingMaster(
        new PreUpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.PreUpdateCurrentRankingMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentRankingMaster(
    new Gs2.Gs2Ranking2.Request.PreUpdateCurrentRankingMasterRequest()
        .WithNamespaceName("namespace-0001"),
    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.preUpdateCurrentRankingMaster(
        new Gs2Ranking2.PreUpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    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.pre_update_current_ranking_master(
        ranking2.PreUpdateCurrentRankingMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.pre_update_current_ranking_master({
    namespaceName="namespace-0001",
})

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.pre_update_current_ranking_master_async({
    namespaceName="namespace-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
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

updateCurrentRankingMaster

Update and currently available ranking settings

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
modeString Enum
enum {
  “direct”,
  “preUpload”
}
“direct”~ 128 charsUpdate mode
Enumerator String DefinitionDescription
“direct”Directly update the settings
“preUpload”Upload the settings and then update
settingsstring{mode} == “direct”
✓*
~ 5242880 charsMaster Data
* Required if mode is “direct”
uploadTokenstring{mode} == “preUpload”
✓*
~ 1024 charsToken used to reflect results after upload
* Required if mode is “preUpload”

Result

TypeDescription
itemCurrentRankingMasterUpdated and currently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRankingMaster(
    &ranking2.UpdateCurrentRankingMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: nil,
        Settings: pointy.String("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}"),
        UploadToken: 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\UpdateCurrentRankingMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateCurrentRankingMaster(
        (new UpdateCurrentRankingMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode(null)
            ->withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
            ->withUploadToken(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.UpdateCurrentRankingMasterRequest;
import io.gs2.ranking2.result.UpdateCurrentRankingMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    UpdateCurrentRankingMasterResult result = client.updateCurrentRankingMaster(
        new UpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode(null)
            .withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
            .withUploadToken(null)
    );
    CurrentRankingMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterResult> asyncResult = null;
yield return client.UpdateCurrentRankingMaster(
    new Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode(null)
        .WithSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
        .WithUploadToken(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.updateCurrentRankingMaster(
        new Gs2Ranking2.UpdateCurrentRankingMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode(null)
            .withSettings("{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}")
            .withUploadToken(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_current_ranking_master(
        ranking2.UpdateCurrentRankingMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode(None)
            .with_settings('{"version": "2024-05-30", "globalRankingModels": [{"name": "ranking-0001", "orderDirection": "asc"}, {"name": "ranking-0002", "orderDirection": "desc"}], "clusterRankingModels": [{"name": "ranking-0001", "clusterType": "Raw", "orderDirection": "asc"}, {"name": "ranking-0002", "clusterType": "Gs2Guild::Guild", "orderDirection": "desc"}], "subscribeRankingModels": [{"name": "ranking-0001", "orderDirection": "asc"}, {"name": "ranking-0002", "orderDirection": "desc"}]}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_current_ranking_master({
    namespaceName="namespace-0001",
    mode=nil,
    settings="{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}",
    uploadToken=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_current_ranking_master_async({
    namespaceName="namespace-0001",
    mode=nil,
    settings="{\"version\": \"2024-05-30\", \"globalRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}], \"clusterRankingModels\": [{\"name\": \"ranking-0001\", \"clusterType\": \"Raw\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"clusterType\": \"Gs2Guild::Guild\", \"orderDirection\": \"desc\"}], \"subscribeRankingModels\": [{\"name\": \"ranking-0001\", \"orderDirection\": \"asc\"}, {\"name\": \"ranking-0002\", \"orderDirection\": \"desc\"}]}",
    uploadToken=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;

updateCurrentRankingMasterFromGitHub

Update the currently active ranking settings from GitHub

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
checkoutSettingGitHubCheckoutSetting
Setup to check out master data from GitHub

Result

TypeDescription
itemCurrentRankingMasterUpdated and currently available ranking settings

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateCurrentRankingMasterFromGitHub(
    &ranking2.UpdateCurrentRankingMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &ranking2.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("apiKeyId-0001"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateCurrentRankingMasterFromGitHubRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateCurrentRankingMasterFromGitHub(
        (new UpdateCurrentRankingMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateCurrentRankingMasterFromGitHubRequest;
import io.gs2.ranking2.result.UpdateCurrentRankingMasterFromGitHubResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    UpdateCurrentRankingMasterFromGitHubResult result = client.updateCurrentRankingMasterFromGitHub(
        new UpdateCurrentRankingMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentRankingMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateCurrentRankingMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentRankingMasterFromGitHub(
    new Gs2.Gs2Ranking2.Request.UpdateCurrentRankingMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Ranking2.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.updateCurrentRankingMasterFromGitHub(
        new Gs2Ranking2.UpdateCurrentRankingMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Ranking2.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.update_current_ranking_master_from_git_hub(
        ranking2.UpdateCurrentRankingMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(ranking2.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_current_ranking_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.update_current_ranking_master_from_git_hub_async({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namePrefixstring~ 64 charsFilter by global ranking model name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<GlobalRankingModelMaster>List of Global Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeGlobalRankingModelMasters(
    &ranking2.DescribeGlobalRankingModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeGlobalRankingModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeGlobalRankingModelMasters(
        (new DescribeGlobalRankingModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.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("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<GlobalRankingModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeGlobalRankingModelMastersResult> asyncResult = null;
yield return client.DescribeGlobalRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeGlobalRankingModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.describeGlobalRankingModelMasters(
        new Gs2Ranking2.DescribeGlobalRankingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.describe_global_ranking_model_masters(
        ranking2.DescribeGlobalRankingModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_global_ranking_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_global_ranking_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule EventGRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule EventGRN

Result

TypeDescription
itemGlobalRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateGlobalRankingModelMaster(
    &ranking2.CreateGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("global-0001"),
        Description: nil,
        Metadata: nil,
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        OrderDirection: pointy.String("asc"),
        RankingRewards: nil,
        RewardCalculationIndex: 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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createGlobalRankingModelMaster(
        (new CreateGlobalRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("global-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withOrderDirection("asc")
            ->withRankingRewards(null)
            ->withRewardCalculationIndex(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("namespace-0001")
            .withName("global-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    GlobalRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.CreateGlobalRankingModelMasterResult> asyncResult = null;
yield return client.CreateGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("global-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithOrderDirection("asc")
        .WithRankingRewards(null)
        .WithRewardCalculationIndex(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("namespace-0001")
            .withName("global-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(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('namespace-0001')
            .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_reward_calculation_index(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="namespace-0001",
    name="global-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    rankingRewards=nil,
    rewardCalculationIndex=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="namespace-0001",
    name="global-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    rankingRewards=nil,
    rewardCalculationIndex=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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelMasterGlobal Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetGlobalRankingModelMaster(
    &ranking2.GetGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getGlobalRankingModelMaster(
        (new GetGlobalRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->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("namespace-0001")
            .withRankingName("global-0001")
    );
    GlobalRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetGlobalRankingModelMasterResult> asyncResult = null;
yield return client.GetGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .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("namespace-0001")
            .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('namespace-0001')
            .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="namespace-0001",
    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="namespace-0001",
    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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule EventGRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule EventGRN

Result

TypeDescription
itemGlobalRankingModelMasterUpdated Global Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateGlobalRankingModelMaster(
    &ranking2.UpdateGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        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,
        RewardCalculationIndex: 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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateGlobalRankingModelMaster(
        (new UpdateGlobalRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("global-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withOrderDirection("desc")
            ->withRankingRewards(null)
            ->withRewardCalculationIndex(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("namespace-0001")
            .withRankingName("global-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    GlobalRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateGlobalRankingModelMasterResult> asyncResult = null;
yield return client.UpdateGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("global-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithOrderDirection("desc")
        .WithRankingRewards(null)
        .WithRewardCalculationIndex(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("namespace-0001")
            .withRankingName("global-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(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('namespace-0001')
            .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_reward_calculation_index(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="namespace-0001",
    rankingName="global-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    rankingRewards=nil,
    rewardCalculationIndex=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="namespace-0001",
    rankingName="global-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    rankingRewards=nil,
    rewardCalculationIndex=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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemGlobalRankingModelMasterDeleted Global Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteGlobalRankingModelMaster(
    &ranking2.DeleteGlobalRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        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 Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteGlobalRankingModelMaster(
        (new DeleteGlobalRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->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("namespace-0001")
            .withRankingName("global-0001")
    );
    GlobalRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteGlobalRankingModelMasterResult> asyncResult = null;
yield return client.DeleteGlobalRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteGlobalRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .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("namespace-0001")
            .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('namespace-0001')
            .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="namespace-0001",
    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="namespace-0001",
    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;

describeClusterRankingModelMasters

Get list of cluster ranking model masters

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namePrefixstring~ 64 charsFilter by cluster ranking model name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ClusterRankingModelMaster>List of Cluster Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeClusterRankingModelMasters(
    &ranking2.DescribeClusterRankingModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeClusterRankingModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeClusterRankingModelMasters(
        (new DescribeClusterRankingModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeClusterRankingModelMastersRequest;
import io.gs2.ranking2.result.DescribeClusterRankingModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    DescribeClusterRankingModelMastersResult result = client.describeClusterRankingModelMasters(
        new DescribeClusterRankingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ClusterRankingModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeClusterRankingModelMastersResult> asyncResult = null;
yield return client.DescribeClusterRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeClusterRankingModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.describeClusterRankingModelMasters(
        new Gs2Ranking2.DescribeClusterRankingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.describe_cluster_ranking_model_masters(
        ranking2.DescribeClusterRankingModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_cluster_ranking_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_cluster_ranking_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    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;

createClusterRankingModelMaster

Create Cluster Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
~ 128 charsCluster Type
Enumerator String DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN

Result

TypeDescription
itemClusterRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateClusterRankingModelMaster(
    &ranking2.CreateClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("cluster-0001"),
        Description: nil,
        Metadata: nil,
        ClusterType: pointy.String("Raw"),
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        OrderDirection: pointy.String("asc"),
        RankingRewards: nil,
        RewardCalculationIndex: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateClusterRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createClusterRankingModelMaster(
        (new CreateClusterRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("cluster-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withClusterType("Raw")
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withOrderDirection("asc")
            ->withRankingRewards(null)
            ->withRewardCalculationIndex(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.CreateClusterRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    CreateClusterRankingModelMasterResult result = client.createClusterRankingModelMaster(
        new CreateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("cluster-0001")
            .withDescription(null)
            .withMetadata(null)
            .withClusterType("Raw")
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    ClusterRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.CreateClusterRankingModelMasterResult> asyncResult = null;
yield return client.CreateClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("cluster-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithClusterType("Raw")
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithOrderDirection("asc")
        .WithRankingRewards(null)
        .WithRewardCalculationIndex(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.createClusterRankingModelMaster(
        new Gs2Ranking2.CreateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("cluster-0001")
            .withDescription(null)
            .withMetadata(null)
            .withClusterType("Raw")
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.create_cluster_ranking_model_master(
        ranking2.CreateClusterRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('cluster-0001')
            .with_description(None)
            .with_metadata(None)
            .with_cluster_type('Raw')
            .with_minimum_value(None)
            .with_maximum_value(None)
            .with_sum(None)
            .with_order_direction('asc')
            .with_ranking_rewards(None)
            .with_reward_calculation_index(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_cluster_ranking_model_master({
    namespaceName="namespace-0001",
    name="cluster-0001",
    description=nil,
    metadata=nil,
    clusterType="Raw",
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    rankingRewards=nil,
    rewardCalculationIndex=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_cluster_ranking_model_master_async({
    namespaceName="namespace-0001",
    name="cluster-0001",
    description=nil,
    metadata=nil,
    clusterType="Raw",
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    rankingRewards=nil,
    rewardCalculationIndex=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;

getClusterRankingModelMaster

Get Cluster Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelMasterCluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetClusterRankingModelMaster(
    &ranking2.GetClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("cluster-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetClusterRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getClusterRankingModelMaster(
        (new GetClusterRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("cluster-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.GetClusterRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    GetClusterRankingModelMasterResult result = client.getClusterRankingModelMaster(
        new GetClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
    );
    ClusterRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetClusterRankingModelMasterResult> asyncResult = null;
yield return client.GetClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("cluster-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.getClusterRankingModelMaster(
        new Gs2Ranking2.GetClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.get_cluster_ranking_model_master(
        ranking2.GetClusterRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('cluster-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_cluster_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="cluster-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_cluster_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="cluster-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;

updateClusterRankingModelMaster

Update Cluster Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
clusterTypeString Enum
enum {
  “Raw”,
  “Gs2Guild::Guild”,
  “Gs2Matchmaking::SeasonGathering”
}
~ 128 charsCluster Type
Enumerator String DefinitionDescription
“Raw”No verification
“Gs2Guild::Guild”GS2-Guild Guild
“Gs2Matchmaking::SeasonGathering”GS2-Matchmaking Season Gathering
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
rankingRewardsList<RankingReward>{entryPeriodEventId} != null[]0 ~ 100 itemsList of ranking rewards
rewardCalculationIndexString Enum
enum {
  “rank”,
  “index”
}
“rank”~ 128 charsReward calculation index
Enumerator String DefinitionDescription
“rank”Determine rewards based on rank
“index”Determine rewards based on index
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered GS2-Schedule Event GRN
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed GS2-Schedule Event GRN

Result

TypeDescription
itemClusterRankingModelMasterUpdated Cluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateClusterRankingModelMaster(
    &ranking2.UpdateClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("cluster-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("CATEGORY_0001"),
        ClusterType: pointy.String("Gs2Guild::Guild"),
        MinimumValue: pointy.Int64(100),
        MaximumValue: pointy.Int64(10000),
        Sum: nil,
        OrderDirection: pointy.String("desc"),
        RankingRewards: nil,
        RewardCalculationIndex: nil,
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateClusterRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateClusterRankingModelMaster(
        (new UpdateClusterRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("cluster-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withClusterType("Gs2Guild::Guild")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withOrderDirection("desc")
            ->withRankingRewards(null)
            ->withRewardCalculationIndex(null)
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.UpdateClusterRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    UpdateClusterRankingModelMasterResult result = client.updateClusterRankingModelMaster(
        new UpdateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withClusterType("Gs2Guild::Guild")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    ClusterRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateClusterRankingModelMasterResult> asyncResult = null;
yield return client.UpdateClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("cluster-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithClusterType("Gs2Guild::Guild")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithOrderDirection("desc")
        .WithRankingRewards(null)
        .WithRewardCalculationIndex(null)
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.updateClusterRankingModelMaster(
        new Gs2Ranking2.UpdateClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withClusterType("Gs2Guild::Guild")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withOrderDirection("desc")
            .withRankingRewards(null)
            .withRewardCalculationIndex(null)
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.update_cluster_ranking_model_master(
        ranking2.UpdateClusterRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('cluster-0001')
            .with_description('description1')
            .with_metadata('CATEGORY_0001')
            .with_cluster_type('Gs2Guild::Guild')
            .with_minimum_value(100)
            .with_maximum_value(10000)
            .with_sum(None)
            .with_order_direction('desc')
            .with_ranking_rewards(None)
            .with_reward_calculation_index(None)
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_cluster_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="cluster-0001",
    description="description1",
    metadata="CATEGORY_0001",
    clusterType="Gs2Guild::Guild",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    rankingRewards=nil,
    rewardCalculationIndex=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_cluster_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="cluster-0001",
    description="description1",
    metadata="CATEGORY_0001",
    clusterType="Gs2Guild::Guild",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    rankingRewards=nil,
    rewardCalculationIndex=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;

deleteClusterRankingModelMaster

Delete Cluster Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemClusterRankingModelMasterDeleted Cluster Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteClusterRankingModelMaster(
    &ranking2.DeleteClusterRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("cluster-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteClusterRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteClusterRankingModelMaster(
        (new DeleteClusterRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("cluster-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteClusterRankingModelMasterRequest;
import io.gs2.ranking2.result.DeleteClusterRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    DeleteClusterRankingModelMasterResult result = client.deleteClusterRankingModelMaster(
        new DeleteClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
    );
    ClusterRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteClusterRankingModelMasterResult> asyncResult = null;
yield return client.DeleteClusterRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteClusterRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("cluster-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.deleteClusterRankingModelMaster(
        new Gs2Ranking2.DeleteClusterRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("cluster-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.delete_cluster_ranking_model_master(
        ranking2.DeleteClusterRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('cluster-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_cluster_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="cluster-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_cluster_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="cluster-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;

describeSubscribeRankingModelMasters

Get list of subscribe ranking model masters

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namePrefixstring~ 64 charsFilter by subscribe ranking model name prefix
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint
301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<SubscribeRankingModelMaster>List of Subscribe Ranking Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DescribeSubscribeRankingModelMasters(
    &ranking2.DescribeSubscribeRankingModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DescribeSubscribeRankingModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->describeSubscribeRankingModelMasters(
        (new DescribeSubscribeRankingModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DescribeSubscribeRankingModelMastersRequest;
import io.gs2.ranking2.result.DescribeSubscribeRankingModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    DescribeSubscribeRankingModelMastersResult result = client.describeSubscribeRankingModelMasters(
        new DescribeSubscribeRankingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SubscribeRankingModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DescribeSubscribeRankingModelMastersResult> asyncResult = null;
yield return client.DescribeSubscribeRankingModelMasters(
    new Gs2.Gs2Ranking2.Request.DescribeSubscribeRankingModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.describeSubscribeRankingModelMasters(
        new Gs2Ranking2.DescribeSubscribeRankingModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.describe_subscribe_ranking_model_masters(
        ranking2.DescribeSubscribeRankingModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.describe_subscribe_ranking_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('ranking2')

api_result_handler = client.describe_subscribe_ranking_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    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;

createSubscribeRankingModelMaster

Create Subscribe Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
namestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed

Result

TypeDescription
itemSubscribeRankingModelMasterCreated category model master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.CreateSubscribeRankingModelMaster(
    &ranking2.CreateSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("subscribe-0001"),
        Description: nil,
        Metadata: nil,
        MinimumValue: nil,
        MaximumValue: nil,
        Sum: nil,
        OrderDirection: pointy.String("asc"),
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\CreateSubscribeRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->createSubscribeRankingModelMaster(
        (new CreateSubscribeRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("subscribe-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMinimumValue(null)
            ->withMaximumValue(null)
            ->withSum(null)
            ->withOrderDirection("asc")
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.CreateSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.CreateSubscribeRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    CreateSubscribeRankingModelMasterResult result = client.createSubscribeRankingModelMaster(
        new CreateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("subscribe-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    SubscribeRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.CreateSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.CreateSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.CreateSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("subscribe-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMinimumValue(null)
        .WithMaximumValue(null)
        .WithSum(null)
        .WithOrderDirection("asc")
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.createSubscribeRankingModelMaster(
        new Gs2Ranking2.CreateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("subscribe-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMinimumValue(null)
            .withMaximumValue(null)
            .withSum(null)
            .withOrderDirection("asc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.create_subscribe_ranking_model_master(
        ranking2.CreateSubscribeRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('subscribe-0001')
            .with_description(None)
            .with_metadata(None)
            .with_minimum_value(None)
            .with_maximum_value(None)
            .with_sum(None)
            .with_order_direction('asc')
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.create_subscribe_ranking_model_master({
    namespaceName="namespace-0001",
    name="subscribe-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.create_subscribe_ranking_model_master_async({
    namespaceName="namespace-0001",
    name="subscribe-0001",
    description=nil,
    metadata=nil,
    minimumValue=nil,
    maximumValue=nil,
    sum=nil,
    orderDirection="asc",
    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;

getSubscribeRankingModelMaster

Get Subscribe Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelMasterSubscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.GetSubscribeRankingModelMaster(
    &ranking2.GetSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("subscribe-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\GetSubscribeRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->getSubscribeRankingModelMaster(
        (new GetSubscribeRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("subscribe-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.GetSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.GetSubscribeRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    GetSubscribeRankingModelMasterResult result = client.getSubscribeRankingModelMaster(
        new GetSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
    );
    SubscribeRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.GetSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.GetSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.GetSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("subscribe-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.getSubscribeRankingModelMaster(
        new Gs2Ranking2.GetSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.get_subscribe_ranking_model_master(
        ranking2.GetSubscribeRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('subscribe-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.get_subscribe_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="subscribe-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.get_subscribe_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="subscribe-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;

updateSubscribeRankingModelMaster

Update Subscribe Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name
descriptionstring~ 1024 charsDescription
metadatastring~ 1024 charsMetadata
minimumValuelong0 ~ 9223372036854775805Minimum Score
maximumValuelong0 ~ 9223372036854775805Maximum Score
sumbool
falseAdd up the scores of put and compete for the total value.
orderDirectionString Enum
enum {
  “asc”,
  “desc”
}
~ 128 charsSort direction of scores
Enumerator String DefinitionDescription
“asc”ascending-order
“desc”descending-order
entryPeriodEventIdstring~ 1024 charsPeriod during which scores can be registered
accessPeriodEventIdstring~ 1024 charsPeriod during which ranking data can be accessed

Result

TypeDescription
itemSubscribeRankingModelMasterUpdated Subscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.UpdateSubscribeRankingModelMaster(
    &ranking2.UpdateSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("subscribe-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("CATEGORY_0001"),
        MinimumValue: pointy.Int64(100),
        MaximumValue: pointy.Int64(10000),
        Sum: nil,
        OrderDirection: pointy.String("desc"),
        EntryPeriodEventId: nil,
        AccessPeriodEventId: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\UpdateSubscribeRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->updateSubscribeRankingModelMaster(
        (new UpdateSubscribeRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("subscribe-0001")
            ->withDescription("description1")
            ->withMetadata("CATEGORY_0001")
            ->withMinimumValue(100)
            ->withMaximumValue(10000)
            ->withSum(null)
            ->withOrderDirection("desc")
            ->withEntryPeriodEventId(null)
            ->withAccessPeriodEventId(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.UpdateSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.UpdateSubscribeRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    UpdateSubscribeRankingModelMasterResult result = client.updateSubscribeRankingModelMaster(
        new UpdateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100L)
            .withMaximumValue(10000L)
            .withSum(null)
            .withOrderDirection("desc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    SubscribeRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.UpdateSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.UpdateSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.UpdateSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("subscribe-0001")
        .WithDescription("description1")
        .WithMetadata("CATEGORY_0001")
        .WithMinimumValue(100L)
        .WithMaximumValue(10000L)
        .WithSum(null)
        .WithOrderDirection("desc")
        .WithEntryPeriodEventId(null)
        .WithAccessPeriodEventId(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.updateSubscribeRankingModelMaster(
        new Gs2Ranking2.UpdateSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
            .withDescription("description1")
            .withMetadata("CATEGORY_0001")
            .withMinimumValue(100)
            .withMaximumValue(10000)
            .withSum(null)
            .withOrderDirection("desc")
            .withEntryPeriodEventId(null)
            .withAccessPeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.update_subscribe_ranking_model_master(
        ranking2.UpdateSubscribeRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('subscribe-0001')
            .with_description('description1')
            .with_metadata('CATEGORY_0001')
            .with_minimum_value(100)
            .with_maximum_value(10000)
            .with_sum(None)
            .with_order_direction('desc')
            .with_entry_period_event_id(None)
            .with_access_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.update_subscribe_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="subscribe-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    entryPeriodEventId=nil,
    accessPeriodEventId=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.update_subscribe_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="subscribe-0001",
    description="description1",
    metadata="CATEGORY_0001",
    minimumValue=100,
    maximumValue=10000,
    sum=nil,
    orderDirection="desc",
    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;

deleteSubscribeRankingModelMaster

Delete Subscribe Ranking Model Master

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
rankingNamestring
~ 128 charsRanking Name

Result

TypeDescription
itemSubscribeRankingModelMasterDeleted Subscribe Ranking Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/ranking2"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := ranking2.Gs2Ranking2RestClient{
    Session: &session,
}
result, err := client.DeleteSubscribeRankingModelMaster(
    &ranking2.DeleteSubscribeRankingModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        RankingName: pointy.String("subscribe-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Ranking2\Gs2Ranking2RestClient;
use Gs2\Ranking2\Request\DeleteSubscribeRankingModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2Ranking2RestClient(
    $session
);

try {
    $result = $client->deleteSubscribeRankingModelMaster(
        (new DeleteSubscribeRankingModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withRankingName("subscribe-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.ranking2.rest.Gs2Ranking2RestClient;
import io.gs2.ranking2.request.DeleteSubscribeRankingModelMasterRequest;
import io.gs2.ranking2.result.DeleteSubscribeRankingModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2Ranking2RestClient client = new Gs2Ranking2RestClient(session);

try {
    DeleteSubscribeRankingModelMasterResult result = client.deleteSubscribeRankingModelMaster(
        new DeleteSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
    );
    SubscribeRankingModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2Ranking2RestClient(session);

AsyncResult<Gs2.Gs2Ranking2.Result.DeleteSubscribeRankingModelMasterResult> asyncResult = null;
yield return client.DeleteSubscribeRankingModelMaster(
    new Gs2.Gs2Ranking2.Request.DeleteSubscribeRankingModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithRankingName("subscribe-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Ranking2 from '@/gs2/ranking2';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Ranking2.Gs2Ranking2RestClient(session);

try {
    const result = await client.deleteSubscribeRankingModelMaster(
        new Gs2Ranking2.DeleteSubscribeRankingModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withRankingName("subscribe-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import ranking2

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = ranking2.Gs2Ranking2RestClient(session)

try:
    result = client.delete_subscribe_ranking_model_master(
        ranking2.DeleteSubscribeRankingModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_ranking_name('subscribe-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('ranking2')

api_result = client.delete_subscribe_ranking_model_master({
    namespaceName="namespace-0001",
    rankingName="subscribe-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('ranking2')

api_result_handler = client.delete_subscribe_ranking_model_master_async({
    namespaceName="namespace-0001",
    rankingName="subscribe-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;