跳到主要内容

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)

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 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 BatchSetPlayerFriendsLimit(
const FPgosServerBatchSetPlayerFriendsLimitParams& Params,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosServerBatchSetPlayerFriendsLimitParams&Request struct for set friend remark.
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

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 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 BatchGetPlayerFriendsLimit(
const FPgosServerBatchGetPlayerFriendsLimitParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosServerBatchGetPlayerFriendsLimitResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosServerBatchGetPlayerFriendsLimitParams&Request struct for set friend remark.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosServerBatchGetPlayerFriendsLimitResult* 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