# Leaderboards

`client.Leaderboards` (`LeaderboardsService`), verified against the bundled
`Rudder.Core.dll` and `Samples~/Leaderboards/LeaderboardsSample.cs`.

```csharp
var board = client.Leaderboards.FindBySlug("my-board");
await board.SubmitAsync(score);
var top = await board.ListAsync(10);
```

API:

- `LeaderboardHandle FindBySlug(string slug)` — no network call; returns a
  handle bound to the slug.
- `LeaderboardHandle.SubmitAsync(double score, CancellationToken = default)`
- `LeaderboardHandle.ListAsync(int limit = 100, CancellationToken = default)`
  → `IReadOnlyList<RankEntry>`.
- `LeaderboardHandle.Slug { get; }`

`RankEntry` — `PlayerId`, `PlayerName`, `Rank` (`long?`), `Score`
(`double?`).

The leaderboard slug must exist in the dashboard, else the calls 404. For
scenario leaderboard nodes see `OnLeaderboard` in
[scenarios.md](scenarios.md).
