跳到主要内容

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

APIDescription
GetRankingListQuery the current ranking list of the specified leaderboard.
GetRankingItemPosQuery the current ranking list item with neighbor items of the specified leaderboard.
GetFriendsRankingListQuery 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:

ParamTypeDescription
pgos_paramsGetRankingListParamsRequest structure for querying the current ranking list.
callbackLeaderboardDelegate0

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:

ParamTypeDescription
pgos_paramsGetRankingItemPosParamsRequest structure for querying the current ranking list item with neighbor items.
callbackLeaderboardDelegate1

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:

ParamTypeDescription
pgos_paramsGetFriendsRankingListParamsRequest structure for querying the current friends ranking list.
callbackLeaderboardDelegate2

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: