跳到主要内容

Client Statistics API Reference

Statistics is a service that helps you to store and track player or global statistics. By default, Statistics is also a major data source of the Leaderboard service.

API List

APIDescription
GetStatPersistentInfoQuery the persistent info of the specified stat item.
BatchGetStatPersistentInfoQuery item persistent infos with specified stat names and keys in batches. (max 100 stats) For example: stat_names=["s1", "s2"], keys=["k1", "k2"], then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")] It will ignore non-existing (stat_name + key) combination items.
GetStatCycleInfoQuery the cycle info of the specified stat item for the current cycle round.
BatchGetStatCycleInfoQuery cycle infos with specified stat names and keys for the current cycle round in batches. (max 100 stats) For example: stat_names=["s1", "s2"], keys=["k1", "k2"], then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")] It will ignore non-existing (stat_name + key) combination items.
BatchGetStatCycleRoundInfoQuery the current round infos of cycles in batches. (max 100 cycles)

API Details

GetStatPersistentInfo

Query the persistent info of the specified stat item.

/// <summary>Query the persistent info of the specified stat item.</summary>
/// <param name="pgos_params">Request structure for querying persistent info.</param>
public void GetStatPersistentInfo(GetStatPersistentInfoParams pgos_params, StatisticsDelegate0 callback);

Parameters:

ParamTypeDescription
pgos_paramsGetStatPersistentInfoParamsRequest structure for querying persistent info.
callbackStatisticsDelegate0

Return: void

BatchGetStatPersistentInfo

Query item persistent infos with specified stat names and keys in batches. (max 100 stats) For example: stat_names=["s1", "s2"], keys=["k1", "k2"], then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")] It will ignore non-existing (stat_name + key) combination items.

/// <summary>
/// Query item persistent infos with specified stat names and keys in batches. (max 100 stats)
/// For example: stat_names=["s1", "s2"], keys=["k1", "k2"],
/// then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")]
/// It will ignore non-existing (stat_name + key) combination items.
/// </summary>
/// <param name="pgos_params">Request structure for querying item persistent infos.</param>
public void BatchGetStatPersistentInfo(BatchGetStatPersistentInfoParams pgos_params, StatisticsDelegate1 callback);

Parameters:

ParamTypeDescription
pgos_paramsBatchGetStatPersistentInfoParamsRequest structure for querying item persistent infos.
callbackStatisticsDelegate1

Return: void

GetStatCycleInfo

Query the cycle info of the specified stat item for the current cycle round.

/// <summary>Query the cycle info of the specified stat item for the current cycle round.</summary>
/// <param name="pgos_params">Request structure for querying the cycle info.</param>
public void GetStatCycleInfo(GetStatCycleInfoParams pgos_params, StatisticsDelegate2 callback);

Parameters:

ParamTypeDescription
pgos_paramsGetStatCycleInfoParamsRequest structure for querying the cycle info.
callbackStatisticsDelegate2

Return: void

BatchGetStatCycleInfo

Query cycle infos with specified stat names and keys for the current cycle round in batches. (max 100 stats) For example: stat_names=["s1", "s2"], keys=["k1", "k2"], then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")] It will ignore non-existing (stat_name + key) combination items.

/// <summary>
/// Query cycle infos with specified stat names and keys for the current cycle round in batches. (max 100 stats)
/// For example: stat_names=["s1", "s2"], keys=["k1", "k2"],
/// then you will get a batch of items:[("s1", "k1"), ("s1", "k2"), "s2", "k1"), ("s2", "k2")]
/// It will ignore non-existing (stat_name + key) combination items.
/// </summary>
/// <param name="pgos_params">Request structure for querying item cycle infos.</param>
public void BatchGetStatCycleInfo(BatchGetStatCycleInfoParams pgos_params, StatisticsDelegate3 callback);

Parameters:

ParamTypeDescription
pgos_paramsBatchGetStatCycleInfoParamsRequest structure for querying item cycle infos.
callbackStatisticsDelegate3

Return: void

BatchGetStatCycleRoundInfo

Query the current round infos of cycles in batches. (max 100 cycles)

/// <summary>Query the current round infos of cycles in batches.  (max 100 cycles)</summary>
/// <param name="pgos_params">Request structure for querying current round infos.</param>
public void BatchGetStatCycleRoundInfo(BatchGetStatCycleRoundInfoParams pgos_params, StatisticsDelegate4 callback);

Parameters:

ParamTypeDescription
pgos_paramsBatchGetStatCycleRoundInfoParamsRequest structure for querying current round infos.
callbackStatisticsDelegate4

Return: void

All Delegates

public delegate void StatisticsDelegate0(PgosResult a0, StatItem a1);
public delegate void StatisticsDelegate1(PgosResult a0, BatchGetStatPersistentInfoResult a1);
public delegate void StatisticsDelegate2(PgosResult a0, GetStatCycleInfoResult a1);
public delegate void StatisticsDelegate3(PgosResult a0, BatchGetStatCycleInfoResult a1);
public delegate void StatisticsDelegate4(PgosResult a0, BatchGetStatCycleRoundInfoResult a1);

Type Reference: