diff --git a/src/client/history.rs b/src/client/history.rs index cc0f874..2dddc2b 100644 --- a/src/client/history.rs +++ b/src/client/history.rs @@ -7,7 +7,7 @@ use crate::{ error::{Error, ExtractionError}, model::{ paginator::{ContinuationEndpoint, Paginator}, - ChannelItem, HistoryItem, VideoItem, + ChannelItem, HistoryItem, PlaylistItem, VideoItem, }, serializer::MapResult, }; @@ -134,6 +134,18 @@ impl RustyPipeQuery { ) .await } + + /// Get a list of YouTube playlists the current user added to their library + pub async fn saved_playlists(&self) -> Result, Error> { + self.clone() + .authenticated() + .continuation( + "4qmFsgJFEhZGRXBsYXlsaXN0X2FnZ3JlZ2F0aW9uGgRxQUlDmgIkNjc5MjVhZTYtMDAwMC0yYzQyLWFjMjItM2MyODZkNDI1MTQy", + ContinuationEndpoint::Browse, + None, + ) + .await + } } impl MapResponse>> for response::History {