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 player_id The player to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPlayerInfo(
const pgos::pstring& player_id,
PgosDataCallback<PlayerDetail> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player to query.
result_callbackPgosDataCallback<PlayerDetail>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_ids The players to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetPlayerInfo(
const pgos::pvector<pgos::pstring>& player_ids,
PgosDataCallback<BatchGetPlayerInfoSvrRsp> result_callback);

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&The players to query.
result_callbackPgosDataCallback<BatchGetPlayerInfoSvrRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetOneOfPlayerKVData

Query the specified kvdata of the specified player.

/**
* Query the specified kvdata of the specified player.
*
* @param player_id The player to query.
* @param query_key The key to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetOneOfPlayerKVData(
const pgos::pstring& player_id,
const pgos::pstring& query_key,
PgosDataCallback<OnePlayerKVData> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player to query.
query_keyconst std::string&The key to query.
result_callbackPgosDataCallback<OnePlayerKVData>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetPlayerKVData

Query certain kvdata of the specified player.

/**
* Query certain kvdata of the specified player.
*
* @param player_id The player to query.
* @param query_keys Keys to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPlayerKVData(
const pgos::pstring& player_id,
const pgos::pvector<pgos::pstring>& query_keys,
PgosDataCallback<PlayerKVDataGroupWithFails> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player to query.
query_keysconst std::vector<std::string>&Keys to query.
result_callbackPgosDataCallback<PlayerKVDataGroupWithFails>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_ids Players to query.
* @param query_keys Keys to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetPlayerKVData(
const pgos::pvector<pgos::pstring>& player_ids,
const pgos::pvector<pgos::pstring>& query_keys,
PgosDataCallback<BatchPlayerKVDataGroupWithFails> result_callback);

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&Players to query.
query_keysconst std::vector<std::string>&Keys to query.
result_callbackPgosDataCallback<BatchPlayerKVDataGroupWithFails>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetPlayerGroupKVData

Query the specified group kvdata of the specified player.

/**
* Query the specified group kvdata of the specified player.
*
* @param player_id Player to query.
* @param group_name Name of the specified group.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPlayerGroupKVData(
const pgos::pstring& player_id,
const pgos::pstring& group_name,
PgosDataCallback<PlayerKVDataGroup> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Player to query.
group_nameconst std::string&Name of the specified group.
result_callbackPgosDataCallback<PlayerKVDataGroup>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_ids Players to query.
* @param group_name Name of the specified group.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetPlayerGroupKVData(
const pgos::pvector<pgos::pstring>& player_ids,
const pgos::pstring& group_name,
PgosDataCallback<BatchPlayerKVDataGroup> result_callback);

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&Players to query.
group_nameconst std::string&Name of the specified group.
result_callbackPgosDataCallback<BatchPlayerKVDataGroup>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetOneOfPlayerKVData

Update the specified kvdata of the specified player.

/**
* Update the specified kvdata of the specified player.
*
* @param player_id Player to query.
* @param key Key to update
* @param value The new value can be set to string/int32/int64/float/double.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetOneOfPlayerKVData(
const pgos::pstring& player_id,
const pgos::pstring& key,
const KVDataValue& value,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Player to query.
keyconst std::string&Key to update
valueconst KVDataValue&The new value can be set to string/int32/int64/float/double.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_id Player to update kvdata.
* @param kvdata KVData to update.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetPlayerKVData(
const pgos::pstring& player_id,
const pgos::pmap<pgos::pstring, KVDataValue>& kvdata,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Player to update kvdata.
kvdataconst std::map<std::string, KVDataValue>&KVData to update.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchSetPlayerKVData(
const pgos::pvector<PlayerKVDataGroup>& kvdatas,
PgosDataCallback<BatchPlayerOperationResult> result_callback);

Parameters:

ParamTypeDescription
kvdatasconst std::vector<PlayerKVDataGroup>&
result_callbackPgosDataCallback<BatchPlayerOperationResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_id Player to operate.
* @param key Key to operate.
* @param increment The increment value can be set to int32/int64/float/double.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void IncrOneOfPlayerKVData(
const pgos::pstring& player_id,
const pgos::pstring& key,
const KVDataValue& increment,
PgosDataCallback<OnePlayerKVData> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Player to operate.
keyconst std::string&Key to operate.
incrementconst KVDataValue&The increment value can be set to int32/int64/float/double.
result_callbackPgosDataCallback<OnePlayerKVData>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_ids Players to operate.
* @param key Key to operate.
* @param increment The increment value can be set to int32/int64/float/double.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchIncrOneOfPlayerKVData(
const pgos::pvector<pgos::pstring>& player_ids,
const pgos::pstring& key,
const KVDataValue& increment,
PgosDataCallback<BatchIncrOneOfPlayerKVDataRsp> result_callback);

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&Players to operate.
keyconst std::string&Key to operate.
incrementconst KVDataValue&The increment value can be set to int32/int64/float/double.
result_callbackPgosDataCallback<BatchIncrOneOfPlayerKVDataRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_id Player to operate.
* @param increments Increments to update, key: kvdata key, value: increment of the value.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void IncrPlayerKVData(
const pgos::pstring& player_id,
const pgos::pmap<pgos::pstring, KVDataValue>& increments,
PgosDataCallback<PlayerKVDataGroup> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Player to operate.
incrementsconst std::map<std::string, KVDataValue>&Increments to update, key: kvdata key, value: increment of the value.
result_callbackPgosDataCallback<PlayerKVDataGroup>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchIncrPlayerKVData(
const pgos::pvector<PlayerKVDataGroup>& increments,
PgosDataCallback<BatchPlayerKVDataGroup> result_callback);

Parameters:

ParamTypeDescription
incrementsconst std::vector<PlayerKVDataGroup>&Player kvdata increments list.
result_callbackPgosDataCallback<BatchPlayerKVDataGroup>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchIncrPlayerKVDataIdempotent(
const BatchIncrPlayerKVDataIdempotentParams& params,
PgosDataCallback<BatchIncrPlayerKVDataIdempotentResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst BatchIncrPlayerKVDataIdempotentParams&Params of BatchIncrPlayerKVDataIdempotent.
result_callbackPgosDataCallback<BatchIncrPlayerKVDataIdempotentResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_id The player to query.
* @param query_keys Keys to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPlayerVersionedKVData(
const pgos::pstring& player_id,
const pgos::pvector<pgos::pstring>& query_keys,
PgosDataCallback<PlayerKVDataGroupWithVerAndFails> result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player to query.
query_keysconst std::vector<std::string>&Keys to query.
result_callbackPgosDataCallback<PlayerKVDataGroupWithVerAndFails>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 player_ids Players to query.
* @param query_keys Keys to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetPlayerVersionedKVData(
const pgos::pvector<pgos::pstring>& player_ids,
const pgos::pvector<pgos::pstring>& query_keys,
PgosDataCallback<BatchPlayerKVDataGroupWithVerAndFails> result_callback);

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&Players to query.
query_keysconst std::vector<std::string>&Keys to query.
result_callbackPgosDataCallback<BatchPlayerKVDataGroupWithVerAndFails>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetPlayerVersionedKVData(
const PlayerKVDataGroupWithVer& data,
PgosDataCallback<PlayerKVDataGroupWithVer> result_callback);

Parameters:

ParamTypeDescription
dataconst PlayerKVDataGroupWithVer&Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
result_callbackPgosDataCallback<PlayerKVDataGroupWithVer>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchSetPlayerVersionedKVData(
const pgos::pvector<PlayerKVDataGroupWithVer>& data,
PgosDataCallback<BatchSetPlayerVersionedKVDataRsp> result_callback);

Parameters:

ParamTypeDescription
dataconst std::vector<PlayerKVDataGroupWithVer>&Versioned kvdata items that need to update. Please set version to the latest value you got for the player.
result_callbackPgosDataCallback<BatchSetPlayerVersionedKVDataRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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 account_provider Account service provider: 0 means FAS, 1 means INTL, 2 means MSDK, 3 means WeGame.
* @param account_open_ids Account openIDs of external platform.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchOpenIDToPlayerID(
int32_t account_provider,
const pgos::pvector<pgos::pstring>& account_open_ids,
PgosDataCallback<BatchOpenIDToPlayerIDRsp> result_callback);

Parameters:

ParamTypeDescription
account_providerint32_tAccount service provider: 0 means FAS, 1 means INTL, 2 means MSDK, 3 means WeGame.
account_open_idsconst std::vector<std::string>&Account openIDs of external platform.
result_callbackPgosDataCallback<BatchOpenIDToPlayerIDRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void