feat: add functions to fetch a user's history and subscriptions
This commit is contained in:
parent
6f30d6e7bc
commit
171c22458d
42 changed files with 176967 additions and 70 deletions
|
|
@ -122,6 +122,17 @@ impl RustyPipeQuery {
|
|||
}
|
||||
Ok(album)
|
||||
}
|
||||
|
||||
/// Get all liked tracks of the logged-in user
|
||||
///
|
||||
/// Requires authentication cookies.
|
||||
pub async fn music_liked_tracks(&self) -> Result<MusicPlaylist, Error> {
|
||||
self.clone()
|
||||
.authenticated()
|
||||
.music_playlist("LM")
|
||||
.await
|
||||
.map_err(util::map_internal_playlist_err)
|
||||
}
|
||||
}
|
||||
|
||||
impl MapResponse<MusicPlaylist> for response::MusicPlaylist {
|
||||
|
|
@ -298,6 +309,7 @@ impl MapResponse<MusicPlaylist> for response::MusicPlaylist {
|
|||
ctoken,
|
||||
ctx.visitor_data.map(str::to_owned),
|
||||
ContinuationEndpoint::MusicBrowse,
|
||||
ctx.authenticated,
|
||||
),
|
||||
related_playlists: Paginator::new_ext(
|
||||
None,
|
||||
|
|
@ -305,6 +317,7 @@ impl MapResponse<MusicPlaylist> for response::MusicPlaylist {
|
|||
related_ctoken,
|
||||
ctx.visitor_data.map(str::to_owned),
|
||||
ContinuationEndpoint::MusicBrowse,
|
||||
ctx.authenticated,
|
||||
),
|
||||
},
|
||||
warnings: map_res.warnings,
|
||||
|
|
|
|||
Reference in a new issue