View Source Sptfy.Playlist (Sptfy v0.1.5)

https://developer.spotify.com/documentation/web-api/reference-beta/#category-playlists

Link to this section Summary

Functions

POST /v1/playlists/:id/tracks

POST /v1/users/:id/playlists

GET /v1/playlists/:id/images

GET /v1/playlists/:id

GET /v1/playlists/:id/tracks

GET /v1/users/:id/playlists

DELETE /v1/playlists/:id/tracks

PUT /v1/playlists/:id/tracks

PUT /v1/playlists/:id/tracks

Link to this section Functions

Link to this function

add_tracks(token, params \\ %{})

View Source
@spec add_tracks(token :: String.t(), params :: map() | Keyword.t()) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

POST /v1/playlists/:id/tracks

parameters

Parameters

  • id: required
  • uris
  • position
Link to this function

create_user_playlist(token, params \\ %{})

View Source
@spec create_user_playlist(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, Sptfy.Object.FullPlaylist.t()}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

POST /v1/users/:id/playlists

parameters

Parameters

  • id: required
  • name: required
  • public
  • collaborative
  • description
Link to this function

get_cover_images(token, params \\ %{})

View Source
@spec get_cover_images(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, [Sptfy.Object.Image.t()]}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

GET /v1/playlists/:id/images

parameters

Parameters

  • id: required
Link to this function

get_my_playlists(token, params \\ %{})

View Source
@spec get_my_playlists(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, Sptfy.Object.Paging.t()}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

GET /v1/me/playlists

parameters

Parameters

  • limit
  • offset
Link to this function

get_playlist(token, params \\ %{})

View Source
@spec get_playlist(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, Sptfy.Object.FullPlaylist.t()}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

GET /v1/playlists/:id

parameters

Parameters

  • id: required
  • market
  • fields
  • additional_types
Link to this function

get_playlist_tracks(token, params \\ %{})

View Source
@spec get_playlist_tracks(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, Sptfy.Object.Paging.t()}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

GET /v1/playlists/:id/tracks

parameters

Parameters

  • id: required
  • market
  • fields
  • limit
  • offset
  • additional_types
Link to this function

get_user_playlists(token, params \\ %{})

View Source
@spec get_user_playlists(token :: String.t(), params :: map() | Keyword.t()) ::
  {:ok, Sptfy.Object.Paging.t()}
  | {:error, Sptfy.Object.Error.t()}
  | {:error, Mint.Types.error()}

GET /v1/users/:id/playlists

parameters

Parameters

  • id: required
  • limit
  • offset
Link to this function

remove_tracks(token, params \\ %{})

View Source
@spec remove_tracks(token :: String.t(), params :: map() | Keyword.t()) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

DELETE /v1/playlists/:id/tracks

parameters

Parameters

  • id: required
  • tracks: required
Link to this function

reorder_tracks(token, params \\ %{})

View Source
@spec reorder_tracks(token :: String.t(), params :: map() | Keyword.t()) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

PUT /v1/playlists/:id/tracks

parameters

Parameters

  • id: required
  • range_start
  • insert_before
  • range_length
  • snapshot_id
Link to this function

replace_tracks(token, params \\ %{})

View Source
@spec replace_tracks(token :: String.t(), params :: map() | Keyword.t()) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

PUT /v1/playlists/:id/tracks

parameters

Parameters

  • id: required
  • uris
Link to this function

update_playlist_details(token, params \\ %{})

View Source
@spec update_playlist_details(token :: String.t(), params :: map() | Keyword.t()) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

PUT /v1/playlists/:id

parameters

Parameters

  • id: required
  • name
  • public
  • collaborative
  • description
Link to this function

upload_cover_image(token, base64_body, params \\ %{})

View Source
@spec upload_cover_image(
  token :: String.t(),
  base64_body :: String.t(),
  params :: map() | Keyword.t()
) ::
  :ok | {:error, Sptfy.Object.Error.t()} | {:error, Mint.Types.error()}

PUT /v1/playlists/:id/images

parameters

Parameters

  • id: required