spotify_cli/endpoints/episodes/
get_users_saved_episodes.rs1use crate::http::api::SpotifyApi;
2use crate::http::client::HttpError;
3use crate::http::endpoints::Endpoint;
4use serde_json::Value;
5
6pub async fn get_users_saved_episodes(
8 client: &SpotifyApi,
9 limit: Option<u8>,
10 offset: Option<u32>,
11) -> Result<Option<Value>, HttpError> {
12 let limit = limit.unwrap_or(20).min(50);
13 let offset = offset.unwrap_or(0);
14 client
15 .get(&Endpoint::SavedEpisodes { limit, offset }.path())
16 .await
17}