spotify_ex v1.0.3 Spotify.Personalization
Endpoints for retrieving information about the user’s listening habits
Some endpoints return collections. Spotify wraps the collection in a paging object, this API does the same. A single piece of data will not be wrapped.
There are two functions for each endpoint, one that actually makes the request, and one that provides the endpoint:
Spotify.Playist.create_playlist(conn, "foo", "bar") # makes the POST request.
Spotify.Playist.create_playlist_url("foo", "bar") # provides the url for the request.
https://developer.spotify.com/web-api/web-api-personalization-endpoints/
Summary
Functions
Defines the Personalization struct
Implements the hook expected by the Responder behaviour
Get the current user’s top artists based on calculated affinity. Spotify Documentation
Get the current user’s top artists based on calculated affinity
Get the current user’s top tracks based on calculated affinity. Spotify Documentation
Get the current user’s top tracks based on calculated affinity
Base URL
Functions
Get the current user’s top artists based on calculated affinity. Spotify Documentation
Method: GET
Optional Params: limit
, offset
, time_range
Spotify.Personalization.top_artists(conn)
{ :ok, artists: [%Spotify.Artist{..}...], paging: %Paging{next:...} }
Get the current user’s top artists based on calculated affinity.
iex> Spotify.Personalization.top_artists_url(limit: 5, time_range: "medium_term")
"https://api.spotify.com/v1/me/top/artists?limit=5&time_range=medium_term"
Get the current user’s top tracks based on calculated affinity. Spotify Documentation
Method: GET
Optional Params: limit
, offset
, time_range
Spotify.Personalization.top_tracks(conn)
{ :ok, tracks: [%Spotify.Tracks{..}...], paging: %Paging{next:...} }
Get the current user’s top tracks based on calculated affinity.
iex> Spotify.Personalization.top_tracks_url
"https://api.spotify.com/v1/me/top/tracks"