[][src]Struct licoricedev::client::Lichess

pub struct Lichess { /* fields omitted */ }

The base client onject

Implementations

impl Lichess[src]

impl Lichess[src]

pub async fn arena_current(&self) -> LichessResult<ArenaSchedule>[src]

pub async fn arena_new(
    &self,
    clock_time: u16,
    clock_increment: u8,
    minutes: u16,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<ArenaTournament>
[src]

pub async fn arena_info(
    &self,
    id: &str,
    page: u8
) -> LichessResult<ArenaTournament>
[src]

pub async fn games_by_arena_pgn(
    &self,
    id: &str,
    query_params: Option<Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Bytes>>>
[src]

pub async fn games_by_arena_json(
    &self,
    id: &str,
    query_params: Option<Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Game>>>
[src]

pub async fn results_by_arena(
    &self,
    id: &str,
    nb_players: u16
) -> LichessResult<impl Stream<Item = LichessResult<PlayerStandings>>>
[src]

pub async fn teams_by_arena(&self, id: &str) -> LichessResult<TeamStandings>[src]

pub async fn arenas_by_user(
    &self,
    username: &str,
    nb_tournamensts: u16
) -> LichessResult<impl Stream<Item = LichessResult<ArenaTournament>>>
[src]

impl Lichess[src]

pub async fn stream_incoming_events(
    &self
) -> LichessResult<impl Stream<Item = LichessResult<Event>>>
[src]

pub async fn create_a_seek(
    &self,
    time: u8,
    increment: u8,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<impl Stream<Item = LichessResult<Bytes>>>
[src]

pub async fn stream_board_game_state(
    &self,
    game_id: &str
) -> LichessResult<impl Stream<Item = LichessResult<BoardState>>>
[src]

pub async fn make_a_board_move(
    &self,
    game_id: &str,
    r#move: &str,
    offering_draw: bool
) -> LichessResult<()>
[src]

pub async fn write_in_board_chat(
    &self,
    game_id: &str,
    room: &str,
    text: &str
) -> LichessResult<()>
[src]

pub async fn abort_board_game(&self, game_id: &str) -> LichessResult<()>[src]

pub async fn resign_board_game(&self, game_id: &str) -> LichessResult<()>[src]

pub async fn handle_draw_offers(
    &self,
    game_id: &str,
    accept: bool
) -> LichessResult<()>
[src]

impl Lichess[src]

pub async fn upgrade_to_bot_account(&self) -> LichessResult<()>[src]

pub async fn stream_bot_game_state(
    &self,
    game_id: &str
) -> LichessResult<impl Stream<Item = LichessResult<BoardState>>>
[src]

pub async fn make_a_bot_move(
    &self,
    game_id: &str,
    r#move: &str,
    offering_draw: bool
) -> LichessResult<()>
[src]

pub async fn write_in_bot_chat(
    &self,
    game_id: &str,
    room: &str,
    text: &str
) -> LichessResult<()>
[src]

pub async fn abort_bot_game(&self, game_id: &str) -> LichessResult<()>[src]

pub async fn resign_bot_game(&self, game_id: &str) -> LichessResult<()>[src]

impl Lichess[src]

pub async fn get_official_broadcasts(
    &self,
    nb_broadcasts: u8
) -> LichessResult<impl Stream<Item = LichessResult<Broadcast>>>
[src]

pub async fn create_broadcast(
    &self,
    name: &str,
    description: &str,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<Broadcast>
[src]

pub async fn get_broadcast(
    &self,
    broadcast_id: &str
) -> LichessResult<Broadcast>
[src]

pub async fn update_broadcast(
    &self,
    broadcast_id: &str,
    name: &str,
    description: &str,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<Broadcast>
[src]

pub async fn push_to_broadcast(
    &self,
    broadcast_id: &str,
    pgn: &str
) -> LichessResult<()>
[src]

impl Lichess[src]

pub async fn challenge_create(
    &self,
    username: &str,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<EntityChallenge>
[src]

pub async fn challenge_accept(&self, challenge_id: &str) -> LichessResult<()>[src]

pub async fn challenge_decline(
    &self,
    challenge_id: &str,
    reason: Option<&str>
) -> LichessResult<()>
[src]

pub async fn challenge_cancel(&self, challenge_id: &str) -> LichessResult<()>[src]

pub async fn challenge_stockfish(
    &self,
    level: u8,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<ChallengeGame>
[src]

pub async fn challenge_open(
    &self,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<EntityChallenge>
[src]

pub async fn start_game_clocks(
    &self,
    game_id: &str,
    token1: &str,
    token2: &str
) -> LichessResult<()>
[src]

pub async fn admin_challenge(
    &self,
    user1: &str,
    user2: &str,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<EntityChallenge>
[src]

impl Lichess[src]

pub async fn export_one_game_pgn(
    &self,
    game_id: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<String>
[src]

pub async fn export_one_game_json(
    &self,
    game_id: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<Game>
[src]

pub async fn export_ongoing_game_pgn(
    &self,
    username: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<String>
[src]

pub async fn export_ongoing_game_json(
    &self,
    username: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<Game>
[src]

pub async fn export_all_games_pgn(
    &self,
    username: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Bytes>>>
[src]

pub async fn export_all_games_json(
    &self,
    username: &str,
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Game>>>
[src]

pub async fn export_games_by_ids_json(
    &self,
    ids: &[&str],
    query_params: Option<&Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Game>>>
[src]

pub async fn stream_current_games(
    &self,
    ids: &[&str]
) -> LichessResult<impl Stream<Item = LichessResult<Game>>>
[src]

pub async fn get_ongoing_games(
    &self,
    nb_games: u8
) -> LichessResult<Vec<UserGame>>
[src]

pub async fn get_current_tv_games(&self) -> LichessResult<TVChannels>[src]

pub async fn import_one_game(&self, pgn: &str) -> LichessResult<String>[src]

impl Lichess[src]

pub async fn get_current_simuls(&self) -> LichessResult<Simuls>[src]

pub async fn study_chapter_pgn(
    &self,
    study_id: &str,
    chapter_id: &str,
    query_params: Option<&[(&str, &str)]>
) -> LichessResult<String>
[src]

pub async fn study_full_pgn(
    &self,
    study_id: &str,
    query_params: Option<&[(&str, &str)]>
) -> LichessResult<String>
[src]

pub async fn mesage(&self, recipient: &str, message: &str) -> LichessResult<()>[src]

pub async fn get_cloud_eval(
    &self,
    fen: &str,
    multi_pv: u8,
    variant: Option<&str>
) -> LichessResult<Eval>
[src]

impl Lichess[src]

pub async fn get_followings(
    &self,
    username: &str
) -> LichessResult<impl Stream<Item = LichessResult<User>>>
[src]

pub async fn get_followers(
    &self,
    username: &str
) -> LichessResult<impl Stream<Item = LichessResult<User>>>
[src]

impl Lichess[src]

pub async fn swiss_new(
    &self,
    team_id: &str,
    clock_time: u16,
    clock_increment: u16,
    nb_rounds: u16,
    form_params: Option<&[(&str, &str)]>
) -> LichessResult<SwissTournament>
[src]

pub async fn swiss_trf(&self, id: &str) -> LichessResult<String>[src]

pub async fn games_by_swiss_pgn(
    &self,
    id: &str,
    query_params: Option<Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Bytes>>>
[src]

pub async fn games_by_swiss_json(
    &self,
    id: &str,
    query_params: Option<Vec<(&str, &str)>>
) -> LichessResult<impl Stream<Item = LichessResult<Game>>>
[src]

pub async fn results_by_swiss(
    &self,
    id: &str,
    nb_players: u16
) -> LichessResult<impl Stream<Item = LichessResult<PlayerStandings>>>
[src]

impl Lichess[src]

pub async fn get_team_swiss_tournaments(
    &self,
    team_id: &str,
    max: u16
) -> LichessResult<impl Stream<Item = LichessResult<SwissTournament>>>
[src]

pub async fn get_a_single_team(&self, team_id: &str) -> LichessResult<Team>[src]

pub async fn teams_of_a_player(
    &self,
    username: &str
) -> LichessResult<Vec<Team>>
[src]

pub async fn search_teams(
    &self,
    text: &str,
    page: Option<u16>
) -> LichessResult<Vec<Team>>
[src]

pub async fn get_team_arena_tournaments(
    &self,
    team_id: &str,
    max: u16
) -> LichessResult<impl Stream<Item = LichessResult<ArenaTournament>>>
[src]

pub async fn join_a_team(
    &self,
    team_id: &str,
    message: Option<&str>
) -> LichessResult<()>
[src]

pub async fn leave_a_team(&self, team_id: &str) -> LichessResult<()>[src]

pub async fn kick_user_from_team(
    &self,
    team_id: &str,
    user_id: &str
) -> LichessResult<()>
[src]

pub async fn message_all_members(
    &self,
    team_id: &str,
    message: &str
) -> LichessResult<()>
[src]

impl Lichess[src]

Endpoints which yield information regarding geneal lichess users

pub async fn get_user_status(
    &self,
    user_ids: &[&str]
) -> LichessResult<Vec<LightUser>>
[src]

Provides basic information about a set of lichess users. At most 50 ids are entertained in ech request.

Parameters:

  • user_ids - a reference to a Vec or array of user ids, i.e., usernames in lowercase Reference

pub async fn get_all_top_10(
    &self
) -> LichessResult<HashMap<PerfType, Vec<LightUser>>>
[src]

Returns bsic information about top 10 players for each speed and variant. In the returned HashMap,for a particular PerfType each LightUser will contain that PerfType only in their perfs field

Reference

pub async fn get_one_leaderboard(
    &self,
    nb_users: u8,
    perf_type: PerfType
) -> LichessResult<Vec<LightUser>>
[src]

Gets a Vec of users who tops the leaderboard for the provided PerfType Parameters:

  • nb_users - Number of top players to fetch from the leaderbaord. Must be at most 200, the capacty of each lederboard. Reference

pub async fn get_user_public(&self, username: &str) -> LichessResult<User>[src]

Entire(?) public information regarding a lichess user Parameters: -username - case-insensitive ID of a lichess user Reference

pub async fn get_rating_history(
    &self,
    username: &str
) -> LichessResult<Vec<RatingHistory>>
[src]

Records of a user's rating across mutiple perfs Parameters: -username - case-insensitive ID of a lichess user Reference

pub async fn get_my_puzzle_activity(
    &self,
    max: Option<u64>
) -> LichessResult<impl Stream<Item = LichessResult<PuzzleActivity>>>
[src]

Puzzle activity of the authenticated user

pub async fn get_users_by_ids(&self, ids: &[&str]) -> LichessResult<Vec<User>>[src]

Informations of upto 300 users

pub async fn get_members_of_a_team(
    &self,
    team_id: &str
) -> LichessResult<impl Stream<Item = LichessResult<User>>>
[src]

Returns a stream of members belonging to the provided team

pub async fn get_live_streamers(&self) -> LichessResult<Vec<LightUser>>[src]

Basic information about users currently streaming in lichess

pub async fn get_crosstable(
    &self,
    player: &str,
    opponent: &str,
    matchup: bool
) -> LichessResult<Crosstable>
[src]

Returns records of how two players match up against each other

impl Lichess[src]

pub fn default() -> Lichess[src]

Create an unathenticaed instance of the client Even with endpoints what do not require OAuth, this will be imposed with constrints

pub fn new(pat: String) -> Lichess[src]

Creates an authenticaed instance using the provided token

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.