Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anowell/chesscom-rs
Chess.com API rust client (openapi-based)
https://github.com/anowell/chesscom-rs
Last synced: about 2 months ago
JSON representation
Chess.com API rust client (openapi-based)
- Host: GitHub
- URL: https://github.com/anowell/chesscom-rs
- Owner: anowell
- License: mit
- Created: 2021-03-14T10:30:53.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T08:10:59.000Z (almost 4 years ago)
- Last Synced: 2024-11-20T00:49:34.307Z (about 2 months ago)
- Language: Mustache
- Size: 31.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chesscom
[![Crate Badge](https://buildstats.info/crate/chesscom)](https://crates.io/crates/chesscom)
[![Docs Badge](https://docs.rs/chesscom/badge.svg)](https://docs.rs/chesscom)Easy-to-use rust client for the [chess.com](chess.com) [data API](https://www.chess.com/news/view/published-data-api).
**Status**: Work-in-progress prototype...
The repo includes a WIP [openapi spec for chess.com](chess-openapi-spec.yaml) which is used to generate an internal `chesscom-openapi` crate.
## Usage
For basic usage, see [player-dump.rs](examples/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`)