3 releases
0.1.2 | Apr 5, 2021 |
---|---|
0.1.1 | Apr 5, 2021 |
0.1.0 | Apr 5, 2021 |
#107 in #player
10KB
247 lines
Hikaru
Hikaru (the library), is a simple wrapper around the chess.com API that makes it easy to download game data.
Usage
use hikaru::GameData;
let user_names = vec!["hikaru","GMHikaruOnTwitch"];
let games = GameData::download(user_names);
// Check out Hikaru's first game on Chess.com:
dbg!(&games[0]);
lib.rs
:
Hikaru
Hikaru provides Rust bindings to the Chess.com API, specifically for downloading all of a player's games. It is named after Grand Master Hikaru Nakamura (unless he objects, in which case I'll change the name). JSON parsing is done via SereE; reqwest is used to get data from the API.
How to Use
All you have to do is feed Hikaru a list of usernames, and you get back a Vec<[GameData]>
use hikaru::GameData;
let user_names = vec!["hikaru","GMHikaruOnTwitch"];
let games = GameData::download(user_names);
// Check out Hikaru's first game on Chess.com:
dbg!(&games[0]);
Future plans
Create a stockfish wrapper so that you can analyze all your games. The game data include all the moves made in those games, so this can be fed into the engine for a variety of analyses.
Dependencies
~4–16MB
~213K SLoC