Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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 Parameter
Options extends LeaderboardOptions
Parameter Type
authority Authority
handle LeaderboardHandle<Options>
fetchLeaderboardOptions FetchLeaderboardOptions

void

fetchLeaderboard(step, leaderboards.fastestLap.for("sunset-loop"), { limit: 10 });