pub struct GameClient;
Expand description
Struct that represents a connection to the in game api client Because the URL is constant, this is a zero sized struct to help organize code
Implementations§
Source§impl GameClient
impl GameClient
pub fn new() -> GameClient
Sourcepub async fn all_game_data(
&self,
request_client: &RequestClient,
) -> Result<AllGameData, Error>
pub async fn all_game_data( &self, request_client: &RequestClient, ) -> Result<AllGameData, Error>
Sourcepub async fn active_player(
&self,
request_client: &RequestClient,
) -> Result<ActivePlayer, Error>
pub async fn active_player( &self, request_client: &RequestClient, ) -> Result<ActivePlayer, Error>
Get all data about the active player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn active_player_name(
&self,
request_client: &RequestClient,
) -> Result<String, Error>
pub async fn active_player_name( &self, request_client: &RequestClient, ) -> Result<String, Error>
Sourcepub async fn active_player_abilities(
&self,
request_client: &RequestClient,
) -> Result<Abilities, Error>
pub async fn active_player_abilities( &self, request_client: &RequestClient, ) -> Result<Abilities, Error>
Get Abilities for the active player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn active_player_runes(
&self,
request_client: &RequestClient,
) -> Result<FullRunes, Error>
pub async fn active_player_runes( &self, request_client: &RequestClient, ) -> Result<FullRunes, Error>
Retrieve the full list of runes for the active player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn player_list(
&self,
team: Option<TeamID>,
request_client: &RequestClient,
) -> Result<Vec<AllPlayer>, Error>
pub async fn player_list( &self, team: Option<TeamID>, request_client: &RequestClient, ) -> Result<Vec<AllPlayer>, Error>
Retrieve the list of heroes in the game and their stats.
§Errors
This will return an error if the game API is not running
Sourcepub async fn player_scores(
&self,
summoner: &str,
request_client: &RequestClient,
) -> Result<Scores, Error>
pub async fn player_scores( &self, summoner: &str, request_client: &RequestClient, ) -> Result<Scores, Error>
Retrieve the list of the current scores for the player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn player_summoner_spells(
&self,
summoner: &str,
request_client: &RequestClient,
) -> Result<SummonerSpells, Error>
pub async fn player_summoner_spells( &self, summoner: &str, request_client: &RequestClient, ) -> Result<SummonerSpells, Error>
Retrieve the list of the summoner spells for the player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn player_main_runes(
&self,
summoner: &str,
request_client: &RequestClient,
) -> Result<Runes, Error>
pub async fn player_main_runes( &self, summoner: &str, request_client: &RequestClient, ) -> Result<Runes, Error>
Retrieve the basic runes of any player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn player_items(
&self,
summoner: &str,
request_client: &RequestClient,
) -> Result<Vec<Item>, Error>
pub async fn player_items( &self, summoner: &str, request_client: &RequestClient, ) -> Result<Vec<Item>, Error>
Retrieve the list of items for the player.
§Errors
This will return an error if the game API is not running
Sourcepub async fn event_data(
&self,
event_id: Option<i32>,
request_client: &RequestClient,
) -> Result<Events, Error>
pub async fn event_data( &self, event_id: Option<i32>, request_client: &RequestClient, ) -> Result<Events, Error>
Get a list of events that have occurred in the game.
§Errors
This will return an error if the game API is not running