A asynchronous implementation of the invidious innertube aka youtubei API wrapper.
Using tokio,reqwest, serde and serde_json.
old queries are now prefixed with _legacy, if you rely on those just rename them in your program they still function the same
serde_json
```rust use youtubeirs::{query::player, utils::defaultclientconfig, types::queryresults::PlayerResult};
async fn main() { // create default clientconfig with WEB client let clientconfig = &defaultclientconfig(); // get player for video with id gC6dQrScmHE let player: PlayerResult = player(String::from("gC6dQrScmHE"),String::from(""),&clientconfig).await.unwrap(); println!("{}",player.videodetails.title); // video title }
```
For logging tracing is used so tracingsubscribe can be installed for easier use of tracing. The library has as target youtubeirs with debug,trace and error levels. ```rust use youtubeirs::{query::player, utils::defaultclient_config};
async fn main() { std::env::setvar("RUSTLOG", "youtubeirs=debug"); tracingsubscriber::fmt::init(); // create default clientconfig with WEB client let clientconfig = &defaultclientconfig(); // get player for video with id gC6dQrScmHE let player: PlayerResult = player(String::from("gC6dQrScmHE"),String::from(""),&clientconfig).await.unwrap(); println!("{}",player.videodetails.title); // video title }
```