Crates.io | twitch_api2 |
lib.rs | twitch_api2 |
version | 0.6.1 |
source | src |
created_at | 2020-08-10 22:37:10.411298 |
updated_at | 2022-04-29 08:14:10.368515 |
description | Library for talking with the new Twitch API aka. "Helix", TMI and more! |
homepage | |
repository | https://github.com/Emilgardis/twitch_api2 |
max_upload_size | |
id | 275172 |
size | 1,187,810 |
See documentation for more info.
You can see current unpublished docs here:
See examples for examples.
use twitch_api2::helix::HelixClient;
use twitch_oauth2::{AccessToken, UserToken};
use reqwest::Client as ReqwestClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
let client: HelixClient<ReqwestClient> = HelixClient::default();
let token = UserToken::from_existing(
&client,
AccessToken::new("mytoken".to_string()),
None, // Refresh Token
None, // Client Secret
)
.await?;
println!("Channel: {:?}",
client.get_channel_from_login("twitchdev", &token).await?
);
Ok(())
}
This crate aims to target
This crate should also be able to be used for
There are no current plans to support
Drops (except what is in Helix)