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
| API | Description |
|---|---|
| GetStatPersistentInfo | Query the persistent info of the specified stat item. |
| 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. |
| GetStatCycleInfo | Query the cycle info of the specified stat item for the current cycle round. |
| 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. |
| BatchGetStatCycleRoundInfo | Query 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:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetStatPersistentInfoParams | Request structure for querying persistent info. |
| callback | StatisticsDelegate0 |
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:
| Param | Type | Description |
|---|---|---|
| pgos_params | BatchGetStatPersistentInfoParams | Request structure for querying item persistent infos. |
| callback | StatisticsDelegate1 |
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:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetStatCycleInfoParams | Request structure for querying the cycle info. |
| callback | StatisticsDelegate2 |
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:
| Param | Type | Description |
|---|---|---|
| pgos_params | BatchGetStatCycleInfoParams | Request structure for querying item cycle infos. |
| callback | StatisticsDelegate3 |
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:
| Param | Type | Description |
|---|---|---|
| pgos_params | BatchGetStatCycleRoundInfoParams | Request structure for querying current round infos. |
| callback | StatisticsDelegate4 |
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: