Skip to main content

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

APIDescription
GetBlocklistGet my blocklist
AddToBlocklistAdd the player to my blocklist
RemoveFromBlocklistRemove the player from my blocklist
SyncAPBlocklistSynchronize account platform blocklist to PGOS. The result returns the all blocklist
SyncAPBlocklistAddedSynchronize added account platform blocklist to PGOS.
SyncAPBlocklistRemovedSynchronize removed account platform blocklist to PGOS.
SyncAPVoiceBlocklistSynchronize 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:

ParamTypeDescription
ResultCallbackTFunction<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:

ParamTypeDescription
PlayerIdconst FString&The player id to add
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

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:

ParamTypeDescription
PlayerIdconst FString&The player id to remove
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

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:

ParamTypeDescription
PlayerIdsconst TArray<FString>&The player ids to Synchronize.
ResultCallbackTFunction<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:

ParamTypeDescription
PlayerIdconst FString&Added platform blocklist player to Synchronize.
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

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:

ParamTypeDescription
PlayerIdconst FString&Removed platform blocklist player to Synchronize.
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

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:

ParamTypeDescription
PlayerIdsconst TArray<FString>&The player ids to Synchronize.
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