Exspotify.Episodes (Exspotify v0.1.0)

View Source

Provides functions for interacting with the Episodes endpoints of the Spotify Web API. See: https://developer.spotify.com/documentation/web-api/reference/episodes

Summary

Functions

Check if one or more episodes are saved in the current user's library. Returns a list of booleans corresponding to the episode IDs. https://developer.spotify.com/documentation/web-api/reference/check-users-saved-episodes

Get Spotify catalog information for a single episode by its unique Spotify ID. https://developer.spotify.com/documentation/web-api/reference/get-episode

Get Spotify catalog information for several episodes based on their Spotify IDs. https://developer.spotify.com/documentation/web-api/reference/get-several-episodes

Get a list of the episodes saved in the current Spotify user's library (paginated). Returns a Paging struct containing saved episodes with added_at timestamps. https://developer.spotify.com/documentation/web-api/reference/get-users-saved-episodes

Functions

check_users_saved_episodes(episode_ids, token)

@spec check_users_saved_episodes([String.t()], String.t()) ::
  {:ok, [boolean()]} | {:error, Exspotify.Error.t()}

Check if one or more episodes are saved in the current user's library. Returns a list of booleans corresponding to the episode IDs. https://developer.spotify.com/documentation/web-api/reference/check-users-saved-episodes

get_episode(episode_id, token)

@spec get_episode(String.t(), String.t()) ::
  {:ok, Exspotify.Structs.Episode.t()} | {:error, Exspotify.Error.t()}

Get Spotify catalog information for a single episode by its unique Spotify ID. https://developer.spotify.com/documentation/web-api/reference/get-episode

get_several_episodes(episode_ids, token)

@spec get_several_episodes([String.t()], String.t()) ::
  {:ok, [Exspotify.Structs.Episode.t()]} | {:error, Exspotify.Error.t()}

Get Spotify catalog information for several episodes based on their Spotify IDs. https://developer.spotify.com/documentation/web-api/reference/get-several-episodes

get_users_saved_episodes(token, opts \\ [])

@spec get_users_saved_episodes(
  String.t(),
  keyword()
) :: {:ok, Exspotify.Structs.Paging.t()} | {:error, Exspotify.Error.t()}

Get a list of the episodes saved in the current Spotify user's library (paginated). Returns a Paging struct containing saved episodes with added_at timestamps. https://developer.spotify.com/documentation/web-api/reference/get-users-saved-episodes

remove_users_saved_episodes(episode_ids, token)

@spec remove_users_saved_episodes([String.t()], String.t()) ::
  {:ok, any()} | {:error, Exspotify.Error.t()}

Remove one or more episodes from the current user's library. https://developer.spotify.com/documentation/web-api/reference/remove-episodes-user

save_episodes_for_current_user(episode_ids, token)

@spec save_episodes_for_current_user([String.t()], String.t()) ::
  {:ok, any()} | {:error, Exspotify.Error.t()}

Save one or more episodes to the current user's library. https://developer.spotify.com/documentation/web-api/reference/save-episodes-user