作る

FunnableRanking

Tiny HTTP client focused on leaderboard endpoints for the active game. Handles URL construction so your game only needs to provide scores.

FunnableRanking

Tiny HTTP client focused on leaderboard endpoints for the active game. Handles URL construction so your game only needs to provide scores.

Members

submitScore

submitScore(score: number): Promise<void>

Persists the player's score and lets the backend compute their rank.

Examples

await sdk.ranking.submitScore(finalScore);

getLeaderboard

getLeaderboard(limit?: number): Promise<LeaderboardEntry[]>

Fetches the top entries for the leaderboard.

getMyRank

getMyRank(): Promise<LeaderboardEntry | null>

Returns the current player rank if they have submitted a score.