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.
/// <summary>Query the current ranking list of the specified leaderboard.</summary>
/// <param name="pgos_params">Request structure for querying the current ranking list.</param>
public void GetRankingList(GetRankingListParams pgos_params, LeaderboardDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetRankingListParams | Request structure for querying the current ranking list. |
| callback | LeaderboardDelegate0 |
Return: void
GetRankingItemPos
Query the current ranking list item with neighbor items of the specified leaderboard.
/// <summary>Query the current ranking list item with neighbor items of the specified leaderboard.</summary>
/// <param name="pgos_params">Request structure for querying the current ranking list item with neighbor items.</param>
public void GetRankingItemPos(GetRankingItemPosParams pgos_params, LeaderboardDelegate1 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetRankingItemPosParams | Request structure for querying the current ranking list item with neighbor items. |
| callback | LeaderboardDelegate1 |
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.
/// <summary>Query the current friends ranking list of the specified leaderboard. The leaderboard's stat item key should be filled with player id.</summary>
/// <param name="pgos_params">Request structure for querying the current friends ranking list.</param>
public void GetFriendsRankingList(GetFriendsRankingListParams pgos_params, LeaderboardDelegate2 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetFriendsRankingListParams | Request structure for querying the current friends ranking list. |
| callback | LeaderboardDelegate2 |
Return: void
All Delegates
public delegate void LeaderboardDelegate0(PgosResult a0, LBRankingListResult a1);
public delegate void LeaderboardDelegate1(PgosResult a0, LBRankingItemPos a1);
public delegate void LeaderboardDelegate2(PgosResult a0, LBFriendsRankingListResult a1);
Type Reference: