[][src]Struct twirl::TwitchClient

#[repr(C)]
pub struct TwitchClient { /* fields omitted */ }

Methods

impl TwitchClient[src]

pub fn new(client_id: impl Into<String>) -> Self[src]

pub fn with_credentials(
    client_id: impl Into<String>,
    access_token: impl Into<String>,
    scopes: Option<Vec<String>>
) -> Self
[src]

pub fn with_client_credentials(
    client_id: impl Into<String>,
    client_secret: impl Into<String>
) -> Self
[src]

pub async fn call_api<'_, '_, T, B>(
    &'_ mut self,
    call: TwitchAPICall<'_, B>
) -> Result<T, Box<dyn Error + Send + Sync>> where
    T: DeserializeOwned
[src]

pub async fn call_api_with_credentials<'_, T, B>(
    call: TwitchAPICall<'_, B>,
    client_id: impl StringOption,
    access_token: impl StringOption
) -> Result<T, Box<dyn Error + Send + Sync>> where
    T: DeserializeOwned
[src]

pub async fn get_app_access_token(
    client_id: impl Into<String>,
    client_secret: impl Into<String>
) -> Result<AccessToken, Box<dyn Error + Send + Sync>>
[src]

pub async fn refresh_access_token(
    client_id: impl Into<String>,
    client_secret: impl Into<String>,
    refresh_token: impl Into<String>
) -> Result<AccessToken, Box<dyn Error + Send + Sync>>
[src]

pub async fn get_token_info_for_access_token(
    client_id: impl Into<String>,
    access_token: impl Into<String>
) -> Result<TokenInfo, Box<dyn Error + Send + Sync>>
[src]

pub async fn get_me<'_>(
    &'_ mut self
) -> Result<User, Box<dyn Error + Send + Sync>>
[src]

pub async fn get_user_by_login<'_>(
    &'_ mut self,
    login: impl Into<String>
) -> Result<Option<User>, Box<dyn Error + Send + Sync>>
[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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