1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
//! //! # Examples //! //! //!``` //!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::new(std::env::var("RUST_BOT_TOKEN").unwrap()); //! //! let mut event_stream = lichess //! .stream_incoming_events() //! .await //! .unwrap(); //! //! while let Some(event) = event_stream.try_next().await? { //! println!("event {:?}", event) //! } //! //! Ok(()) //!} //! //!``` // lib pub mod lichessbot;