Twitch API

This repository is continued under the name

libtwitch-rs crates.io version GNU AGPLv3 A Rust library for the Twitch API.

Contributing

Help for this project is highly appreciated. This was built against an older version of the Twitch API. Some updates are necessary to work with the latest version of the API. Take a look into the issues if you want to contribute to the project.

Fork it, implement your changes and make a Pull-Request against the feature-dev branch of this repo.

Usage

``` use twitchapi; use twitchapi::users;

...

let mut c = twitchapi::new(String::from(CLIENTID)); c.setoauth_token(TOKEN);

if let Some(user) = match users::get(&c) { Ok(r) => { assert!(r.email.issome()); Some(r) }, Err(r) => { println!("{:?}", r); assert!(false); None } } { let userid = user.id.to_string();

match users::get_by_id(&c, &user_id) {
    Ok(r)  => assert_eq!(r.name, user.name),
    Err(r) => { println!("{:?}", r); assert!(false); }
}

} ```

License

GNU AGPL-3.0-or-later; see copying.md and legal/AGPL-v3.