Available on crate feature helix only.
Expand description

Helix endpoints or the New Twitch API

Aside from using HelixClient as described on the crate documentation, you can decide to use this library without any specific client implementation.

use twitch_api::helix::{self, Request, RequestGet, users::{GetUsersRequest, User}};


let request = GetUsersRequest::login("justintv123");

// Send it however you want
// Create a [`http::Response<hyper::body::Bytes>`] with RequestGet::create_request, which takes an access token and a client_id
let response = send_http_request(request.create_request("accesstoken", "client_id")?)?;

// then parse the response
let uri = request.get_uri()?;
let user: helix::Response<_, Vec<User>> = GetUsersRequest::parse_response(Some(request), &uri, response)?;
println!("{:#?}", user);

Re-exports

pub use twitch_oauth2::Scope;

Modules

Helix endpoints regarding bits
Helix endpoints regarding channels
Helix endpoints regarding chat
clientclient
Client for Helix endpoints
Helix endpoints regarding clips
eventsubeventsub
Helix endpoints regarding EventSub
Helix endpoints regarding games
Helix endpoints regarding creator goals
Helix endpoints regarding hype trains
Helix endpoints regarding moderation
Helix endpoints regarding channel points/redeems
Helix endpoints regarding channel polls
Helix endpoints regarding channel predictions
Helix endpoints regarding channel raids
Requests for driving the API
Responses contains the return values of a request.
Helix endpoints regarding stream schedules
Helix endpoints regarding search
Helix endpoints regarding streams
Helix endpoints regarding subscriptions
Helix endpoints regarding tags
Helix endpoints regarding subscriptions
Helix endpoints regarding users
Helix endpoints regarding videos
Helix endpoints regarding whispers

Structs

A cursor is a pointer to the current “page” in the twitch api pagination
A cursor is a pointer to the current “page” in the twitch api pagination
An empty body.
Client for Helix or the New Twitch API
Response retrieved from endpoint. Data is the type in Request::Response

Enums

Errors that can happen when creating a body
Errors for HelixClient::req_get and similar functions.
Could not create request
Could not parse DELETE response
Could not parse GET response
Could not parse PATCH response
Could not parse POST response
Could not parse PUT response
Errors that can happen when creating http::Uri for Request
Errors from the query serializer

Traits

Create a body. Used for specializing request bodies
A request that can be paginated.
A request is a Twitch endpoint, see New Twitch API reference
Helix endpoint DELETEs information
Helix endpoint GETs information
Helix endpoint PATCHs information
Helix endpoint POSTs information
Helix endpoint PUTs information

Functions

Make a paginate-able request into a stream