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

Parameters:

ParamTypeDescription
result_callbackPgosDataCallback<BlocklistInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

AddToBlocklist

Add the player to my blocklist

/**
* Add the player to my blocklist
*
* @param player_id The player id to add
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void AddToBlocklist(
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player id to add
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RemoveFromBlocklist

Remove the player from my blocklist

/**
* Remove the player from my blocklist
*
* @param player_id The player id to remove
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RemoveFromBlocklist(
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The player id to remove
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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

Parameters:

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

Return: void

SyncAPBlocklistAdded

Synchronize added account platform blocklist to PGOS.

/**
* Synchronize added account platform blocklist to PGOS.
*
* @param player_id Added platform blocklist player to Synchronize.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SyncAPBlocklistAdded(
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Added platform blocklist player to Synchronize.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SyncAPBlocklistRemoved

Synchronize removed account platform blocklist to PGOS.

/**
* Synchronize removed account platform blocklist to PGOS.
*
* @param player_id Removed platform blocklist player to Synchronize.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SyncAPBlocklistRemoved(
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&Removed platform blocklist player to Synchronize.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

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

Parameters:

ParamTypeDescription
player_idsconst std::vector<std::string>&The player ids to Synchronize.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void