spotify_cli/endpoints/player/get_playback_state.rs
1/// Get information about the user's current playback state.
2///
3/// See: https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback
4use crate::http::api::SpotifyApi;
5use crate::http::client::HttpError;
6use crate::http::endpoints::Endpoint;
7use serde_json::Value;
8
9pub async fn get_playback_state(client: &SpotifyApi) -> Result<Option<Value>, HttpError> {
10 client.get(&Endpoint::PlayerState.path()).await
11}