Client Blocklist API Reference
The Blocklist service provides allows developers to manage player blocklists. No notification will be pushed to blocked player when they are added to or removed from the blocklist. Each player can add any other player to the blocklist, which is used to restrict their interactive behaviors, such as chatting, friend requests, teaming up, and so on.
API List
| API | Description |
|---|---|
| GetBlocklist | Get my blocklist |
| AddToBlocklist | Add the player to my blocklist |
| RemoveFromBlocklist | Remove the player from my blocklist |
| SyncAPBlocklist | Synchronize account platform blocklist to PGOS. The result returns the all blocklist |
| SyncAPBlocklistAdded | Synchronize added account platform blocklist to PGOS. |
| SyncAPBlocklistRemoved | Synchronize removed account platform blocklist to PGOS. |
| SyncAPVoiceBlocklist | Synchronize account platform voice blocklist to PGOS. For platforms with voice blocklist such as XBOX |
API Details
GetBlocklist
Get my blocklist
/**
* Get my blocklist
*
* @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 GetBlocklist(
TFunction<void(const FPgosResult& Ret, const FPgosClientBlocklistInfo* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientBlocklistInfo* 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
AddToBlocklist
Add the player to my blocklist
/**
* Add the player to my blocklist
*
* @param PlayerId The player id to add
* @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 AddToBlocklist(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | The player id to add |
| 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
RemoveFromBlocklist
Remove the player from my blocklist
/**
* Remove the player from my blocklist
*
* @param PlayerId The player id to remove
* @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 RemoveFromBlocklist(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | The player id to remove |
| 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
SyncAPBlocklist
Synchronize account platform blocklist to PGOS. The result returns the all blocklist
/**
* Synchronize account platform blocklist to PGOS. The result returns the all blocklist
*
* @param PlayerIds The player ids to Synchronize.
* @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 SyncAPBlocklist(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncAccountPlatformBlocklistResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | The player ids to Synchronize. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientSyncAccountPlatformBlocklistResult* 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
SyncAPBlocklistAdded
Synchronize added account platform blocklist to PGOS.
/**
* Synchronize added account platform blocklist to PGOS.
*
* @param PlayerId Added platform blocklist player to Synchronize.
* @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 SyncAPBlocklistAdded(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Added platform blocklist player to Synchronize. |
| 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
SyncAPBlocklistRemoved
Synchronize removed account platform blocklist to PGOS.
/**
* Synchronize removed account platform blocklist to PGOS.
*
* @param PlayerId Removed platform blocklist player to Synchronize.
* @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 SyncAPBlocklistRemoved(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerId | const FString& | Removed platform blocklist player to Synchronize. |
| 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
SyncAPVoiceBlocklist
Synchronize account platform voice blocklist to PGOS. For platforms with voice blocklist such as XBOX
/**
* Synchronize account platform voice blocklist to PGOS. For platforms with voice blocklist such as XBOX
*
* @param PlayerIds The player ids to Synchronize.
* @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 SyncAPVoiceBlocklist(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| PlayerIds | const TArray<FString>& | The player ids to Synchronize. |
| 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