[−][src]Struct twitch_api2::helix::HelixClient
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]
T: TwitchToken + Sized + Send + Sync + 'static,
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]
&'_ self
) -> RwLockReadGuard<'_, Box<dyn TwitchToken + Send + Sync>>
Access the underlying TwitchToken from this client
pub async fn validate_token<'_>(
&'_ self
) -> Result<ValidatedToken, ValidationError>
[src]
&'_ self
) -> Result<ValidatedToken, ValidationError>
Access the underlying TwitchToken from this client
pub async fn refresh_token<'_>(&'_ self) -> Result<(), RefreshTokenError>
[src]
Refresh the underlying TwitchToken
pub async fn req_get<R, D, '_>(
&'_ self,
request: R
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestGet,
D: DeserializeOwned,
[src]
&'_ self,
request: R
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestGet,
D: DeserializeOwned,
Request on a valid Request endpoint
let req = channel::GetChannelRequest::builder().broadcaster_id("").build(); let client = HelixClient::new(token); let response = client.req_get(req).await;
Trait Implementations
impl Clone for HelixClient
[src]
fn clone(&self) -> HelixClient
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for HelixClient
impl Send for HelixClient
impl Sync for HelixClient
impl Unpin for HelixClient
impl !UnwindSafe for HelixClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,