Interact with the BeatLeader Leaderboard API endpoints
- Source
Methods
(static) get(leaderboardSearchOptions) → {Promise}
Retrieves a list of leaderboards
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
leaderboardSearchOptions | Object | Filters to narrow search. See options in table below
|
- Source
Returns:
A promise with a list of leaderboards
- Type:
- Promise
(static) getById(id, leaderboardSearchOptions) → {Promise}
Retrieves a list of leaderboards
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | string | ID of the leaderboard to retrieve details for | ||||||||||||||||||||||||||||||||||||||||||||||||||||
leaderboardSearchOptions | Object | Filters to narrow search. See options in table below
|
- Source
Returns:
A promise with leaderboard details
- Type:
- Promise
(static) getClanRankingsById(id, page, count) → {Promise}
Retrieves clan rankings for a leaderboard
Parameters:
Name | Type | Description |
---|---|---|
id | string | ID of the leaderboard to retrieve clan rankings for |
page | number | Page number for pagination, default is 1 |
count | number | Number of rankings per page, default is 10 |
Returns:
A promise with clan rankings
- Type:
- Promise
(static) getScoregraphById(id) → {Promise}
Retrieves the score graph for a leaderboard
Parameters:
Name | Type | Description |
---|---|---|
id | string | ID of the leaderboard to retrieve the score graph for |
Returns:
A promise with score graph data
- Type:
- Promise