spotify_cli/endpoints/playlists/get_playlist.rs
1/// Get a playlist owned by a Spotify user.
2///
3/// See: https://developer.spotify.com/documentation/web-api/reference/get-playlist
4use crate::http::api::SpotifyApi;
5use crate::http::client::HttpError;
6use crate::http::endpoints::Endpoint;
7use serde_json::Value;
8
9pub async fn get_playlist(
10 client: &SpotifyApi,
11 playlist_id: &str,
12) -> Result<Option<Value>, HttpError> {
13 client
14 .get(&Endpoint::Playlist { id: playlist_id }.path())
15 .await
16}