[][src]Struct twitch_api2::HelixClient

pub struct HelixClient { /* fields omitted */ }

Client for Helix or the New Twitch API

Implementations

impl HelixClient[src]

pub fn new<T>(token: Box<T>) -> HelixClient where
    T: TwitchToken + Sized + Send + Sync + 'static, 
[src]

Create a new client with a default reqwest::Client

pub fn clone_client(&self) -> Client[src]

Retrieve a clone of the reqwest::Client inside this HelixClient

pub async fn monitor_expire<'_>(&'_ self) -> Option<Delay>[src]

Get a tokio::time::Delay that will return when the token attached to this client expires

pub async fn token<'_, '_>(
    &'_ self
) -> RwLockReadGuard<'_, Box<dyn TwitchToken + Send + Sync>>
[src]

Access the underlying TwitchToken from this client

pub async fn refresh_token<'_>(&'_ self) -> Result<(), RefreshTokenError>[src]

Refresh the underlying TwitchToken

pub async fn get_channel_information<'_>(
    &'_ self,
    broadcaster_id: String
) -> Result<Option<GetChannel>, RequestError>
[src]

Get information about users channel with specific id

pub async fn get_streams<F, '_>(
    &'_ self,
    builder: F
) -> Result<Response<GetStreamsRequest, GetStreams>, RequestError> where
    F: FnOnce(GetStreamsRequestBuilder<((), (), (), (), (), (), ())>) -> GetStreamsRequest
[src]

Access GetStreams builder.

pub async fn get_users<F, '_>(
    &'_ self,
    builder: F
) -> Result<Response<GetUsersRequest, GetUsers>, RequestError> where
    F: FnOnce(GetUsersRequestBuilder<((), ())>) -> GetUsersRequest
[src]

Get user information. See users::get_users

pub async fn get_clips<F, '_>(
    &'_ self,
    builder: F
) -> Result<Response<GetClipsRequest, GetClips>, RequestError> where
    F: FnOnce(GetClipsRequestBuilder<((), (), (), (), (), (), (), ())>) -> GetClipsRequest
[src]

Get clip information. See clips::get_clips

pub async fn req_get<R, D, '_>(
    &'_ self,
    request: R
) -> Result<Response<R, D>, RequestError> where
    R: Request<Response = D> + Request,
    D: DeserializeOwned
[src]

Request on a valid Request endpoint

Trait Implementations

impl Clone for HelixClient[src]

Auto Trait Implementations

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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,