spotify_cli/endpoints/chapters/
get_several_chapters.rs

1use crate::http::api::SpotifyApi;
2use crate::http::client::HttpError;
3use crate::http::endpoints::Endpoint;
4use serde_json::Value;
5
6/// Get multiple chapters by IDs
7pub async fn get_several_chapters(
8    client: &SpotifyApi,
9    chapter_ids: &[String],
10) -> Result<Option<Value>, HttpError> {
11    let ids = chapter_ids.join(",");
12    client.get(&Endpoint::Chapters { ids: &ids }.path()).await
13}