[][src]Struct mtgapi_client::MtgClient

pub struct MtgClient {
    pub cards: CardApi,
    pub sets: SetApi,
    pub types: TypeApi,
    pub subtypes: SubtypeApi,
    pub supertypes: SupertypeApi,
    pub formats: FormatApi,
    // some fields omitted
}

The MTG.io SDK, use this to access the various api calls

Fields

cards: CardApisets: SetApitypes: TypeApisubtypes: SubtypeApisupertypes: SupertypeApiformats: FormatApi

Methods

impl MtgClient[src]

pub fn new(timeout: u64) -> MtgClient[src]

Creates a new MTG.io SDK Struct

pub fn new_with_url(url: &str, timeout: u64) -> MtgClient[src]

Creates a new MTG.io SDK Struct with an alternate URL "https://api.magicthegathering.io/v1" is the default

pub fn cards(&self) -> &CardApi[src]

/cards enpoint

pub fn sets(&self) -> &SetApi[src]

/sets enpoint

pub fn types(&self) -> &TypeApi[src]

/types enpoint

pub fn subtypes(&self) -> &SubtypeApi[src]

/subtypes enpoint

pub fn supertypes(&self) -> &SupertypeApi[src]

/supertypes enpoint

pub fn formats(&self) -> &FormatApi[src]

/formats enpoint

Auto Trait Implementations

impl !RefUnwindSafe for MtgClient

impl !Send for MtgClient

impl !Sync for MtgClient

impl Unpin for MtgClient

impl !UnwindSafe for MtgClient

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, 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.