Skip to main content

Server PlayerProfile API Reference

Player Info is the core attribute collection used to describe a player.

API List

APIDescription
GetPlayerInfoQuery a player's detail info.
BatchGetPlayerInfoPerform a batch query of player info for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetOneOfPlayerKVDataQuery the specified kvdata of the specified player.
GetPlayerKVDataQuery certain kvdata of the specified player.
BatchGetPlayerKVDataPerform a batch query of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetPlayerGroupKVDataQuery the specified group kvdata of the specified player.
BatchGetPlayerGroupKVDataPerform a batch query of the specified group KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
SetOneOfPlayerKVDataUpdate the specified kvdata of the specified player.
SetPlayerKVDataUpdate kvdata of the specified player. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
BatchSetPlayerKVDataPerform a batch update of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
IncrOneOfPlayerKVDataPerform atomic increment operation on a specified kvdata item for a specified player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.
BatchIncrOneOfPlayerKVDataPerform a batch atomic increment operation on a specified kvdata item for multiple players (max 100 players). [Only works on Integer/Float type keys] If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
IncrPlayerKVDataPerform atomic increment operation on multiple kvdata items for a specified player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.
BatchIncrPlayerKVDataPerform a batch atomic increment operation on multiple kvdata items for multiple players (max 100 players). [Only works on Integer/Float type keys] If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
BatchIncrPlayerKVDataIdempotentIdempotent version of BatchIncrPlayerKVData. Idempotency token could be set for each player.
GetPlayerVersionedKVDataQuery certain versioned kvdata of the specified player. The keys to be queried must contain at least one versioned key. Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.
BatchGetPlayerVersionedKVDataPerform a batch query of versioned KVData for multiple players (max 100 players). The keys to be queried must contain at least one versioned key. Call 'BatchGetPlayerKVData' instead if you don't need to get 'version', which is only needed when updating versioned KVData.
SetPlayerVersionedKVDataUpdate versioned kvdata for the specified player. The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call. If the 'version' passed in is the latest, the callback will return success along with the updated data. If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version. For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.
BatchSetPlayerVersionedKVDataPerform a batch update of versioned KVData for multiple players (max 100 players). The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call. If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
BatchOpenIDToPlayerIDBatch transform playerID of PGOS to account openID of external platform. (max 100 OpenIDs)

API Details

GetPlayerInfo

Query a player's detail info.

/**
* Query a player's detail info.
*
* @param PlayerId The player to query.
* @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 GetPlayerInfo(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerDetail* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerDetail* 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

BatchGetPlayerInfo

Perform a batch query of player info for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of player info for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds The players to query.
* @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 BatchGetPlayerInfo(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchGetPlayerInfoSvrRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&The players to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchGetPlayerInfoSvrRsp* 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

GetOneOfPlayerKVData

Query the specified kvdata of the specified player.

/**
* Query the specified kvdata of the specified player.
*
* @param PlayerId The player to query.
* @param QueryKey The key to query.
* @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 GetOneOfPlayerKVData(
const FString& PlayerId,
const FString& QueryKey,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player to query.
QueryKeyconst FString&The key to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* 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

GetPlayerKVData

Query certain kvdata of the specified player.

/**
* Query certain kvdata of the specified player.
*
* @param PlayerId The player to query.
* @param QueryKeys Keys to query.
* @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 GetPlayerKVData(
const FString& PlayerId,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* 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

BatchGetPlayerKVData

Perform a batch query of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of KVData for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds Players to query.
* @param QueryKeys Keys to query.
* @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 BatchGetPlayerKVData(
const TArray<FString>& PlayerIds,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithFails* 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

GetPlayerGroupKVData

Query the specified group kvdata of the specified player.

/**
* Query the specified group kvdata of the specified player.
*
* @param PlayerId Player to query.
* @param GroupName Name of the specified group.
* @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 GetPlayerGroupKVData(
const FString& PlayerId,
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
GroupNameconst FString&Name of the specified group.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* 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

BatchGetPlayerGroupKVData

Perform a batch query of the specified group KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of the specified group KVData for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds Players to query.
* @param GroupName Name of the specified group.
* @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 BatchGetPlayerGroupKVData(
const TArray<FString>& PlayerIds,
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
GroupNameconst FString&Name of the specified group.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* 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

SetOneOfPlayerKVData

Update the specified kvdata of the specified player.

/**
* Update the specified kvdata of the specified player.
*
* @param PlayerId Player to query.
* @param Key Key to update
* @param Value The new value can be set to string/int32/int64/float/double.
* @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 SetOneOfPlayerKVData(
const FString& PlayerId,
const FString& Key,
const FPgosKVDataValue& Value,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
Keyconst FString&Key to update
Valueconst FPgosKVDataValue&The new value can be set to string/int32/int64/float/double.
ResultCallbackTFunction<void(const FPgosResult& Ret)>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

SetPlayerKVData

Update kvdata of the specified player. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Update kvdata of the specified player.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @param PlayerId Player to update kvdata.
* @param Kvdata KVData to update.
* @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 SetPlayerKVData(
const FString& PlayerId,
const TMap<FString, FPgosKVDataValue>& Kvdata,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to update kvdata.
Kvdataconst TMap<FString, FPgosKVDataValue>&KVData to update.
ResultCallbackTFunction<void(const FPgosResult& Ret)>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

BatchSetPlayerKVData

Perform a batch update of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Perform a batch update of KVData for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @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 BatchSetPlayerKVData(
const TArray<FPgosPlayerKVDataGroup>& Kvdatas,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerOperationResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Kvdatasconst TArray<FPgosPlayerKVDataGroup>&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerOperationResult* 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

IncrOneOfPlayerKVData

Perform atomic increment operation on a specified kvdata item for a specified player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.

/**
* Perform atomic increment operation on a specified kvdata item for a specified player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param PlayerId Player to operate.
* @param Key Key to operate.
* @param Increment The increment value can be set to int32/int64/float/double.
* @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 IncrOneOfPlayerKVData(
const FString& PlayerId,
const FString& Key,
const FPgosKVDataValue& Increment,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to operate.
Keyconst FString&Key to operate.
Incrementconst FPgosKVDataValue&The increment value can be set to int32/int64/float/double.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* 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

BatchIncrOneOfPlayerKVData

Perform a batch atomic increment operation on a specified kvdata item for multiple players (max 100 players). [Only works on Integer/Float type keys] If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Perform a batch atomic increment operation on a specified kvdata item for multiple players (max 100 players). [Only works on Integer/Float type keys]
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
* For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @param PlayerIds Players to operate.
* @param Key Key to operate.
* @param Increment The increment value can be set to int32/int64/float/double.
* @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 BatchIncrOneOfPlayerKVData(
const TArray<FString>& PlayerIds,
const FString& Key,
const FPgosKVDataValue& Increment,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchIncrOneOfPlayerKVDataRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to operate.
Keyconst FString&Key to operate.
Incrementconst FPgosKVDataValue&The increment value can be set to int32/int64/float/double.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchIncrOneOfPlayerKVDataRsp* 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

IncrPlayerKVData

Perform atomic increment operation on multiple kvdata items for a specified player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.

/**
* Perform atomic increment operation on multiple kvdata items for a specified player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param PlayerId Player to operate.
* @param Increments Increments to update, key: kvdata key, value: increment of the value.
* @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 IncrPlayerKVData(
const FString& PlayerId,
const TMap<FString, FPgosKVDataValue>& Increments,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to operate.
Incrementsconst TMap<FString, FPgosKVDataValue>&Increments to update, key: kvdata key, value: increment of the value.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* 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

BatchIncrPlayerKVData

Perform a batch atomic increment operation on multiple kvdata items for multiple players (max 100 players). [Only works on Integer/Float type keys] If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Perform a batch atomic increment operation on multiple kvdata items for multiple players (max 100 players). [Only works on Integer/Float type keys]
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
* For the players whose operations are successful, the callback data will contain the new value of their updated kvdata item.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @param Increments Player kvdata increments list.
* @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 BatchIncrPlayerKVData(
const TArray<FPgosPlayerKVDataGroup>& Increments,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Incrementsconst TArray<FPgosPlayerKVDataGroup>&Player kvdata increments list.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* 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

BatchIncrPlayerKVDataIdempotent

Idempotent version of BatchIncrPlayerKVData. Idempotency token could be set for each player.

/**
* Idempotent version of BatchIncrPlayerKVData. Idempotency token could be set for each player.
*
* @param Params Params of BatchIncrPlayerKVDataIdempotent.
* @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 BatchIncrPlayerKVDataIdempotent(
const FPgosServerBatchIncrPlayerKVDataIdempotentParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchIncrPlayerKVDataIdempotentResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosServerBatchIncrPlayerKVDataIdempotentParams&Params of BatchIncrPlayerKVDataIdempotent.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchIncrPlayerKVDataIdempotentResult* 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

GetPlayerVersionedKVData

Query certain versioned kvdata of the specified player. The keys to be queried must contain at least one versioned key. Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.

/**
* Query certain versioned kvdata of the specified player.
* The keys to be queried must contain at least one versioned key.
* Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.
*
* @param PlayerId The player to query.
* @param QueryKeys Keys to query.
* @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 GetPlayerVersionedKVData(
const FString& PlayerId,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithVerAndFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithVerAndFails* 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

BatchGetPlayerVersionedKVData

Perform a batch query of versioned KVData for multiple players (max 100 players). The keys to be queried must contain at least one versioned key. Call 'BatchGetPlayerKVData' instead if you don't need to get 'version', which is only needed when updating versioned KVData.

/**
* Perform a batch query of versioned KVData for multiple players (max 100 players).
* The keys to be queried must contain at least one versioned key.
* Call 'BatchGetPlayerKVData' instead if you don't need to get 'version', which is only needed when updating versioned KVData.
*
* @param PlayerIds Players to query.
* @param QueryKeys Keys to query.
* @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 BatchGetPlayerVersionedKVData(
const TArray<FString>& PlayerIds,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithVerAndFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithVerAndFails* 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

SetPlayerVersionedKVData

Update versioned kvdata for the specified player. The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call. If the 'version' passed in is the latest, the callback will return success along with the updated data. If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version. For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.

/**
* Update versioned kvdata for the specified player.
* The KVData of the player to be updated must contain at least one versioned key.
* The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call.
* If the 'version' passed in is the latest, the callback will return success along with the updated data.
* If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version.
* For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.
*
* @param Data Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
* @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 SetPlayerVersionedKVData(
const FPgosPlayerKVDataGroupWithVer& Data,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithVer* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Dataconst FPgosPlayerKVDataGroupWithVer&Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithVer* 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

BatchSetPlayerVersionedKVData

Perform a batch update of versioned KVData for multiple players (max 100 players). The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call. If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Perform a batch update of versioned KVData for multiple players (max 100 players).
* The KVData of the player to be updated must contain at least one versioned key.
* The 'version' needs to pass in can be obtained from the 'GetPlayerVersionedKVData' or 'BatchGetPlayerVersionedKVData' API call.
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @param Data Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
* @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 BatchSetPlayerVersionedKVData(
const TArray<FPgosPlayerKVDataGroupWithVer>& Data,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchSetPlayerVersionedKVDataRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Dataconst TArray<FPgosPlayerKVDataGroupWithVer>&Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchSetPlayerVersionedKVDataRsp* 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

BatchOpenIDToPlayerID

Batch transform playerID of PGOS to account openID of external platform. (max 100 OpenIDs)

/**
* Batch transform playerID of PGOS to account openID of external platform. (max 100 OpenIDs)
*
* @param AccountProvider Account service provider: 0 means FAS, 1 means INTL, 2 means MSDK, 3 means WeGame.
* @param AccountOpenIds Account openIDs of external platform.
* @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 BatchOpenIDToPlayerID(
int32 AccountProvider,
const TArray<FString>& AccountOpenIds,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchOpenIDToPlayerIDRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
AccountProviderint32Account service provider: 0 means FAS, 1 means INTL, 2 means MSDK, 3 means WeGame.
AccountOpenIdsconst TArray<FString>&Account openIDs of external platform.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchOpenIDToPlayerIDRsp* 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