youtubei-rs

A asynchronous implementation of the invidious innertube aka youtubei API wrapper.
Using tokio,reqwest, serde and serde_json.

Dependencies

Roadmap

Implemented endpoints

Supported queries

For more in depth infos take a look at query.rs and tests.rs

General information

The most structs have common fields such as thumbnail and others.

Example

```rust use youtubeirs::{query::getvideo, utils::defaultclientconfig};

[tokio::main]

async fn main() { // create default clientconfig with WEB client let clientconfig = &defaultclientconfig(); // get video with id gC6dQrScmHE let videoquery = getvideo(String::from("gC6dQrScmHE"),String::from(""),&clientconfig).await.unwrap(); println!("{}",videoquery.video.title); // video title }

```

With logging

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::getvideo, utils::defaultclientconfig};

[tokio::main]

async fn main() { std::env::setvar("RUSTLOG", "youtubeirs=debug"); tracingsubscriber::fmt::init(); // create default clientconfig with WEB client let clientconfig = &defaultclientconfig(); // get video with id gC6dQrScmHE let videoquery = getvideo(String::from("gC6dQrScmHE"),String::from(""),&clientconfig).await.unwrap(); println!("{}",videoquery.video.title); // video title }

```