Exspotify.Albums (Exspotify v0.1.0)

View Source

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

Summary

Functions

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

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

Get a list of new album releases featured in Spotify (country optional). Returns a Paging struct containing new release albums. https://developer.spotify.com/documentation/web-api/reference/get-new-releases

Get Spotify catalog information for multiple albums identified by their Spotify IDs. https://developer.spotify.com/documentation/web-api/reference/get-several-albums

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

Functions

check_users_saved_albums(album_ids, token)

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

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

get_album(album_id, token)

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

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

get_album_tracks(album_id, token, opts \\ [])

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

Get Spotify catalog information about an album's tracks (paginated). https://developer.spotify.com/documentation/web-api/reference/get-albums-tracks

get_new_releases(token, opts \\ [])

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

Get a list of new album releases featured in Spotify (country optional). Returns a Paging struct containing new release albums. https://developer.spotify.com/documentation/web-api/reference/get-new-releases

get_several_albums(album_ids, token)

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

Get Spotify catalog information for multiple albums identified by their Spotify IDs. https://developer.spotify.com/documentation/web-api/reference/get-several-albums

get_users_saved_albums(token, opts \\ [])

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

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

remove_users_saved_albums(album_ids, token)

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

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

save_albums_for_current_user(album_ids, token)

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

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