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) -> Result<Profile>
pub async fn get_email_address(&self) -> Result<Email>
pub async fn get_preferences(&self) -> Result<UserPreferences>
pub async fn get_kid_mode_status(&self) -> Result<KidMode>
pub async fn set_kid_mode_status( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_cloud_evaluation( &self, request: impl Into<GetRequest>, ) -> Result<Evaluation>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn board_abort_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_berserk_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_stream_game_chat( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Vec<ChatLine>>>>
pub async fn board_write_in_chat( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_claim_victory( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_handle_draw( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_make_move( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_resign_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn board_create_a_seek( &self, request: impl Into<PostRequest>, ) -> Result<impl StreamExt<Item = Result<Value>>>
pub async fn board_stream_incoming_events( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn board_stream_board_state( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn board_handle_takeback( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn bot_abort_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn bot_stream_game_chat( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<ChatLine>>>
pub async fn bot_write_in_chat( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn bot_draw_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn bot_make_move( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn bot_get_online( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<OnlineBot>>>
pub async fn bot_resign_game( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn bot_stream_incoming_events( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn bot_stream_board_state( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn bot_upgrade_account( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn list_challenges(&self) -> Result<Challenges>
pub async fn create_challenge( &self, request: impl Into<PostRequest>, ) -> Result<ChallengeJson>
pub async fn accept_challenge( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn decline_challenge( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn cancel_challenge( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn challenge_ai( &self, request: impl Into<PostRequest>, ) -> Result<Move>
pub async fn create_open_challenge( &self, request: impl Into<PostRequest>, ) -> Result<ChallengeOpenJson>
pub async fn start_clocks( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn add_time_to_opponent_clock( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn list_external_engines(&self) -> Result<Vec<ExternalEngine>>
pub async fn create_external_engine( &self, request: impl Into<PostRequest>, ) -> Result<ExternalEngine>
pub async fn get_external_engine( &self, request: impl Into<GetRequest>, ) -> Result<ExternalEngine>
pub async fn update_external_engine( &self, request: impl Into<PutRequest>, ) -> Result<ExternalEngine>
pub async fn delete_external_engine( &self, request: impl Into<DeleteRequest>, ) -> Result<bool>
Sourcepub async fn analyse_with_external_engine(
&self,
request: impl Into<PostRequest>,
) -> Result<impl StreamExt<Item = Result<AnalysisResponse>>>
pub async fn analyse_with_external_engine( &self, request: impl Into<PostRequest>, ) -> Result<impl StreamExt<Item = Result<AnalysisResponse>>>
This method currently returns a 503 error (Service Unavailable) from the Lichess API
pub async fn acquire_analysis_request( &self, request: impl Into<PostRequest>, ) -> Result<Option<AcquireAnalysisResponse>>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn search_fide_player( &self, request: impl Into<GetRequest>, ) -> Result<Vec<Player>>
pub async fn get_fide_player( &self, request: impl Into<GetRequest>, ) -> Result<Player>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn export_one_game( &self, request: impl Into<GetRequest>, ) -> Result<GameJson>
pub async fn export_ongoing_game( &self, request: impl Into<GetRequest>, ) -> Result<GameJson>
pub async fn export_games_of_user( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<GameJson>>>
pub async fn export_games_by_ids( &self, request: impl Into<PostRequest>, ) -> Result<impl StreamExt<Item = Result<GameJson>>>
pub async fn stream_games_of_users( &self, request: impl Into<PostRequest>, ) -> Result<impl StreamExt<Item = Result<GameStream>>>
pub async fn stream_games_by_ids( &self, request: impl Into<PostRequest>, ) -> Result<impl StreamExt<Item = Result<GameStream>>>
pub async fn add_game_ids_to_stream( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn get_my_ongoing_games( &self, request: impl Into<GetRequest>, ) -> Result<Games>
pub async fn stream_game_moves( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Move>>>
pub async fn import_game( &self, request: impl Into<PostRequest>, ) -> Result<ImportData>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn send_message( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn test_tokens( &self, request: impl Into<PostRequest>, ) -> Result<TestResults>
pub async fn revoke_token(&self) -> Result<()>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn openings_masters( &self, request: impl Into<GetRequest>, ) -> Result<OpeningExplorerJson>
pub async fn openings_lichess( &self, request: impl Into<GetRequest>, ) -> Result<OpeningExplorerJson>
pub async fn openings_player( &self, request: impl Into<GetRequest>, ) -> Result<OpeningExplorerJson>
pub async fn openings_otb( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<String>>>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_daily_puzzle(&self) -> Result<Puzzle>
pub async fn get_puzzle(&self, request: impl Into<GetRequest>) -> Result<Puzzle>
pub async fn get_new_puzzle( &self, request: impl Into<GetRequest>, ) -> Result<Puzzle>
pub async fn get_puzzle_activity( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Activity>>>
pub async fn get_puzzles_to_replay( &self, request: impl Into<GetRequest>, ) -> Result<Replay>
pub async fn get_puzzle_dashboard( &self, request: impl Into<GetRequest>, ) -> Result<Dashboard>
pub async fn get_puzzle_storm_dashboard( &self, request: impl Into<GetRequest>, ) -> Result<Dashboard>
pub async fn make_puzzle_race( &self, request: impl Into<PostRequest>, ) -> Result<Race>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_following( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<UserExtended>>>
pub async fn follow_user(&self, request: impl Into<PostRequest>) -> Result<bool>
pub async fn unfollow_user( &self, request: impl Into<PostRequest>, ) -> Result<bool>
pub async fn block_user(&self, request: impl Into<PostRequest>) -> Result<bool>
pub async fn unblock_user( &self, request: impl Into<PostRequest>, ) -> Result<bool>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_current_simuls(&self) -> Result<Simuls>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn import_pgn_into_study( &self, request: impl Into<PostRequest>, ) -> Result<StudyImportPgnChapters>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn lookup_antichess( &self, request: impl Into<GetRequest>, ) -> Result<TablebaseJson>
pub async fn lookup_atomic( &self, request: impl Into<GetRequest>, ) -> Result<TablebaseJson>
pub async fn lookup_standard( &self, request: impl Into<GetRequest>, ) -> Result<TablebaseJson>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn tv_channels(&self) -> Result<Channels>
pub async fn tv_stream_current( &self, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn tv_stream_channel_current( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<Event>>>
pub async fn tv_channel_games( &self, request: impl Into<GetRequest>, ) -> Result<impl StreamExt<Item = Result<GameJson>>>
Source§impl LichessApi<Client>
impl LichessApi<Client>
pub async fn get_all_top_10(&self) -> Result<Top10s>
pub async fn get_one_leaderboard( &self, request: impl Into<GetRequest>, ) -> Result<Leaderboard>
pub async fn get_public_user_data( &self, request: impl Into<GetRequest>, ) -> Result<UserExtended>
pub async fn get_status_of_users( &self, request: impl Into<GetRequest>, ) -> Result<Vec<User>>
pub async fn get_rating_history( &self, request: impl Into<GetRequest>, ) -> Result<RatingHistory>
pub async fn get_user_performance_statistics( &self, request: impl Into<GetRequest>, ) -> Result<PerfStat>
pub async fn get_users_by_id( &self, request: impl Into<PostRequest>, ) -> Result<Vec<User>>
pub async fn get_live_streamers(&self) -> Result<Vec<StreamingUser>>
pub async fn get_crosstable( &self, request: impl Into<GetRequest>, ) -> Result<Crosstable>
pub async fn autocomplete_users( &self, request: impl Into<GetRequest>, ) -> Result<Autocompletions>
pub async fn add_note_to_user( &self, request: impl Into<PostRequest>, ) -> Result<Ok>
pub async fn get_user_notes( &self, request: impl Into<GetRequest>, ) -> Result<Vec<UserNote>>
pub async fn get_user_activity( &self, request: impl Into<GetRequest>, ) -> Result<Vec<UserActivity>>
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_pgn<Q, B>(
&self,
request: Request<Q, B>,
) -> Result<impl StreamExt<Item = Result<String>>>where
Q: QueryBounds,
B: BodyBounds,
pub async fn get_empty<Q, B>(&self, request: Request<Q, B>) -> Result<()>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 duplicate 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> Freeze for LichessApi<HttpClient>where
HttpClient: Freeze,
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