Client Leaderboard API Reference
Nowadays, the leaderboard is almost an essential feature for online games. By displaying the Leaderboard and player ranking details, you can create a great competitive atmosphere for the players.
API List
| API | Description |
|---|---|
| GetRankingList | Query the current ranking list of the specified leaderboard. |
| GetRankingItemPos | Query the current ranking list item with neighbor items of the specified leaderboard. |
| GetFriendsRankingList | Query the current friends ranking list of the specified leaderboard. The leaderboard's stat item key should be filled with player id. |
API Details
GetRankingList
Query the current ranking list of the specified leaderboard.
/**
* Query the current ranking list of the specified leaderboard.
*
* @param Params Request structure for querying the current ranking list.
* @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 GetRankingList(
const FPgosClientGetRankingListParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLBRankingListResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosClientGetRankingListParams& | Request structure for querying the current ranking list. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientLBRankingListResult* 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
GetRankingItemPos
Query the current ranking list item with neighbor items of the specified leaderboard.
/**
* Query the current ranking list item with neighbor items of the specified leaderboard.
*
* @param Params Request structure for querying the current ranking list item with neighbor items.
* @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 GetRankingItemPos(
const FPgosClientGetRankingItemPosParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLBRankingItemPos* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosClientGetRankingItemPosParams& | Request structure for querying the current ranking list item with neighbor items. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientLBRankingItemPos* 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
GetFriendsRankingList
Query the current friends ranking list of the specified leaderboard. The leaderboard's stat item key should be filled with player id.
/**
* Query the current friends ranking list of the specified leaderboard. The leaderboard's stat item key should be filled with player id.
*
* @param Params Request structure for querying the current friends ranking list.
* @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 GetFriendsRankingList(
const FPgosClientGetFriendsRankingListParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLBFriendsRankingListResult* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Params | const FPgosClientGetFriendsRankingListParams& | Request structure for querying the current friends ranking list. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientLBFriendsRankingListResult* 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