Enables scripted content fragments to use Leaders
Methods
Get
Gets the leader record for the current user for the specified leaderboard
Velocity
#set($leaderResponse = $core_v2_leader.Get($leaderboardId))
JavaScript
var leaderResponse = core_v2_leader.Get(leaderboardId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
leaderboardId | Int32 | Leaderboard Id | Required |
Returns
List
Velocity
#set($pagedListResponse = $core_v2_leader.List($leaderboardId, "%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortOrder = $sortOrderArg }"))
JavaScript
var pagedListResponse = core_v2_leader.List(leaderboardId, { PageIndex: pageIndexArg, PageSize: pageSizeArg, SortOrder: sortOrderArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
leaderboardId | Int32 | Id of the leaderboard. Required. | Required | ||
PageIndex | Int32 | Which page of leaderboards to return. Optional. | Optional | ||
PageSize | Int32 | Number of leaderboards to return per call. Optional. | Optional | ||
SortOrder | String | Ascending or descending order (by rank). Optional. | Optional | Ascending, Descending |