API Reference of GS2-Ranking2 SDK for Game Engine
Model
EzGlobalRankingData
Global Ranking
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
index | int | ~ 2147483646 | Index of Ranking | ||
rank | int | ~ 2147483646 | Rank of Ranking | ||
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzGlobalRankingModel
Global Ranking Model
The global ranking is a mode that allows you to create a ranking that targets all players. You can display the top 1000 rankings.
By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
globalRankingModelId | string | ✓ | ~ 1024 chars | Global Ranking GRN | |
name | string | ✓ | ~ 128 chars | Ranking Name | |
metadata | string | ~ 1024 chars | metadata | ||
rankingRewards | List<EzRankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | |
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
EzGlobalRankingReceivedReward
Global Ranking Reward Received History
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
receivedAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) |
EzGlobalRankingScore
Global Ranking Score
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzClusterRankingData
Cluster Ranking
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
index | int | ~ 2147483646 | Index of Ranking | ||
rank | int | ~ 2147483646 | Rank of Ranking | ||
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzClusterRankingModel
Cluster Ranking Model
The cluster ranking mode is a mode for realizing rankings targeting players in guilds or gatherings. You can display the top 1000 rankings.
By associating it with the repeat event of GS2-Schedule, you can reset the ranking according to the number of repetitions.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
clusterRankingModelId | string | ✓ | ~ 1024 chars | Cluster Ranking GRN | |
name | string | ✓ | ~ 128 chars | Ranking Name | |
metadata | string | ~ 1024 chars | metadata | ||
clusterType | enum { “Raw”, “Gs2Guild::Guild”, “Gs2Matchmaking::SeasonGathering” } | ✓ | ~ 128 chars | Cluster Type | |
rankingRewards | List<EzRankingReward> | {entryPeriodEventId} != null | ~ 100 items | List of ranking rewards | |
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
Enumeration type definition to specify as clusterType
Enumerator String Definition | Description |
---|---|
Raw | No verification |
Gs2Guild::Guild | GS2-Guild Guild |
Gs2Matchmaking::SeasonGathering | GS2-Matchmaking Season Gathering |
EzClusterRankingReceivedReward
Cluster Ranking Reward Received History
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
receivedAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) |
EzClusterRankingScore
Cluster Ranking Score
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzSubscribeRankingData
Subscribe Ranking
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
index | int | ~ 2147483646 | Index of Ranking | ||
rank | int | ~ 2147483646 | Rank of Ranking | ||
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzSubscribeRankingModel
Subscribe Ranking Model
A mode that aggregates the scores of other players who have subscribed and creates a ranking.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
subscribeRankingModelId | string | ✓ | ~ 1024 chars | Subscribe Ranking GRN | |
name | string | ✓ | ~ 128 chars | Ranking Name | |
metadata | string | ~ 1024 chars | metadata | ||
entryPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN | ||
accessPeriodEventId | string | ~ 1024 chars | GS2-Schedule Event GRN |
EzSubscribeRankingScore
Subscribe Ranking Score
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ✓ | ~ 9223372036854775805 | Season | |
userId | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata | ||
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzRankingReward
Ranking Reward Model
Set the rewards that can be received during the reference period when the score registration period is set in the ranking. If the repeat setting is enabled, the most recently ended period ranking will be the target for receiving rewards.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
thresholdRank | int | ✓ | 1 ~ 1001 | Rank threshold | |
metadata | string | ~ 1024 chars | metadata | ||
acquireActions | List<EzAcquireAction> | [] | ~ 100 items | List of actions to be performed when rewards are received |
EzAcquireAction
Acquire Action
EzConfig
Configration
Set values to be applied to transaction variables
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
key | string | ✓ | ~ 64 chars | Name | |
value | string | ~ 51200 chars | Value |
EzSubscribeUser
Subscribe Information
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
userId | string | ✓ | ~ 128 chars | User Id | |
targetUserId | string | ✓ | ~ 128 chars | Subscribe Target User ID |
Methods
getGlobalRankingRank
Get Global Ranking
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzGlobalRankingData | Global Ranking |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
).GlobalRankingSeason(
season: null
).GlobalRankingData(
userId: "user-0001"
);
var result = await domain.GetGlobalRankingRankAsync(
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
).GlobalRankingSeason(
season: null
).GlobalRankingData(
userId: "user-0001"
);
var future = domain.GetGlobalRankingRankFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->GlobalRankingModel(
"ranking-0001" // rankingName
)->GlobalRankingSeason(
nullptr // season
)->GlobalRankingData(
"user-0001" // userId
);
const auto Future = Domain->GetGlobalRankingRank(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
listGlobalRankings
List Global Rankings
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzGlobalRankingData> | List of Global Rankings |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
).GlobalRankingSeason(
season: null
);
var items = await domain.GlobalRankingsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
).GlobalRankingSeason(
season: null
);
var it = domain.GlobalRankings(
);
List<EzGlobalRankingData> items = new List<EzGlobalRankingData>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->GlobalRankingModel(
"ranking-0001" // rankingName
)->GlobalRankingSeason(
nullptr // season
);
const auto It = Domain->GlobalRankings(
);
TArray<Gs2::UE5::Ranking2::Model::FEzGlobalRankingDataPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
getGlobalRankingModel
Get Global Ranking Model
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | EzGlobalRankingModel | Global Ranking Model |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->GlobalRankingModel(
"ranking-0001" // rankingName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).GlobalRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->GlobalRankingModel(
"ranking-0001" // rankingName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FGlobalRankingModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listGlobalRankingModels
List Global Ranking Models
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
items | List<EzGlobalRankingModel> | List of Global Ranking Models |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var items = await domain.GlobalRankingModelsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.GlobalRankingModels(
);
List<EzGlobalRankingModel> items = new List<EzGlobalRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
const auto It = Domain->GlobalRankingModels(
);
TArray<Gs2::UE5::Ranking2::Model::FEzGlobalRankingModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
// Start event handling
var callbackId = domain.SubscribeGlobalRankingModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeGlobalRankingModels(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.GlobalRankingModels(
);
List<EzGlobalRankingModel> items = new List<EzGlobalRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribeGlobalRankingModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeGlobalRankingModels(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getGlobalRankingReceivedReward
Get Global Ranking Received Reward
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzGlobalRankingReceivedReward | Global Ranking Reward Received History |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingReceivedReward(
rankingName: "ranking-0001",
season: 0
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingReceivedReward(
rankingName: "ranking-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->GlobalRankingReceivedReward(
"ranking-0001", // rankingName
0 // season
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingReceivedReward(
rankingName: "ranking-0001",
season: 0
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingReceivedReward(
rankingName: "ranking-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->GlobalRankingReceivedReward(
"ranking-0001", // rankingName
0 // season
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FGlobalRankingReceivedReward> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listGlobalRankingReceivedRewards
List Global Ranking Received Rewards
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzGlobalRankingReceivedReward> | List of Global Ranking Rewards Received |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.GlobalRankingReceivedRewardsAsync(
rankingName: "ranking-0001",
season: 0L
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.GlobalRankingReceivedRewards(
rankingName: "ranking-0001",
season: 0L
);
List<EzGlobalRankingReceivedReward> items = new List<EzGlobalRankingReceivedReward>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->GlobalRankingReceivedRewards(
"ranking-0001", // rankingName
0L // season
);
TArray<Gs2::UE5::Ranking2::Model::FEzGlobalRankingReceivedRewardPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeGlobalRankingReceivedRewards(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeGlobalRankingReceivedRewards(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.GlobalRankingReceivedRewards(
rankingName: "ranking-0001",
season: 0L
);
List<EzGlobalRankingReceivedReward> items = new List<EzGlobalRankingReceivedReward>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeGlobalRankingReceivedRewards(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeGlobalRankingReceivedRewards(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getGlobalRankingScore
Get Global Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzGlobalRankingScore | Global Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingScore(
rankingName: "ranking-0001",
season: 0
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingScore(
rankingName: "ranking-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->GlobalRankingScore(
"ranking-0001", // rankingName
0 // season
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingScore(
rankingName: "ranking-0001",
season: 0
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).GlobalRankingScore(
rankingName: "ranking-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->GlobalRankingScore(
"ranking-0001", // rankingName
0 // season
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FGlobalRankingScore> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listGlobalRankingScores
List Global Ranking Scores
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzGlobalRankingScore> | List of Global Ranking Scores |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.GlobalRankingScoresAsync(
rankingName: "ranking-0001"
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.GlobalRankingScores(
rankingName: "ranking-0001"
);
List<EzGlobalRankingScore> items = new List<EzGlobalRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->GlobalRankingScores(
"ranking-0001" // rankingName
);
TArray<Gs2::UE5::Ranking2::Model::FEzGlobalRankingScorePtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeGlobalRankingScores(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeGlobalRankingScores(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.GlobalRankingScores(
rankingName: "ranking-0001"
);
List<EzGlobalRankingScore> items = new List<EzGlobalRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeGlobalRankingScores(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeGlobalRankingScores(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
putGlobalRanking
Register Global Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata |
Result
Type | Description | |
---|---|---|
item | EzGlobalRankingScore | Registered Global Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.PutGlobalRankingAsync(
rankingName: "ranking-0001",
score: 100L,
metadata: null
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.PutGlobalRankingFuture(
rankingName: "ranking-0001",
score: 100L,
metadata: null
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->PutGlobalRanking(
"ranking-0001", // rankingName
100L // score
// metadata
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
getClusterRankingRank
Get Cluster Ranking
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzClusterRankingData | Cluster Ranking |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
).ClusterRankingSeason(
clusterName: "cluster-0001",
season: null
).ClusterRankingData(
userId: "user-0001"
);
var result = await domain.GetClusterRankingRankAsync(
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
).ClusterRankingSeason(
clusterName: "cluster-0001",
season: null
).ClusterRankingData(
userId: "user-0001"
);
var future = domain.GetClusterRankingRankFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->ClusterRankingModel(
"ranking-0001" // rankingName
)->ClusterRankingSeason(
"cluster-0001", // clusterName
nullptr // season
)->ClusterRankingData(
"user-0001" // userId
);
const auto Future = Domain->GetClusterRankingRank(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
listClusterRankings
List Cluster Rankings
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzClusterRankingData> | List of Cluster Rankings |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
).ClusterRankingSeason(
clusterName: "cluster-0001",
season: null
);
var items = await domain.ClusterRankingsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
).ClusterRankingSeason(
clusterName: "cluster-0001",
season: null
);
var it = domain.ClusterRankings(
);
List<EzClusterRankingData> items = new List<EzClusterRankingData>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->ClusterRankingModel(
"ranking-0001" // rankingName
)->ClusterRankingSeason(
"cluster-0001", // clusterName
nullptr // season
);
const auto It = Domain->ClusterRankings(
);
TArray<Gs2::UE5::Ranking2::Model::FEzClusterRankingDataPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
getClusterRankingModel
Get Cluster Ranking Model
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | EzClusterRankingModel | Cluster Ranking Model |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->ClusterRankingModel(
"ranking-0001" // rankingName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).ClusterRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->ClusterRankingModel(
"ranking-0001" // rankingName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FClusterRankingModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listClusterRankingModels
List Cluster Ranking Models
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
items | List<EzClusterRankingModel> | List of Cluster Ranking Models |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var items = await domain.ClusterRankingModelsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.ClusterRankingModels(
);
List<EzClusterRankingModel> items = new List<EzClusterRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
const auto It = Domain->ClusterRankingModels(
);
TArray<Gs2::UE5::Ranking2::Model::FEzClusterRankingModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
// Start event handling
var callbackId = domain.SubscribeClusterRankingModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeClusterRankingModels(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.ClusterRankingModels(
);
List<EzClusterRankingModel> items = new List<EzClusterRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribeClusterRankingModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeClusterRankingModels(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getClusterRankingReceivedReward
Get Cluster Ranking Received Reward
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzClusterRankingReceivedReward | Cluster Ranking Reward Received History |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingReceivedReward(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingReceivedReward(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->ClusterRankingReceivedReward(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0 // season
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingReceivedReward(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingReceivedReward(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->ClusterRankingReceivedReward(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0 // season
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FClusterRankingReceivedReward> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listClusterRankingReceivedRewards
List Cluster Ranking Received Rewards
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
clusterName | string | ~ 1024 chars | Cluster Name | ||
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzClusterRankingReceivedReward> | List of Cluster Ranking Rewards Received |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.ClusterRankingReceivedRewardsAsync(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.ClusterRankingReceivedRewards(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
);
List<EzClusterRankingReceivedReward> items = new List<EzClusterRankingReceivedReward>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->ClusterRankingReceivedRewards(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0L // season
);
TArray<Gs2::UE5::Ranking2::Model::FEzClusterRankingReceivedRewardPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeClusterRankingReceivedRewards(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeClusterRankingReceivedRewards(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.ClusterRankingReceivedRewards(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
);
List<EzClusterRankingReceivedReward> items = new List<EzClusterRankingReceivedReward>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeClusterRankingReceivedRewards(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeClusterRankingReceivedRewards(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getClusterRankingScore
Get Cluster Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzClusterRankingScore | Cluster Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingScore(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingScore(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->ClusterRankingScore(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0 // season
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingScore(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).ClusterRankingScore(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->ClusterRankingScore(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0 // season
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FClusterRankingScore> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listClusterRankingScores
List Cluster Ranking Scores
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
clusterName | string | ~ 1024 chars | Cluster Name | ||
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzClusterRankingScore> | List of Cluster Ranking Scores |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.ClusterRankingScoresAsync(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.ClusterRankingScores(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
);
List<EzClusterRankingScore> items = new List<EzClusterRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->ClusterRankingScores(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
0L // season
);
TArray<Gs2::UE5::Ranking2::Model::FEzClusterRankingScorePtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeClusterRankingScores(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeClusterRankingScores(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.ClusterRankingScores(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
season: 0L
);
List<EzClusterRankingScore> items = new List<EzClusterRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeClusterRankingScores(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeClusterRankingScores(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
putClusterRanking
Register Cluster Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
clusterName | string | ✓ | ~ 1024 chars | Cluster Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata |
Result
Type | Description | |
---|---|---|
item | EzClusterRankingScore | Registered Cluster Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.PutClusterRankingAsync(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
score: 100L,
metadata: null
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.PutClusterRankingFuture(
rankingName: "ranking-0001",
clusterName: "cluster-0001",
score: 100L,
metadata: null
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->PutClusterRanking(
"ranking-0001", // rankingName
"cluster-0001", // clusterName
100L // score
// metadata
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
getSubscribe
Get Subscribe User
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
targetUserId | string | ✓ | ~ 128 chars | Subscribe Target User ID |
Result
Type | Description | |
---|---|---|
item | EzSubscribeUser | Subscribe Target User ID |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Subscribe(
rankingName: "ranking-0001"
).SubscribeUser(
targetUserId: "user-0002"
);
var result = await domain.GetSubscribeAsync(
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Subscribe(
rankingName: "ranking-0001"
).SubscribeUser(
targetUserId: "user-0002"
);
var future = domain.GetSubscribeFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Subscribe(
"ranking-0001" // rankingName
)->SubscribeUser(
"user-0002" // targetUserId
);
const auto Future = Domain->GetSubscribe(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
listSubscribes
List Subscribe Users
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzSubscribeUser> | List of Subscribe Target User IDs |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.SubscribesAsync(
rankingName: "ranking-0001"
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Subscribes(
rankingName: "ranking-0001"
);
List<EzSubscribeUser> items = new List<EzSubscribeUser>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->Subscribes(
"ranking-0001" // rankingName
);
TArray<Gs2::UE5::Ranking2::Model::FEzSubscribeUserPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeSubscribes(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeSubscribes(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Subscribes(
rankingName: "ranking-0001"
);
List<EzSubscribeUser> items = new List<EzSubscribeUser>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeSubscribes(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeSubscribes(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getSubscribeRankingRank
Get Subscribe Ranking
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzSubscribeRankingData | Subscribe Ranking |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: null
).SubscribeRankingData(
scorerUserId: null
);
var result = await domain.GetSubscribeRankingRankAsync(
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: null
).SubscribeRankingData(
scorerUserId: null
);
var future = domain.GetSubscribeRankingRankFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
nullptr // season
)->SubscribeRankingData(
nullptr // scorerUserId
);
const auto Future = Domain->GetSubscribeRankingRank(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
listSubscribeRankings
List Subscribe Rankings
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzSubscribeRankingData> | List of Subscribe Rankings |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: null
);
var items = await domain.SubscribeRankingsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: null
);
var it = domain.SubscribeRankings(
);
List<EzSubscribeRankingData> items = new List<EzSubscribeRankingData>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
nullptr // season
);
const auto It = Domain->SubscribeRankings(
);
TArray<Gs2::UE5::Ranking2::Model::FEzSubscribeRankingDataPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
getSubscribeRankingModel
Get Subscribe Ranking Model
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name |
Result
Type | Description | |
---|---|---|
item | EzSubscribeRankingModel | Subscribe Ranking Model |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).SubscribeRankingModel(
rankingName: "ranking-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).SubscribeRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->SubscribeRankingModel(
"ranking-0001" // rankingName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).SubscribeRankingModel(
rankingName: "ranking-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).SubscribeRankingModel(
rankingName: "ranking-0001"
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->SubscribeRankingModel(
"ranking-0001" // rankingName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FSubscribeRankingModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listSubscribeRankingModels
List Subscribe Ranking Models
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
items | List<EzSubscribeRankingModel> | List of Subscribe Ranking Models |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var items = await domain.SubscribeRankingModelsAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.SubscribeRankingModels(
);
List<EzSubscribeRankingModel> items = new List<EzSubscribeRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
const auto It = Domain->SubscribeRankingModels(
);
TArray<Gs2::UE5::Ranking2::Model::FEzSubscribeRankingModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
// Start event handling
var callbackId = domain.SubscribeSubscribeRankingModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeSubscribeRankingModels(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: null
);
var it = domain.SubscribeRankingModels(
);
List<EzSubscribeRankingModel> items = new List<EzSubscribeRankingModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
nullptr // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribeSubscribeRankingModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeSubscribeRankingModels(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getSubscribeRankingScore
Get Subscribe Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
season | long | ~ 9223372036854775805 | Season | ||
accessToken | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzSubscribeRankingScore | Subscribe Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
).SubscribeRankingScore(
);
var item = await domain.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
).SubscribeRankingScore(
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
0 // season
)->SubscribeRankingScore(
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
).SubscribeRankingScore(
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
).SubscribeRankingScore(
);
var future = domain.Model();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
0 // season
)->SubscribeRankingScore(
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Ranking2::Model::FSubscribeRankingScore> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listSubscribeRankingScores
List Subscribe Ranking Scores
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ~ 128 chars | Ranking Name | ||
accessToken | string | ✓ | ~ 128 chars | User Id | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzSubscribeRankingScore> | List of Subscribe Ranking Scores |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
var items = await domain.SubscribeRankingScoresAsync(
).ToListAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
var it = domain.SubscribeRankingScores(
);
List<EzSubscribeRankingScore> items = new List<EzSubscribeRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
0 // season
);
const auto It = Domain->SubscribeRankingScores(
);
TArray<Gs2::UE5::Ranking2::Model::FEzSubscribeRankingScorePtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
// Start event handling
var callbackId = domain.SubscribeSubscribeRankingScores(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeSubscribeRankingScores(callbackId);
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
var it = domain.SubscribeRankingScores(
);
List<EzSubscribeRankingScore> items = new List<EzSubscribeRankingScore>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
}
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
0 // season
);
// Start event handling
const auto CallbackId = Domain->SubscribeSubscribeRankingScores(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeSubscribeRankingScores(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
putSubscribeRanking
Register Subscribe Ranking Score
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
rankingName | string | ✓ | ~ 128 chars | Ranking Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
score | long | ✓ | ~ 9223372036854775805 | Score | |
metadata | string | ~ 512 chars | metadata |
Result
Type | Description | |
---|---|---|
item | EzSubscribeRankingScore | Registered Subscribe Ranking Score |
Implementation Example
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
var result = await domain.PutSubscribeRankingAsync(
score: 100L,
metadata: null
);
var item = await result.ModelAsync();
var domain = gs2.Ranking2.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SubscribeRankingSeason(
rankingName: "ranking-0001",
season: 0
);
var future = domain.PutSubscribeRankingFuture(
score: 100L,
metadata: null
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.Model();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
const auto Domain = Gs2->Ranking2->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SubscribeRankingSeason(
"ranking-0001", // rankingName
0 // season
);
const auto Future = Domain->PutSubscribeRanking(
100L // score
// metadata
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();