3 unstable releases
0.3.1 | Jan 15, 2021 |
---|---|
0.3.0 | Aug 28, 2020 |
0.1.0 | Jan 8, 2020 |
#43 in #strongly-typed
28KB
602 lines
RoosterTeeth-rs
RoosterTeeth-rs is a strongly typed library designed to interact with the RoosterTeeth.com API. Examples and documentation is available on docs.rs.
Legal Stuff:
The use of this library is bound by Rooster Teeth's Terms of Use.
"Rooster Teeth" is a trade name or registered trademark of Rooster Teeth Productions, LLC. © Rooster Teeth Productions, LLC.
lib.rs
:
RoosterTeeth-rs is a rust wrapper for the RoosterTeeth VOD api. All requests are done through the requests object.
There are usually optional parameters to restrict to a certain channel or to change how it is sorted. In the following example, we grab the first page of episodes, with no restrictions and default sorting.
use roosterteeth_rs::requests::{Requests, Credential};
let requests = Requests::new(Credential::Anonymous);
let episodes = requests.list_episodes(1, None, None);
println!("{}",episodes[0].attributes.title);
All of the returned values are documented in the following page as structs:
Please note the difference between an Episode and a Video struct. An episode struct returns all the information about that episode, while a video struct is useful mainly for getting the m3u8 urls and will fail if you don't have permissions to watch the video. (For example, if you aren't a first member or the video isn't public.)
Dependencies
~4–16MB
~233K SLoC