Sptfy.Playlist (Sptfy v0.1.3) View Source

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

Specs

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

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

create_user_playlist(token, params \\ %{})

View Source

Specs

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

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

get_cover_images(token, params \\ %{})

View Source

Specs

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

  • id: required
Link to this function

get_my_playlists(token, params \\ %{})

View Source

Specs

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

  • limit
  • offset
Link to this function

get_playlist(token, params \\ %{})

View Source

Specs

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

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

get_playlist_tracks(token, params \\ %{})

View Source

Specs

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

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

get_user_playlists(token, params \\ %{})

View Source

Specs

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

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

remove_tracks(token, params \\ %{})

View Source

Specs

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

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

reorder_tracks(token, params \\ %{})

View Source

Specs

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

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

replace_tracks(token, params \\ %{})

View Source

Specs

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

  • id: required
  • uris
Link to this function

update_playlist_details(token, params \\ %{})

View Source

Specs

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

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

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

View Source

Specs

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

  • id: required