Dota2Api

Struct Dota2Api 

Source
pub struct Dota2Api {
    pub key: String,
    /* private fields */
}
Expand description

The main Dota2Api of you library works by saving states of all the invoked URLs (you only call the one you need) language macro for easy implementation in various builder struct

The language to retrieve results in (default is en_us) (see http://en.wikipedia.org/wiki/ISO_639-1 for the language codes (first two characters) and http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for the country codes (last two characters))

language (Optional) (string) : The language to provide output in.

Fields§

§key: String

Implementations§

Source§

impl Dota2Api

Source

pub fn new(key: String) -> Self

Source

pub fn set_heroes(&mut self) -> &mut GetHeroesBuilder

Source

pub fn get_heroes(&mut self) -> Result<GetHeroes, Error>

Source

pub fn set_game_items(&mut self) -> &mut GetGameItemsBuilder

Source

pub fn get_game_items(&mut self) -> Result<GetGameItems, Error>

Source

pub fn set_rarities(&mut self) -> &mut GetRaritiesBuilder

Source

pub fn get_rarities(&mut self) -> Result<GetRarities, Error>

Source

pub fn set_tournament_prize_pool( &mut self, ) -> &mut GetTournamentPrizePoolBuilder

Source

pub fn get_tournament_prize_pool( &mut self, ) -> Result<GetTournamentPrizePool, Error>

Source

pub fn set_league_listing(&mut self) -> &mut GetLeagueListingBuilder

Source

pub fn get_league_listing(&mut self) -> Result<GetLeagueListing, Error>

Source

pub fn set_live_league_games(&mut self) -> &mut GetLiveLeagueGamesBuilder

Source

pub fn get_live_league_games(&mut self) -> Result<GetLiveLeagueGames, Error>

Source

pub fn set_top_live_game(&mut self) -> &mut GetTopLiveGameBuilder

Source

pub fn get_top_live_game(&mut self) -> Result<GetTopLiveGame, Error>

Trait Implementations§

Source§

impl Debug for Dota2Api

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dota2Api

Source§

fn default() -> Dota2Api

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.