spotify-cli 0.5.0

A command-line interface for Spotify
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::http::api::SpotifyApi;
use crate::http::client::HttpError;
use crate::http::endpoints::Endpoint;
use serde_json::Value;

/// Get multiple tracks by IDs
pub async fn get_several_tracks(
    client: &SpotifyApi,
    track_ids: &[String],
) -> Result<Option<Value>, HttpError> {
    let ids = track_ids.join(",");
    client.get(&Endpoint::Tracks { ids: &ids }.path()).await
}