BoardServiceDio class abstract
Play on Lichess with physical boards and third-party clients. Works with normal Lichess accounts. Engine play or assistance is forbidden.
Features
- Stream incoming chess moves.
- Play chess moves.
- Read and write in the player and spectator chats.
- Receive, create and accept (or decline) challenges.
- Abort and resign games.
- Compatible with normal Lichess accounts.
- Implemented types
- Annotations
-
- @RestApi()
Constructors
- BoardServiceDio(Dio dio)
-
factory
- BoardServiceDio.create({String? accessToken, String baseUrl = 'https://lichess.org'})
-
factory
Properties
- dio → Dio
-
Dio client linked with this service instance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abortGame(
String gameId) → Future< void> -
Abort a game being played with the Board API.
override
-
claimVictory(
String gameId) → Future< void> -
Claim victory when the opponent has left the game for a while.
override
-
close(
{bool force = false}) → Future< void> -
Close the dio instance associated with this service instance.
override
-
createCorrespondenceSeek(
{required DaysPerTurn days, bool rated = false, LichessVariantKey variant = LichessVariantKey.standard, LichessChallengeColor color = LichessChallengeColor.random, double? time, int? increment, int? maxRating, int? minRating}) → Future< Future< void> Function()> -
Create a seek
override
-
createRealTimeSeek(
{required int increment, required double time, DaysPerTurn? days, bool rated = false, LichessVariantKey variant = LichessVariantKey.standard, LichessChallengeColor color = LichessChallengeColor.random, int? maxRating, int? minRating}) → Future< Future< void> Function()> -
Create a seek
override
-
fetchGameChat(
String gameId) → Stream< LichessGameChatMessage> -
Get the messages posted in the game chat.
override
-
makeBoardMove(
{required String gameId, required String move, bool? offeringDraw}) → Future< void> -
Make a move in a game being played with the Board API.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resignGame(
String gameId) → Future< void> -
Resign a game being played with the Board API.
override
-
streamBoardGameState(
{required String gameId}) → Stream< LichessBoardGameEvent> -
Stream the state of a game being played with the Board API, as ndjson.
override
-
streamIncomingEvents(
) → Stream< LichessBoardGameIncomingEvent> -
Stream the events reaching a lichess user in real time as ndjson.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
writeInTheChat(
{required String gameId, required LichessChatLineRoom room, required String text}) → Future< void> -
Post a message to the player or spectator chat, in a game being played with the Board API.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited