lichess_client_dio 0.0.9 copy "lichess_client_dio: ^0.0.9" to clipboard
lichess_client_dio: ^0.0.9 copied to clipboard

Lichess HTTP client based on Dio. Cross-platform API wrapper written in pure Dart.

Lichess for Dart #

Pub Version Pub Version

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>

Import:

import 'package:lichess_client_dio/lichess_client_dio.dart';

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();

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);

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.

0
likes
140
pub points
26%
popularity

Publisher

verified publisheralexrintt.io

Lichess HTTP client based on Dio. Cross-platform API wrapper written in pure Dart.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

Funding

Consider supporting this project:

donate.alexrintt.io
github.com
www.patreon.com

License

MIT (LICENSE)

Dependencies

dio, freezed_annotation, json_annotation, lichess_client, ndjson, retrofit

More

Packages that depend on lichess_client_dio