Expand description
Leaderboard protocol: submit scores, fetch boards, paginate results.
Speaks JSON over HttpClient (needs the http feature for real
network access). The expected server API:
POST {base}/scoreswith{"player_id", "name", "score", "metadata", "checksum"?, "replay_id"?}, answered with{"rank", "score"}.GET {base}/scores?period=&class=&page=&page_size=answered with either a JSON array of entries or{"entries": [...], "total": N}.GET {base}/scores/{player_id}answered with one entry.
An entry is {"rank", "player_id" (or "id"), "name", "score", "metadata"?, "timestamp"?, "replay_url"?}; numbers may also be strings.
Structs§
- Leaderboard
Client - High-level leaderboard API built on top of HttpClient.
- Leaderboard
Filter - Which part of the board to fetch.
- Score
Entry - One row of a leaderboard.
- Score
Submission - A score to send to the board.
Enums§
- Leaderboard
Event - Results from
LeaderboardClient::drain_events.