Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.
/ libtwitch-rs Public archive
forked from hatmatter/twitch_api

Twitch API library written in Rust

License

LGPL-3.0, Unknown licenses found

Licenses found

LGPL-3.0
LICENSE
Unknown
copying.md
Notifications You must be signed in to change notification settings

age-rs/libtwitch-rs

 
 

Repository files navigation

Archived

  The Twitch v5 API is scheduled to be shutdown at the end of February 
  2022.

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
Bits ✔️
Channels ✔️
Chat ✔️
Clips ✔️
Collections ✔️
Entitlements
Games ✔️
Ingests ✔️
Moderation
Search ✔️
Streams ✔️
Subscriptions
Tags
Teams ✔️
Users ✔️
Videos ✔️
Webhooks

Links

Helpful Documentation

Token Generation

Repositories:

License

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

About

Twitch API library written in Rust

Topics

Resources

License

LGPL-3.0, Unknown licenses found

Licenses found

LGPL-3.0
LICENSE
Unknown
copying.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%