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 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:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| player_id | const std::string& | The player id to add |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| player_id | const std::string& | The player id to remove |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| player_ids | const std::vector<std::string>& | The player ids to Synchronize. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| player_id | const std::string& | Added platform blocklist player to Synchronize. |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| player_id | const std::string& | Removed platform blocklist player to Synchronize. |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| player_ids | const std::vector<std::string>& | The player ids to Synchronize. |
| result_callback | PgosCallback | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void