libtwitch-rs

Crates.iolibtwitch-rs
lib.rslibtwitch-rs
version0.3.0
sourcesrc
created_at2019-10-07 23:53:43.77346
updated_at2020-10-31 07:24:02.398467
descriptionRust library for the Twitch APIv5 (Kraken)
homepage
repositoryhttps://github.com/age-rs/libtwitch-rs
max_upload_size
id170711
size168,726
(simonsan)

documentation

https://docs.rs/libtwitch-rs/

README

libtwitch-rs docs.rs crates.io version dependency status GNU LGPLv3

A Rust library for the Twitch APIv5 (Kraken).

Contributing

Help for this project is highly appreciated. This was built against Twitch APIv5 (Kraken). 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 libtwitch_rs;
use libtwitch_rs::users;

...

let mut c = libtwitch_rs::new(String::from(CLIENTID));
c.set_oauth_token(TOKEN);

if let Some(user) = match users::get(&c) {
    Ok(r)  => { assert!(r.email.is_some()); Some(r) },
    Err(r) => { println!("{:?}", r); assert!(false); None }
    } {
    let user_id = 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); }
    }
}

Supported API versions

Important Note: Kraken is deprecated and Helix (the new API version) is out of scope of this repository currently.

Endpoints Kraken/v5
Analytics :heavy_minus_sign:
Bits :heavy_check_mark:
Channels :heavy_check_mark:
Chat :heavy_check_mark:
Clips :heavy_check_mark:
Collections :heavy_check_mark:
Entitlements :heavy_minus_sign:
Games :heavy_check_mark:
Ingests :heavy_check_mark:
Moderation :heavy_minus_sign:
Search :heavy_check_mark:
Streams :heavy_check_mark:
Subscriptions :heavy_minus_sign:
Tags :heavy_minus_sign:
Teams :heavy_check_mark:
Users :heavy_check_mark:
Videos :heavy_check_mark:
Webhooks :heavy_minus_sign:

Links

Helpful Documentation

Token Generation

Repositories:

License

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

Commit count: 50

cargo fmt