Server 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. |
| UpdateStatItem | Update the specified stat item. |
| BatchUpdateStatItem | Update the stat items in batches. (max 100 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.
/**
* Query the persistent info of the specified stat item.
*
* @param Params Request structure for querying persistent info.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStatPersistentInfo(
const FPgosGetStatPersistentInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosStatItem* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosGetStatPersistentInfoParams& | Request structure for querying persistent info. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosStatItem* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
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.
/**
* 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.
*
* @param Params Request structure for querying item persistent infos.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetStatPersistentInfo(
const FPgosBatchGetStatPersistentInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatPersistentInfoResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosBatchGetStatPersistentInfoParams& | Request structure for querying item persistent infos. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatPersistentInfoResult* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
GetStatCycleInfo
Query the cycle info of the specified stat item for the current cycle round.
/**
* Query the cycle info of the specified stat item for the current cycle round.
*
* @param Params Request structure for querying the cycle info.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStatCycleInfo(
const FPgosGetStatCycleInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosGetStatCycleInfoResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosGetStatCycleInfoParams& | Request structure for querying the cycle info. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosGetStatCycleInfoResult* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
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.
/**
* 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.
*
* @param Params Request structure for querying item cycle infos.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetStatCycleInfo(
const FPgosBatchGetStatCycleInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatCycleInfoResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosBatchGetStatCycleInfoParams& | Request structure for querying item cycle infos. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatCycleInfoResult* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
UpdateStatItem
Update the specified stat item.
/**
* Update the specified stat item.
*
* @param Params Request structure for updating the specified stat item.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void UpdateStatItem(
const FPgosServerUpdateStatItemParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosServerStatItemAfterUpdate* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosServerUpdateStatItemParams& | Request structure for updating the specified stat item. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosServerStatItemAfterUpdate* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
BatchUpdateStatItem
Update the stat items in batches. (max 100 items)
/**
* Update the stat items in batches. (max 100 items)
*
* @param Params Request structure for updating the stat items in batches.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchUpdateStatItem(
const FPgosServerBatchUpdateStatItemParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchUpdateStatItemResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosServerBatchUpdateStatItemParams& | Request structure for updating the stat items in batches. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosServerBatchUpdateStatItemResult* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
BatchGetStatCycleRoundInfo
Query the current round infos of cycles in batches. (max 100 cycles)
/**
* Query the current round infos of cycles in batches. (max 100 cycles)
*
* @param Params Request structure for querying current round infos.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetStatCycleRoundInfo(
const FPgosBatchGetStatCycleRoundInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatCycleRoundInfoResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosBatchGetStatCycleRoundInfoParams& | Request structure for querying current round infos. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosBatchGetStatCycleRoundInfoResult* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void