Releases: Dblike/LichessSharp
v1.0.0
Added
GameSourceenum — Replaces stringly-typedSourceproperties onGameJson,MoveStreamEvent, andOngoingGamewith a strongly-typed enum (13 values: Lobby, Friend, Ai, Api, Tournament, Position, Import, ImportLive, Simul, Relay, Pool, Arena, Swiss)JudgmentNameenum — ReplacesJudgment.Namestring with Inaccuracy, Mistake, Blunder enum valuesStreamingServiceenum — ReplacesStreamInfo.Servicestring with Twitch, YouTube enum values- Rate-limit-aware integration test framework —
LichessTestFixturewith 1.5s request throttling and sequential test execution via xUnit[Collection]
Changed
- BREAKING: Stringly-typed response properties replaced with enums — All
Title,Color, andSourceproperties on response models now use strongly-typed enums instead ofstring?. This affects 30+ properties across all API contracts. Consumers must update string comparisons (e.g.,game.Source == "pool"→game.Source == GameSource.Pool,player.Title == "GM"→player.Title == Title.GM) ChallengeJson.Colornow usesChallengeColorenum — SupportsRandom,White, andBlackvalues (previouslystring?)ChallengeColorenum now has[JsonConverter]— Enables lowercase JSON deserialization- Integration tests run sequentially — All tests share
LichessTestFixturevia[Collection("Lichess API")], eliminating parallel rate limit collisions - Integration test timeout reduced — From 10 minutes to 60 seconds per test (throttling prevents rate limits)
v0.5.1
Added
- Spectator game chat endpoint — New
GetSpectatorChatAsync()onIGamesApifor fetching public spectator chat messages (GET /game/{gameId}/chat, no auth required) BroadcastPlayerGame.FideTimeControldeserialization tests — Validates required field and all accepted values (standard, rapid, blitz)
Changed
- OpenAPI spec updated to v2.0.130 (from v2.0.129)
- Board/Bot
GetChatAsyncdocumentation — Clarified as "player chat" (private between 2 players) to distinguish from the new spectator chat endpoint
v0.5.0
Added
- Create Study endpoint — New
CreateStudyAsync()onIStudiesApifor creating studies viaPOST /api/study(requiresstudy:writescope)
Changed
- OpenAPI spec updated to v2.0.129 (from v2.0.125)
- Opening Explorer now requires authentication — All
IOpeningExplorerApiendpoints require a valid access token following Lichess infrastructure changes - Explorer domain migrated —
explorer.lichess.ovh→explorer.lichess.org - Tablebase domain migrated —
tablebase.lichess.ovh→tablebase.lichess.org BroadcastGameEntry.FideTimeControlis now required — Property changed fromstring?torequired stringper upstream schema change
Fixed
- Masters PGN endpoint path — Fixed
/master/pgn/{gameId}→/masters/pgn/{gameId}to match upstream rename
v0.4.1
v0.4.0
Added
- FIDE player rating history — New
GetPlayerRatingsAsync()endpoint onIFideApireturning standard/rapid/blitz rating history - Broadcast team standings — New
GetTeamStandingsAsync()endpoint onIBroadcastsApireturning team match and player data - PGN export options — Added
clocksandcommentsparameters toExportRoundPgnAsync(),ExportAllRoundsPgnAsync(), andStreamRoundPgnAsync() - Users API FIDE ID option — Added
FideIdoption toGetUserOptionsfor including FIDE IDs in user profiles
Changed
GetUserTeamsAsyncnow requires OAuth
v0.3.1
Added
- UserStreamer and StreamChannel types — New types to correctly model the nested streamer structure in user profiles per OpenAPI spec
Fixed
- UserExtended.Streamer type — Changed
UserExtended.StreamerfromStreamerInfo?to newUserStreamer?type. The Lichess API uses different schemas:StreamerInfo(string URLs) for/api/streamer/live, andUserStreamer(nestedStreamChannelobjects) for user profiles. This fixes deserialization ofUserExtendedresponses.
v0.3.0
Added
-
OAuth API enhancements — Added
GetAuthorizationUrlAsync()andGetAuthorizationUrl()methods toIOAuthApifor streamlined PKCE authorization flows -
New Bot API endpoint — Added
GetOnlineBotUsersAsync()to retrieve currently online bot accounts -
6 new sample projects demonstrating real-world usage patterns:
LichessSharp.SimpleBot— Bot API integration with move generationLichessSharp.PuzzleSolver— Interactive puzzle solving with the Puzzles APILichessSharp.GameArchiver— Export and archive games to PGN filesLichessSharp.TvViewer— Live TV channel streamingLichessSharp.UserStats— User profile and statistics displayLichessSharp.PositionAnalyzer— Cloud evaluation and opening explorer
-
OAuth types registered for AOT — Added
OAuthToken,OAuthTokenInfo, andList<OAuthTokenInfo>to source-generated JSON context
Changed
-
BREAKING:
StreamerInfo.TwitchandStreamerInfo.YouTubereverted fromStreamChannel?back tostring?to match current Lichess API response format (API changed since 0.2.0) -
Studies API —
ExportUserStudiesAsync()now requiresorderparameter (defaults to "newest") per Lichess API requirements
Fixed
-
Studies API 404 errors — Fixed endpoint path to use correct
/api/study/by/prefix -
Games API streaming test — Fixed
StreamGameMovesAsynctest expectations (first event contains game metadata withId, subsequent events containFen)
Documentation
- Consolidated README with wiki documentation
- Updated sample scenarios to favor runnable code over printed examples
v0.2.1
Fixed
-
Bot/Board API polymorphic deserialization —
StreamGameAsync()now correctly deserializes events to their proper types (BotGameFullEvent,BotGameStateEvent,BotChatLineEvent,BotOpponentGoneEventfor Bot API;GameFullEvent,GameStateEvent,ChatLineEvent,OpponentGoneEventfor Board API). Previously all events were returned as the base class, losing subclass-specific properties. (#3) -
OpenAPI schema test path — Fixed test file path for relocated OpenAPI schema (
docs/openapi/)
v0.2.0
Added
-
OpenAPI schema validation testing — Comprehensive test infrastructure to validate C# models against the Lichess OpenAPI specification
OpenApiSchemaReaderfor parsing and resolving OpenAPI schemasModelReflectorfor extracting JSON property metadata from C# types- Automated detection of missing or mismatched
[JsonPropertyName]attributes
-
Fixture-based serialization tests — Real API responses captured as test fixtures
- 35+ JSON fixtures covering Users, Games, Puzzles, Tournaments, Teams, Broadcasts, and more
- Round-trip serialization tests ensuring data preservation
- Field coverage tests detecting unmapped JSON properties
-
Model property additions
GameJson: AddedSource,InitialFen,DaysPerTurn,Tournament,Swiss,DivisionGameDivision: New class for middle game/endgame ply markersUserExtended: AddedPlaying,Streaming,Streamer,Followable,Following,BlockingUser,LightUser: AddedPatronColorUserActivity: AddedStorm,Racer,Streak,Simuls,PatronActivityStorm,ActivityRacer,ActivityStreak,ActivitySimul: New activity typesPuzzleRaceResults: AddedPuzzles,StartsAt,FinishesAt
Changed
- BREAKING:
StreamerInfo.TwitchandStreamerInfo.YouTubechanged fromstring?toStreamChannel?to match actual API response structure
Fixed
StreamerInfodeserialization now correctly handles nested Twitch/YouTube channel objects
v0.1.0
Added
-
Complete Lichess API coverage — 23 API areas with 176 endpoints
- Account, Users, Relations, Games, TV, Puzzles
- Analysis (Cloud Evaluation), Opening Explorer, Tablebase
- Challenges, Board API, Bot API
- Arena Tournaments, Swiss Tournaments, Simuls, Bulk Pairings
- Studies, Broadcasts, Messaging
- Teams, FIDE, OAuth, External Engine
-
Streaming support — Real-time NDJSON streams via
IAsyncEnumerable<T>- Game streams, TV channels, tournament results
- Board/Bot event streams for real-time play
-
Resilient HTTP client
- Automatic retry on rate limits (HTTP 429) with configurable max retries
- Automatic retry on transient network failures (DNS, connection errors)
- Exponential backoff with jitter
-
Developer experience
- Full
CancellationTokensupport on all async methods - Typed exceptions (
LichessNotFoundException,LichessRateLimitException, etc.) - Comprehensive XML documentation
- Works with
HttpClientFactoryand dependency injection
- Full
-
Interactive samples — 11 scenario-based examples demonstrating common patterns
Notes
- Targets .NET 10.0
- Uses
System.Text.Jsonwith AOT preparation (reflection enabled by default)