Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rust library for talking with the new Twitch API aka. "Helix", TMI and more! Use Twitch endpoints fearlessly!

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Lakelezz/twitch_api2

 
 

Twitch API2 | Rust library for talking with the new Twitch API aka. "Helix", TMI and more!

githubcrates-iodocs-rs-big

See documentation for more info.

You can see current unpublished docs here: local-docs

See examples for examples.

use twitch_api2::{TwitchClient, helix::channels::GetChannelInformationRequest};
use twitch_oauth2::{AccessToken, Scope, TwitchToken, tokens::errors::TokenError, UserToken, client::reqwest_http_client};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
    let client_id = twitch_oauth2::ClientId::new("validclientid".to_string());
    let token = UserToken::from_existing(
        reqwest_http_client,
        AccessToken::new("mytoken".to_string()),
        None, // Client ID
        None, // Client Secret
    )
    .await?;
    let client: TwitchClient<reqwest::Client> =  TwitchClient::default();
    let req = GetChannelInformationRequest::builder()
        .broadcaster_id("12826")
        .build();

    println!("{:?}", &client.helix.req_get(req, &token).await?.data.unwrap().title);

    Ok(())
}

Goals

This crate aims to target

This crate should also be able to be used for

There are no current plans to support

License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust library for talking with the new Twitch API aka. "Helix", TMI and more! Use Twitch endpoints fearlessly!

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%