twitch_api 0.7.0-rc.5

Library for talking with the new Twitch API aka. "Helix", TMI and more!
docs.rs failed to build twitch_api-0.7.0-rc.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: twitch_api-0.7.0-rc.7

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

githubcrates-iodocs-rs-bigdiscord

See documentation for more info.

You can see current unpublished docs for the main branch here: local-docs

See examples for examples.

use twitch_api::helix::HelixClient;
use twitch_api::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(())
}

Notes

This crate was previously available as twitch_api2 and has since been renamed to twitch_api

Goals

This crate aims to target

This crate should also be able to be used for

There are no current plans to support