Leaderboard

The Leaderboard object is the data container for leaderboard information.
public class Leaderboard

A Leaderboard object is returned on successful calls to the LeaderboardService get() and update() methods.

Properties

Property

Type

Description

total

Number

Total number of entries in this leaderboard.

limit

Number

Maximum number of leaders returned in this leaderboard instance. The actual number of leader entries

page

Number

The page from which this group of leaders is drawn

pages

Number

The total number of pages in this leaderboard, where page and pages can be used as { page of pages }.

docs

JsonArray

JSON array of leaders; may contain 0 or more entries.

All class properties are private and are accessible only through getter methods.

‚Äč

Methods

getLeaders

Method for extracting the Leader array from the Leaderboard object.

public ArrayList<Leader> getLeaders()

Property

Type

Description

returns

ArrayList<Leader>

An array containing 0 or more Leader objects.g

getNumber

Method for getting the total number of members in this leaderboard.

public Number getTotal()

getLimit

Method for getting the maximum number of entries in the Leader list of this object (could be less on last page).

public Number getLimit()

getPage

Method for getting the current page.

public Number getPage()

getPages

Method for getting the total number of pages in this leaderboard. Useful for paging through the leaderboard or display.

public Number getPages()