sendScore
sendScore<
Options>(handle,score,sendScoreOptions?):Promise<ScoreSentResult>
Sends the player’s score from the page to one of the game’s boards a
page writes, writtenBy: "page": through the app, signed in as the
player, 10 a minute. The board stays untrusted, as the page can edit
anything it holds, and shows so. A score of the wrong shape, or
metadata its schema refuses, throws. Outside the app it goes to the dev
server’s stand-in, and to none on a published page outside the app.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Options extends LeaderboardOptions & object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
handle |
LeaderboardHandle<Options> |
score |
LeaderboardScore<Options> |
sendScoreOptions |
SendScoreOptions<Options> |
Returns
Section titled “Returns”Promise<ScoreSentResult>
Example
Section titled “Example”const sent = await sendScore(leaderboards.bestRun, 41250);