pub struct GameClient { /* private fields */ }Implementations§
Source§impl GameClient
impl GameClient
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new GameClientusing a reqwest::Client.
As Riot Games self-sign their SSL certificates, it would be great to trust them in the reqwest::Client.
Sourcepub fn _from_certificate(certificate: Certificate) -> Result<Self, QueryError>
pub fn _from_certificate(certificate: Certificate) -> Result<Self, QueryError>
This method should only be used if Riot updates its root certificate and the crate is not up-to-date.
Otherwise, use GameClient::new
Source§impl GameClient
All the implemented endpoints
impl GameClient
All the implemented endpoints
Sourcepub async fn all_game_data(&self) -> Result<AllGameData, QueryError>
pub async fn all_game_data(&self) -> Result<AllGameData, QueryError>
Get all available data.
Sourcepub async fn active_player(&self) -> Result<ActivePlayer, QueryError>
pub async fn active_player(&self) -> Result<ActivePlayer, QueryError>
Get all data about the active player.
Sourcepub async fn active_player_name(&self) -> Result<String, QueryError>
pub async fn active_player_name(&self) -> Result<String, QueryError>
Returns the player name.
Sourcepub async fn active_player_abilities(&self) -> Result<Abilities, QueryError>
pub async fn active_player_abilities(&self) -> Result<Abilities, QueryError>
Get Abilities for the active player.
Sourcepub async fn active_player_runes(&self) -> Result<FullRunes, QueryError>
pub async fn active_player_runes(&self) -> Result<FullRunes, QueryError>
Retrieve the full list of runes for the active player.
Sourcepub async fn player_list(&self) -> Result<Vec<Player>, QueryError>
pub async fn player_list(&self) -> Result<Vec<Player>, QueryError>
Retrieve the list of heroes in the game and their stats.
Sourcepub async fn event_data(&self) -> Result<Events, QueryError>
pub async fn event_data(&self) -> Result<Events, QueryError>
Get a list of events that have occurred in the game.
Sourcepub async fn game_stats(&self) -> Result<GameData, QueryError>
pub async fn game_stats(&self) -> Result<GameData, QueryError>
Basic data about the game.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GameClient
impl !RefUnwindSafe for GameClient
impl Send for GameClient
impl Sync for GameClient
impl Unpin for GameClient
impl !UnwindSafe for GameClient
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