Available on crate feature
helix
only.Expand description
Helix endpoints or the New Twitch API
HelixClient
provides convenience function for sending requests as described on the crate documentation.
ยงManual Usage
Aside from using HelixClient
, you can decide to use this library without any specific client implementation.
use twitch_api::{helix::{self, Request, RequestGet, users::{GetUsersRequest, User}}, types};
let logins: &[&types::UserNameRef] = &["justintv123".into()];
let request = GetUsersRequest::logins(logins);
// 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);
ยงImplemented Endpoints
Ads ๐ข 3/3
Analytics ๐ด 0/2
Endpoint | Helper | Module |
---|---|---|
Get Extension Analytics | - | - |
Get Game Analytics | - | - |
Bits ๐ก 2/3
Endpoint | Helper | Module |
---|---|---|
Get Bits Leaderboard | - | bits::get_bits_leaderboard |
Get Cheermotes | - | bits::get_cheermotes |
Get Extension Transactions | - | - |
CCLs ๐ข 1/1
Channel Points ๐ข 6/6
Channels ๐ข 5/5
Charity ๐ข 2/2
Chat ๐ข 15/15
Clips ๐ข 2/2
Endpoint | Helper | Module |
---|---|---|
Create Clip | - | clips::create_clip |
Get Clips | - | clips::get_clips |
Conduits ๐ข 6/6
Entitlements ๐ด 0/2
Endpoint | Helper | Module |
---|---|---|
Get Drops Entitlements | - | - |
Update Drops Entitlements | - | - |
EventSub ๐ข 3/3
Extensions ๐ด 0/12
Games ๐ข 2/2
Endpoint | Helper | Module |
---|---|---|
Get Top Games | - | games::get_top_games |
Get Games | HelixClient::get_games_by_id | games::get_games |
Goals ๐ข 1/1
Endpoint | Helper | Module |
---|---|---|
Get Creator Goals | - | goals::get_creator_goals |
Guest Star ๐ด 0/12
Hype Train ๐ข 1/1
Endpoint | Helper | Module |
---|---|---|
Get Hype Train Events | - | hypetrain::get_hypetrain_events |
Moderation ๐ข 23/23
Polls ๐ข 3/3
Endpoint | Helper | Module |
---|---|---|
Get Polls | - | polls::get_polls |
Create Poll | - | polls::create_poll |
End Poll | - | polls::end_poll |
Predictions ๐ข 3/3
Raids ๐ข 2/2
Schedule ๐ก 5/6
Search ๐ข 2/2
Streams ๐ข 5/5
Subscriptions ๐ข 2/2
Tags ๐ข 2/2
Endpoint | Helper | Module |
---|---|---|
Get All Stream Tags | - | tags::get_all_stream_tags |
Get Stream Tags | - | streams::get_stream_tags |
Teams ๐ข 2/2
Endpoint | Helper | Module |
---|---|---|
Get Channel Teams | - | teams::get_channel_teams |
Get Teams | - | teams::get_teams |
Users ๐ข 8/8
Videos ๐ข 2/2
Endpoint | Helper | Module |
---|---|---|
Get Videos | - | videos::get_videos |
Delete Videos | - | videos::delete_videos |
Whispers ๐ข 1/1
Endpoint | Helper | Module |
---|---|---|
Send Whisper | HelixClient::send_whisper | whispers::send_whisper |
Re-exportsยง
pub use twitch_oauth2::Scope;
twitch_oauth2
Modulesยง
- bits
- Helix endpoints regarding bits
- ccls
- Helix endpoints regarding content classification cabels
- channels
- Helix endpoints regarding channels
- charity
- Helix endpoints regarding charities
- chat
- Helix endpoints regarding chat
- client
client
- Client for Helix endpoints
- clips
- Helix endpoints regarding clips
- eventsub
eventsub
- Helix endpoints regarding EventSub
- games
- Helix endpoints regarding games
- goals
- Helix endpoints regarding creator goals
- hypetrain
- Helix endpoints regarding hype trains
- moderation
- Helix endpoints regarding moderation
- points
- Helix endpoints regarding channel points/redeems
- polls
- Helix endpoints regarding channel polls
- predictions
- Helix endpoints regarding channel predictions
- raids
- Helix endpoints regarding channel raids
- request
- Requests for driving the API
- response
- Responses contains the return values of a request.
- schedule
- Helix endpoints regarding stream schedules
- search
- Helix endpoints regarding search
- streams
- Helix endpoints regarding streams
- subscriptions
- Helix endpoints regarding subscriptions
- tags
- Helix endpoints regarding tags
- teams
- Helix endpoints regarding subscriptions
- users
- Helix endpoints regarding users
- videos
- Helix endpoints regarding videos
- whispers
- Helix endpoints regarding whispers
Structsยง
- Cursor
- A cursor is a pointer to the current โpageโ in the twitch api pagination
- Cursor
Ref - A cursor is a pointer to the current โpageโ in the twitch api pagination
- Empty
Body - An empty body.
- Helix
Client client
- Client for Helix or the New Twitch API
- Response
- Response retrieved from endpoint. Data is the type in
Request::Response
Enumsยง
- Body
Error - Errors that can happen when creating a body
- Client
ExtError client
- Error type to combine a http client error with a other error
- Client
Request Error client
- Errors for
HelixClient::req_get
and similar functions. - Create
Request Error - Could not create request
- Helix
Request Delete Error - Could not parse DELETE response
- Helix
Request GetError - Could not parse GET response
- Helix
Request Patch Error - Could not parse PATCH response
- Helix
Request Post Error - Could not parse POST response
- Helix
Request PutError - Could not parse PUT response
- Invalid
Uri - Errors that can happen when creating
http::Uri
forRequest
- Serialize
Error - Errors from the query serializer
Traitsยง
- Helix
Request Body - Create a body. Used for specializing request bodies
- Paginated
- A request that can be paginated.
- Request
- A request is a Twitch endpoint, see New Twitch API reference
- Request
Delete - Helix endpoint DELETEs information
- Request
Get - Helix endpoint GETs information
- Request
Patch - Helix endpoint PATCHs information
- Request
Post - Helix endpoint POSTs information
- Request
Put - Helix endpoint PUTs information
Functionsยง
- make_
stream client
- Make a paginate-able request into a stream