Last updated:
0 purchases
lichess client dio
Lichess for Dart #
This is a library for interacting with Lichess API. It works on all platforms and exposes a collection of data classes and a extendable client interface.
Notice: This is not an official Lichess project. It is maintained by volunteers.
Installation #
dependencies:
lichess_client_dio: ^<latest-version>
copied to clipboard
Import:
import 'package:lichess_client_dio/lichess_client_dio.dart';
copied to clipboard
Usage #
The usage is pretty straightforward:
final lichess = LichessClientDio.create();
final user = await lichess.users.getPublicData(username: 'alexrintt');
// If you wanna make authenticated requests:
final lichess = LichessClientDio.create(accessToken: '<your-access-token>');
final email = await lichess.account.getEmailAddress();
copied to clipboard
Services that are currently available (complete or partially complete):
✅ Account.
✅ Users.
✅ Relations.
✅ Games.
✅ TV.
✅ Puzzles.
✅ Teams.
✅ Board.
❌ Bot.
❌ Challenges.
❌ Bulk pairings.
❌ Arena tournaments.
❌ Swiss tournaments.
❌ Simuls.
❌ Studies.
❌ Messaging.
❌ Broadcasts.
❌ Analysis.
❌ External engine.
❌ Opening Explorer.
❌ Tablebase.
❌ OAuth.
All services are accessible by lichess.<service-name>.<endpoint-name>(...).
Custom Dio instance #
By default, this package uses fresh Dio instance for handling HTTP requests, if you want to provide a custom instance, use dio argument:
final myDioInstance = Dio();
final lichess = LichessClientDio.create(dio: myDioInstance);
copied to clipboard
Retrieve access token #
TL;DR: This package doesn't handle authentication for Lichess.
That said, to get an access token for your platform and for your use-case refer to the Lichess authentication section.
Contributing #
TODO.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.