Struct lichess_api::client::LichessApi
source · pub struct LichessApi<HttpClient> {
pub client: HttpClient,
/* private fields */
}Fields§
§client: HttpClientImplementations§
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_profile(&self, request: GetRequest) -> Result<Profile>
pub async fn get_email_address(&self, request: GetRequest) -> Result<Email>
pub async fn get_preferences( &self, request: GetRequest ) -> Result<UserPreferences>
pub async fn get_kid_mode_status(&self, request: GetRequest) -> Result<KidMode>
pub async fn set_kid_mode_status(&self, request: PostRequest) -> Result<bool>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_cloud_evaluation( &self, request: GetRequest ) -> Result<Evaluation>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn board_abort_game(&self, request: PostRequest) -> Result<bool>
pub async fn board_berserk_game(&self, request: PostRequest) -> Result<bool>
pub async fn board_stream_game_chat( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<ChatLine>>>
pub async fn board_write_in_chat(&self, request: PostRequest) -> Result<bool>
pub async fn board_claim_victory(&self, request: PostRequest) -> Result<bool>
pub async fn board_handle_draw(&self, request: PostRequest) -> Result<bool>
pub async fn board_make_move(&self, request: PostRequest) -> Result<bool>
pub async fn board_resign_game(&self, request: PostRequest) -> Result<bool>
pub async fn board_create_a_seek( &self, request: PostRequest ) -> Result<impl StreamExt<Item = Result<Value>>>
pub async fn board_stream_incoming_events( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn board_stream_board_state( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn board_handle_takeback(&self, request: PostRequest) -> Result<bool>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn bot_abort_game(&self, request: PostRequest) -> Result<bool>
pub async fn bot_stream_game_chat( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<ChatLine>>>
pub async fn bot_write_in_chat(&self, request: PostRequest) -> Result<bool>
pub async fn bot_draw_game(&self, request: PostRequest) -> Result<bool>
pub async fn bot_make_move(&self, request: PostRequest) -> Result<bool>
pub async fn bot_get_online( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<OnlineBot>>>
pub async fn bot_resign_game(&self, request: PostRequest) -> Result<bool>
pub async fn bot_stream_incoming_events( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn bot_stream_board_state( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn bot_upgrade_account(&self, request: PostRequest) -> Result<bool>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn list_challenges(&self, request: GetRequest) -> Result<Challenges>
pub async fn create_challenge( &self, request: PostRequest ) -> Result<ChallengeCreated>
pub async fn accept_challenge(&self, request: PostRequest) -> Result<bool>
pub async fn decline_challenge(&self, request: PostRequest) -> Result<bool>
pub async fn cancel_challenge(&self, request: PostRequest) -> Result<bool>
pub async fn challenge_ai(&self, request: PostRequest) -> Result<Move>
pub async fn create_open_challenge( &self, request: PostRequest ) -> Result<ChallengeOpenJson>
pub async fn start_clocks(&self, request: PostRequest) -> Result<bool>
pub async fn add_time_to_opponent_clock( &self, request: PostRequest ) -> Result<bool>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn export_one_game(&self, request: GetRequest) -> Result<GameJson>
pub async fn export_ongoing_game(&self, request: GetRequest) -> Result<GameJson>
pub async fn export_games_of_user( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<GameJson>>>
pub async fn export_games_by_ids( &self, request: PostRequest ) -> Result<impl StreamExt<Item = Result<GameJson>>>
pub async fn stream_games_of_users( &self, request: PostRequest ) -> Result<impl StreamExt<Item = Result<GameStream>>>
pub async fn stream_games_by_ids( &self, request: PostRequest ) -> Result<impl StreamExt<Item = Result<GameStream>>>
pub async fn add_game_ids_to_stream(&self, request: PostRequest) -> Result<bool>
pub async fn get_my_ongoing_games(&self, request: GetRequest) -> Result<Games>
pub async fn stream_game_moves( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Move>>>
pub async fn import_game(&self, request: PostRequest) -> Result<ImportData>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn send_message(&self, request: PostRequest) -> Result<bool>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_daily_puzzle(&self, request: GetRequest) -> Result<Puzzle>
pub async fn get_puzzle(&self, request: GetRequest) -> Result<Puzzle>
pub async fn get_puzzle_activity( &self, request: GetRequest ) -> Result<impl StreamExt<Item = Result<Round>>>
pub async fn get_puzzle_dashboard( &self, request: GetRequest ) -> Result<Dashboard>
pub async fn get_puzzle_storm_dashboard( &self, request: GetRequest ) -> Result<Dashboard>
pub async fn make_puzzle_race(&self, request: PostRequest) -> Result<Race>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn lookup_antichess( &self, request: GetRequest ) -> Result<TablebaseJson>
pub async fn lookup_atomic(&self, request: GetRequest) -> Result<TablebaseJson>
pub async fn lookup_standard( &self, request: GetRequest ) -> Result<TablebaseJson>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_public_user_data( &self, request: GetRequest ) -> Result<UserExtended>
pub async fn get_status_of_users( &self, request: GetRequest ) -> Result<Vec<User>>
source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_ok<Q, B>(&self, request: Request<Q, B>) -> Result<bool>where
Q: QueryBounds,
B: BodyBounds,
pub async fn get_single_model<Q, B, M>( &self, request: Request<Q, B> ) -> Result<M>
pub async fn get_streamed_models<Q, B, M>( &self, request: Request<Q, B> ) -> Result<impl StreamExt<Item = Result<M>>>
Trait Implementations§
source§impl<HttpClient: Clone> Clone for LichessApi<HttpClient>
impl<HttpClient: Clone> Clone for LichessApi<HttpClient>
source§fn clone(&self) -> LichessApi<HttpClient>
fn clone(&self) -> LichessApi<HttpClient>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<HttpClient> RefUnwindSafe for LichessApi<HttpClient>where
HttpClient: RefUnwindSafe,
impl<HttpClient> Send for LichessApi<HttpClient>where
HttpClient: Send,
impl<HttpClient> Sync for LichessApi<HttpClient>where
HttpClient: Sync,
impl<HttpClient> Unpin for LichessApi<HttpClient>where
HttpClient: Unpin,
impl<HttpClient> UnwindSafe for LichessApi<HttpClient>where
HttpClient: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more