[−][src]Struct twitch_api2::helix::HelixClient
Client for Helix or the New Twitch API
Provides HelixClient::req_get for requesting endpoints which uses GET method.
Implementations
impl HelixClient
[src]
pub fn with_client(client: Client) -> HelixClient
[src]
Create a new client with with an existing reqwest::Client
pub fn new() -> HelixClient
[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 req_get<R, D, T: ?Sized, '_, '_>(
&'_ self,
request: R,
token: &'_ T
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestGet,
D: DeserializeOwned,
T: TwitchToken,
[src]
&'_ self,
request: R,
token: &'_ T
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestGet,
D: DeserializeOwned,
T: TwitchToken,
Request on a valid RequestGet endpoint
let req = channels::GetChannelInformationRequest::builder().broadcaster_id("123456").build(); let client = HelixClient::new(); let response = client.req_get(req, &token).await;
pub async fn req_post<R, B, D, T: ?Sized, '_, '_>(
&'_ self,
request: R,
body: B,
token: &'_ T
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestPost<Body = B>,
B: Serialize,
D: DeserializeOwned,
T: TwitchToken,
[src]
&'_ self,
request: R,
body: B,
token: &'_ T
) -> Result<Response<R, D>, RequestError> where
R: Request<Response = D> + Request + RequestPost<Body = B>,
B: Serialize,
D: DeserializeOwned,
T: TwitchToken,
Request on a valid RequestPost endpoint
pub async fn req_patch<R, B, D, T: ?Sized, '_, '_>(
&'_ self,
request: R,
body: B,
token: &'_ T
) -> Result<D, RequestError> where
R: Request<Response = D> + Request + RequestPatch<Body = B>,
B: Serialize,
D: TryFrom<StatusCode, Error = Cow<'static, str>>,
T: TwitchToken,
[src]
&'_ self,
request: R,
body: B,
token: &'_ T
) -> Result<D, RequestError> where
R: Request<Response = D> + Request + RequestPatch<Body = B>,
B: Serialize,
D: TryFrom<StatusCode, Error = Cow<'static, str>>,
T: TwitchToken,
Request on a valid RequestPatch endpoint
Trait Implementations
impl Clone for HelixClient
[src]
fn clone(&self) -> HelixClient
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for HelixClient
[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>,