Module twitch_api2::helix [−][src]
helix
only.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_api2::helix::{self, Request, RequestGet, users::{GetUsersRequest, User}}; let request = GetUsersRequest::builder() .login(vec!["justintv123".to_string()]) .build(); // Send it however you want // Create a [`http::Response<Vec<u8>>`] 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
bits | Helix endpoints regarding bits |
channels | Helix endpoints regarding channels |
clips | Helix endpoints regarding clips |
eventsub | eventsub Helix endpoints regarding EventSub |
games | Helix endpoints regarding games |
hypetrain | Helix endpoints regarding hype trains |
moderation | Helix endpoints regarding moderation |
points | Helix endpoints regarding channel points/redeems |
search | Helix endpoints regarding search |
streams | Helix endpoints regarding streams |
subscriptions | Helix endpoints regarding subscriptions |
tags | Helix endpoints regarding tags |
users | Helix endpoints regarding users |
videos | Helix endpoints regarding videos |
webhooks | Endpoints and topics for webhooks |
Structs
HelixClient | client Client for Helix or the New Twitch API |
HelixRequestPatchError | helix returned error {status:?}: {message:?} when calling |
Response | Response retrieved from endpoint. Data is the type in |
Enums
BodyError | Errors that can happen when creating a body for |
ClientRequestError | Errors for |
CreateRequestError | Could not create request |
HelixRequestDeleteError | Could not parse DELETE response |
HelixRequestGetError | Could not parse GET response |
HelixRequestPostError | Could not parse POST response |
HelixRequestPutError | Could not parse PUT response |
InvalidUri | |
SerializeError | Errors from the query serializer |
Traits
Paginated | Request can be paginated with a cursor |
Request | A request is a Twitch endpoint, see New Twitch API reference |
RequestDelete | Helix endpoint DELETEs information |
RequestGet | Helix endpoint GETs information |
RequestPatch | Helix endpoint PATCHs information |
RequestPost | Helix endpoint POSTs information |
RequestPut | Helix endpoint PUTs information |
Type Definitions
Cursor | A cursor is a pointer to the current "page" in the twitch api pagination |