3 releases

0.1.3 Mar 18, 2021
0.1.2 Mar 14, 2021
0.1.1 Mar 14, 2021
0.1.0 Mar 14, 2021

#88 in #chess

MIT license

120KB
2.5K SLoC

Rust 1.5K SLoC // 0.2% comments Mustache 1K SLoC Shell 53 SLoC // 0.2% comments Just 19 SLoC

Chesscom

Crate Badge Docs Badge

Easy-to-use rust client for the chess.com data API.

Status: Work-in-progress prototype...

The repo includes a WIP openapi spec for chess.com which is used to generate an internal chesscom-openapi crate.

Usage

For basic usage, see player-dump.rs which prints select details and stats about a user:

$ player-dump rgnever
Username: rgnever
Status: premium
Name: Anthony Nowell
Joined: 2020-11-12
Last Online: 0 mins ago
Rapid: 1119 rating (rd=208) with 2-0-0 record
Blitz: 530 rating (rd=68) with 29-21-3 record

Build

The chesscom-openapi crate is not committed, so you must run openapi-gen.sh (requires docker) to generate it. Then the ergonomic wrapper can be built.

./openapi-gen.sh
cargo build

(Last confirmed working with openapitools/openapi-generator-cli:b531042729e8)

Dependencies

~5–18MB
~243K SLoC