spotify_cli/endpoints/tracks/get_track.rs
1use crate::http::api::SpotifyApi;
2use crate::http::client::HttpError;
3use crate::http::endpoints::Endpoint;
4use serde_json::Value;
5
6/// Get track details by ID
7pub async fn get_track(client: &SpotifyApi, track_id: &str) -> Result<Option<Value>, HttpError> {
8 client.get(&Endpoint::Track { id: track_id }.path()).await
9}