invidious 0.7.8

Get information about videos from YouTube with this simple Invidious API wrapper. Does not use the YouTube API (No tokens required)
Documentation
use crate::{traits::PublicItems, InvidiousError};

pub type Annotations = String;

impl PublicItems for Annotations {
    fn url(id: &str, params: &str) -> String {
        format!("api/v1/annotations/{id}{params}")
    }

    fn from_str<'a>(s: String) -> Result<Self, InvidiousError>
    where
        Self: Sized + serde::de::DeserializeOwned,
    {
        Ok(s)
    }

    fn to_string<'a>(&self) -> String
    where
        Self: serde::Serialize + serde::Deserialize<'a> + std::fmt::Debug,
    {
        self.clone()
    }

    // fn from_value<'a>(value: serde_json::Value) -> Result<Self, InvidiousError>
    // where
    //     Self: Sized + serde::de::DeserializeOwned,
    // {
    //     Ok(serde_json::to_string(&value)?)
    // }
}