pub struct Client { /* private fields */ }Expand description
A client to make requests to Helix with.
The client is initialized given an initial oauth string.
This allows you to do a OAuthRequest for validating
this token and getting a client id, which may then be used
to make HelixRequest
Implementations§
Source§impl Client
impl Client
Sourcepub async fn request_oauth<R: OAuthRequest + Send + Sync>(
&mut self,
request: &R,
) -> Result<OAuthResponse<R::Response>, RequestError>
pub async fn request_oauth<R: OAuthRequest + Send + Sync>( &mut self, request: &R, ) -> Result<OAuthResponse<R::Response>, RequestError>
Performs an OAuth request to twitch
Sourcepub async fn request_helix<R: HelixRequest + Send + Sync>(
&mut self,
request: &R,
client_id: &str,
) -> Result<HelixResponse<R::Response>, RequestError>
pub async fn request_helix<R: HelixRequest + Send + Sync>( &mut self, request: &R, client_id: &str, ) -> Result<HelixResponse<R::Response>, RequestError>
Performs a request to Helix
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more