Crates.io | twitch_api |
lib.rs | twitch_api |
version | |
source | src |
created_at | 2017-04-03 20:55:26.107316 |
updated_at | 2025-01-22 18:09:41.958957 |
description | Library for talking with the new Twitch API aka. "Helix", EventSub and more! |
homepage | |
repository | https://github.com/twitch-rs/twitch_api |
max_upload_size | |
id | 9531 |
Cargo.toml error: | TOML parse error at line 28, column 1 | 28 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
See documentation for more info.
You can see current unpublished docs for the main branch here:
See examples for examples. If you want to run them locally, make sure you get the git submodules first.
use twitch_api::helix::HelixClient;
use twitch_api::twitch_oauth2::{AccessToken, UserToken};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
// Create the HelixClient, which is used to make requests to the Twitch API
let client: HelixClient<reqwest::Client> = HelixClient::default();
// Create a UserToken, which is used to authenticate requests
let token = UserToken::from_token(&client, AccessToken::from("mytoken")).await?;
println!(
"Channel: {:?}",
client.get_channel_from_login("twitchdev", &token).await?
);
Ok(())
}
This crate was previously available as twitch_api2
and has since been renamed to twitch_api
This crate aims to target
There are no current plans to support