fetchLeaderboard
fetchLeaderboard<
Options>(authority,handle,fetchLeaderboardOptions?):void
Asks the platform for the first rows of a board of the room’s game, its
current period’s, the one before or one by id, whatever the board’s
audience: LeaderboardFetchedEvent answers on a later tick. Call it from
the room’s step, at most 60 times a minute. Where no room runs the
world, nothing answers.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Options extends LeaderboardOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
Authority |
handle |
LeaderboardHandle<Options> |
fetchLeaderboardOptions |
FetchLeaderboardOptions |
Returns
Section titled “Returns”void
Example
Section titled “Example”fetchLeaderboard(step, leaderboards.fastestLap.for("sunset-loop"), { limit: 10 });