Skip to main content

Server Friend API Reference

The Friends service allows developers to manage the player's friend list. The player can invite friends to join a party for matchmaking or to chat.

API List​

APIDescription
BatchSetPlayerFriendsLimitBatch set the maximum limit of friends players can have. (max 100 players, max 500 friends per player)
BatchGetPlayerFriendsLimitBatch query the maximum limit of friends players can have. (max 100 players)
GetFriendListRetrieve the specified player's friends list (including friends' player info, player presence, and remark).

API Details​

BatchSetPlayerFriendsLimit​

Batch set the maximum limit of friends players can have. (max 100 players, max 500 friends per player)

/**
* Batch set the maximum limit of friends players can have. (max 100 players, max 500 friends per player)
*
* @param params Request struct for set friend remark.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchSetPlayerFriendsLimit(
const BatchSetPlayerFriendsLimitParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst BatchSetPlayerFriendsLimitParams&Request struct for set friend remark.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchGetPlayerFriendsLimit​

Batch query the maximum limit of friends players can have. (max 100 players)

/**
* Batch query the maximum limit of friends players can have. (max 100 players)
*
* @param params Request struct for set friend remark.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetPlayerFriendsLimit(
const BatchGetPlayerFriendsLimitParams& params,
PgosDataCallback<BatchGetPlayerFriendsLimitResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst BatchGetPlayerFriendsLimitParams&Request struct for set friend remark.
result_callbackPgosDataCallback<BatchGetPlayerFriendsLimitResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetFriendList​

Retrieve the specified player's friends list (including friends' player info, player presence, and remark).

/**
* Retrieve the specified player's friends list (including friends' player info, player presence, and remark).
*
* @param params Request struct for get friend list.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetFriendList(
const GetFriendListParams& params,
PgosDataCallback<FriendListInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst GetFriendListParams&Request struct for get friend list.
result_callbackPgosDataCallback<FriendListInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void