twitch_highway
A Rust library for Twitch API with compile-time safety and comprehensive response support.
- Full support for Twitch API endpoints
- Full support for response types with proper error handling
- New-type pattern for compile-time safety with IDs (e.g: BroadcasterId, ModeratorId)
- Type-safe request builders
- Safe JSON conversion for 204 (No Content) responses
[]
# Add the endpoints you need: "chat", "users", etc.
= { = "1", = ["moderation"]}
= { = "1", = ["full"] }
= { = "0.1", = ["oauth"] }
# or
# twitch_oauth_token = { version = "2.0.1" }
Quick Start
use ;
// or
// use twitch_oauth_token::oauth_types::{AccessToken, ClientId};
use ;
async = new;
let broadcaster_id = new;
let moderator_id = new;
let user_id = new;
let ban_user = api.ban_user;
let response = ban_user.json.await;
match response
Ok
}
Feature Flags
- ads
- analytics
- bits
- ccls
- channel-points
- channels
- charity
- chat
- clips
- entitlements
- extensions
- games
- goals
- guest-star
- hype-train
- moderation
- polls
- predictions
- raid
- schedule
- search
- streams
- subscriptions
- teams
- users
- videos
- whispers
- full
Note: Conduits and EventSub are not implemented yet, but are planned for future releases.
License
Licensed under the MIT license.