refactor!: refactored response models

doc: documented all public methods
This commit is contained in:
ThetaDev 2022-12-09 01:01:25 +01:00
parent 4c1876cb55
commit f526ab38eb
37 changed files with 600 additions and 255 deletions

View file

@ -3,12 +3,13 @@ use std::borrow::Cow;
use crate::{
client::response::music_item::MusicListMapper,
error::{Error, ExtractionError},
model::{AlbumItem, FromYtItem, TrackItem},
model::{traits::FromYtItem, AlbumItem, TrackItem},
};
use super::{response, ClientType, MapResponse, QBrowse, RustyPipeQuery};
impl RustyPipeQuery {
/// Get the new albums that were released on YouTube Music
pub async fn music_new_albums(&self) -> Result<Vec<AlbumItem>, Error> {
let context = self.get_context(ClientType::DesktopMusic, true, None).await;
let request_body = QBrowse {
@ -26,6 +27,7 @@ impl RustyPipeQuery {
.await
}
/// Get the new music videos that were released on YouTube Music
pub async fn music_new_videos(&self) -> Result<Vec<TrackItem>, Error> {
let context = self.get_context(ClientType::DesktopMusic, true, None).await;
let request_body = QBrowse {