Client PlayerProfile API Reference
Player Info is the core attribute collection used to describe a player.
API List
| API | Description |
|---|---|
| GetMyInfo | Query the current player's profile. |
| SetMyName | Update current player's display name. |
| SetMyAvatar | Update the current player's avatar |
| SetMyLanguage | Update the current player's language |
| SetMyGender | Update the current player's gender |
| GetPlayerInfo | Query a player's info |
| 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. |
| GetOneOfMyKVData | Query the specified kvdata of the current player. |
| GetMyKVData | Query certain kvdata of the current player. |
| GetAllOfMyKVData | Query all accessible kvdata of the current player. |
| GetMyPublicKVData | Query all public kvdata of the current player. |
| GetMyGroupKVData | Query the specified group kvdata of the current player. Keys in the group that are not accessible to the current player will be ignored. |
| SetOneOfMyKVData | Update the specified kvdata of the current player. |
| SetMyKVData | Update kvdata of the current player. The update operation for a player's KVData will either succeed as a whole or fail as a whole. |
| IncrOneOfMyKVData | Perform atomic increment operation on a specific kvdata item for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data. |
| IncrMyKVData | Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data. |
| IncrMyKVDataIdempotent | Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data. |
| GetOneOfPlayerKVData | Query the specified kvdata of the specified player. |
| GetPlayerKVData | Query certain kvdata of the specified player. |
| 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. |
| GetPlayerPublicKVData | Query all public kvdata of the specified player. |
| BatchGetPlayerPublicKVData | Perform a batch query of public 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. |
| GetPlayerGroupKVData | Query the specified group kvdata of the specified player. Keys in the group that are not accessible to the current player will be ignored. |
| BatchGetPlayerGroupKVData | Perform a batch query of the specified group KVData for multiple players (max 100 players). Keys in the group that are not accessible to the current player will be ignored. 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. |
| GetMyVersionedKVData | Query certain versioned kvdata of the current 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. |
| SetMyVersionedKVData | Update versioned kvdata for the current 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 'GetMyVersionedKVData' 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. |
| SetMyPresence | Update current player's presence. |
| GetMyPresence | Query current player's presence. |
| GetPlayerPresence | Query a player's presence. |
| BatchGetPlayerPresence | Query multiple players' presence. (max 100 players) |
| GetPlayerProfile | Query a player's profile, including player information, relationship information, etc. |
| BatchOpenIDToPlatformPlayerInfo | Batch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported) |
| BatchAccountIDToPlayerID | Batch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs) |
API Details
GetMyInfo
Query the current player's profile.
/**
* Query the current player's profile.
*
* @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 GetMyInfo(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerDetail* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<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
SetMyName
Update current player's display name.
/**
* Update current player's display name.
*
* @param DisplayName Set the current player's display name. The display name length is limited to 2 to 64 characters.
* @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 SetMyName(
const FString& DisplayName,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| DisplayName | const FString& | Set the current player's display name. The display name length is limited to 2 to 64 characters. |
| ResultCallback | TFunction<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
SetMyAvatar
Update the current player's avatar
/**
* Update the current player's avatar
*
* @param AvatarUri The new URI of the player avatar.
* @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 SetMyAvatar(
const FString& AvatarUri,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| AvatarUri | const FString& | The new URI of the player avatar. |
| ResultCallback | TFunction<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
SetMyLanguage
Update the current player's language
/**
* Update the current player's language
*
* @param Language The new gender.
* @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 SetMyLanguage(
const FString& Language,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Language | const FString& | The new gender. |
| ResultCallback | TFunction<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
SetMyGender
Update the current player's gender
/**
* Update the current player's gender
*
* @param Gender The new language.
* @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 SetMyGender(
const FString& Gender,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Gender | const FString& | The new language. |
| ResultCallback | TFunction<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
GetPlayerInfo
Query a player's info
/**
* Query a player's info
*
* @param PlayerId The player id 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 FPgosPlayerInfo* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | The player id to query. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosPlayerInfo* 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 player_ids 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 FPgosClientBatchGetPlayerInfoCltRsp* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | The player_ids to query. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerInfoCltRsp* 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
GetOneOfMyKVData
Query the specified kvdata of the current player.
/**
* Query the specified kvdata of the current player.
*
* @param QueryKey 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 GetOneOfMyKVData(
const FString& QueryKey,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| QueryKey | const FString& | Key to query |
| ResultCallback | TFunction<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
GetMyKVData
Query certain kvdata of the current player.
/**
* Query certain kvdata of the current player.
*
* @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 GetMyKVData(
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| QueryKeys | const TArray<FString>& | Keys to query |
| ResultCallback | TFunction<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
GetAllOfMyKVData
Query all accessible kvdata of the current player.
/**
* Query all accessible kvdata of the current 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 GetAllOfMyKVData(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<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
GetMyPublicKVData
Query all public kvdata of the current player.
/**
* Query all public kvdata of the current 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 GetMyPublicKVData(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<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
GetMyGroupKVData
Query the specified group kvdata of the current player. Keys in the group that are not accessible to the current player will be ignored.
/**
* Query the specified group kvdata of the current player.
* Keys in the group that are not accessible to the current player will be ignored.
*
* @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 GetMyGroupKVData(
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| GroupName | const FString& | Name of the specified group. |
| ResultCallback | TFunction<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
SetOneOfMyKVData
Update the specified kvdata of the current player.
/**
* Update the specified kvdata of the current player.
*
* @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 SetOneOfMyKVData(
const FString& Key,
const FPgosKVDataValue& Value,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Key | const FString& | Key to update |
| Value | const FPgosKVDataValue& | The new value can be set to string/int32/int64/float/double. |
| ResultCallback | TFunction<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
SetMyKVData
Update kvdata of the current player. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
/**
* Update kvdata of the current player.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @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 SetMyKVData(
const TMap<FString, FPgosKVDataValue>& Kvdata,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Kvdata | const TMap<FString, FPgosKVDataValue>& | KVData to update. |
| ResultCallback | TFunction<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
IncrOneOfMyKVData
Perform atomic increment operation on a specific kvdata item for the current 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 specific kvdata item for the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @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 IncrOneOfMyKVData(
const FString& Key,
const FPgosKVDataValue& Increment,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Key | const FString& | Key to operate. |
| Increment | const FPgosKVDataValue& | The increment value can be set to int32/int64/float/double. |
| ResultCallback | TFunction<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
IncrMyKVData
Perform atomic increment operation on multiple kvdata items for the current 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 the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @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 IncrMyKVData(
const TMap<FString, FPgosKVDataValue>& Increments,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Increments | const TMap<FString, FPgosKVDataValue>& | Increments to update, key: kvdata key, value: increment of the value. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroup* 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
IncrMyKVDataIdempotent
Perform atomic increment operation on multiple kvdata items for the current 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 the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param Params Params of IncrMyKVDataIdempotent.
* @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 IncrMyKVDataIdempotent(
const FPgosClientIncrMyKVDataIdempotentParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientIncrMyKVDataIdempotentResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosClientIncrMyKVDataIdempotentParams& | Params of IncrMyKVDataIdempotent. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientIncrMyKVDataIdempotentResult* 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 Player to query.
* @param QueryKey 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:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Player to query. |
| QueryKey | const FString& | Key to query. |
| ResultCallback | TFunction<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 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:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Player to query. |
| QueryKeys | const TArray<FString>& | Keys to query. |
| ResultCallback | TFunction<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:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | Players to query. |
| QueryKeys | const TArray<FString>& | Keys to query. |
| ResultCallback | TFunction<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
GetPlayerPublicKVData
Query all public kvdata of the specified player.
/**
* Query all public kvdata of the specified player.
*
* @param PlayerId 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 GetPlayerPublicKVData(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Player to query. |
| ResultCallback | TFunction<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
BatchGetPlayerPublicKVData
Perform a batch query of public 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 public 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 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 BatchGetPlayerPublicKVData(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | Players to query. |
| ResultCallback | TFunction<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
GetPlayerGroupKVData
Query the specified group kvdata of the specified player. Keys in the group that are not accessible to the current player will be ignored.
/**
* Query the specified group kvdata of the specified player.
* Keys in the group that are not accessible to the current player will be ignored.
*
* @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:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Player to query. |
| GroupName | const FString& | Name of the specified group. |
| ResultCallback | TFunction<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). Keys in the group that are not accessible to the current player will be ignored. 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).
* Keys in the group that are not accessible to the current player will be ignored.
* 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:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | Players to query. |
| GroupName | const FString& | Name of the specified group. |
| ResultCallback | TFunction<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
GetMyVersionedKVData
Query certain versioned kvdata of the current 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 current 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 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 GetMyVersionedKVData(
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVerAndFails* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| QueryKeys | const TArray<FString>& | Keys to query. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVerAndFails* 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
SetMyVersionedKVData
Update versioned kvdata for the current 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 'GetMyVersionedKVData' 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 current 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 'GetMyVersionedKVData' 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 the 'version' field 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 SetMyVersionedKVData(
const FPgosKVDataGroupWithVer& Data,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVer* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Data | const FPgosKVDataGroupWithVer& | Versioned kvdata items that need to update. Please set the 'version' field to the latest value you got for the player. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVer* 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
SetMyPresence
Update current player's presence.
/**
* Update current player's presence.
*
* @param Presence The new presence, its maximum length is 128 characters.
* @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 SetMyPresence(
const FString& Presence,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Presence | const FString& | The new presence, its maximum length is 128 characters. |
| ResultCallback | TFunction<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
GetMyPresence
Query current player's presence.
/**
* Query current player's presence.
*
* @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 GetMyPresence(
TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* 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
GetPlayerPresence
Query a player's presence.
/**
* Query a player's presence.
*
* @param PlayerId The player id 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 GetPlayerPresence(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | The player id to query |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* 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
BatchGetPlayerPresence
Query multiple players' presence. (max 100 players)
/**
* Query multiple players' presence. (max 100 players)
*
* @param PlayerIds A list containing player ID
* @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 BatchGetPlayerPresence(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerPresenceRsp* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | A list containing player ID |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerPresenceRsp* 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
GetPlayerProfile
Query a player's profile, including player information, relationship information, etc.
/**
* Query a player's profile, including player information, relationship information, etc.
*
* @param PlayerId The player id 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 GetPlayerProfile(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientGetPlayerProfileResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | The player id to query |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientGetPlayerProfileResult* 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
BatchOpenIDToPlatformPlayerInfo
Batch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported)
/**
* Batch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported)
*
* @param AccountOpenIds Account openIDs of external platform such as Steam.
* @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 BatchOpenIDToPlatformPlayerInfo(
const TArray<FString>& AccountOpenIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientPlatformPlayerInfoMap* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| AccountOpenIds | const TArray<FString>& | Account openIDs of external platform such as Steam. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientPlatformPlayerInfoMap* 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
BatchAccountIDToPlayerID
Batch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs)
/**
* Batch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs)
*
* @param AccountIds Account IDs of external platform such as PS5.
* @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 BatchAccountIDToPlayerID(
const TArray<FString>& AccountIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientBatchAccountIDToPlayerIDResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| AccountIds | const TArray<FString>& | Account IDs of external platform such as PS5. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientBatchAccountIDToPlayerIDResult* 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