lichessbot
Lichess bot. Under construction.
Usage
extern crate env_logger;
use dotenv;
use TryStreamExt;
use ;
async
Logging
# or
Lichess bot. Under construction.
extern crate env_logger;
use dotenv::dotenv;
use futures_util::TryStreamExt;
use licoricedev::client::{Lichess};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>>{
dotenv().ok();
env_logger::init();
let lichess = Lichess::default();
let query_params = vec![
("max", "10"),
];
let mut stream = lichess
.export_all_games_json("chesshyperbot", Some(&query_params))
.await?;
while let Some(game) = stream.try_next().await? {
println!("{:?}", game);
}
Ok(())
}
export RUST_LOG=info
# or
export RUST_LOG=debug