View Source Spotify.Track (spotify_ex v2.4.0)

Functions for retrieving information about one or more tracks.

There are two functions for each endpoint; one that actually makes the request, and one that provides the endpoint:

Spotify.Track.audio_features(conn, ids: "1, 3") # makes the GET request
Spotify.Track.audio_features_url(ids: "1, 3") # provides the url for the request

https://developer.spotify.com/web-api/track-endpoints/

Link to this section Summary

Functions

Get audio features for several tracks Spotify Documentation

Get audio features for a track

Implements the hook expected by the Responder behaviour

Get a track

Get several tracks

Link to this section Functions

Link to this function

audio_features(conn, params)

View Source

Get audio features for several tracks Spotify Documentation

Method: GET

Spotify.Track.audio_features(conn, ids: "1, 3")
# => {:ok [%Spotify.AudioFeatures, ...]}
Link to this function

audio_features_url(params)

View Source

Get audio features for a track

iex> Spotify.Track.audio_features_url("1")
"https://api.spotify.com/v1/audio-features/1"

Implements the hook expected by the Responder behaviour

Get a track Spotify Documentation

Method: GET

Optional Params: market

Spotify.get_track(conn, id)
# => { :ok , %Spotify.Track{} }

Get a track

iex> Spotify.Track.get_track_url("1")
"https://api.spotify.com/v1/tracks/1"
Link to this function

get_tracks(conn, params)

View Source

Get several tracks Spotify Documentation

Spotify.Track.get_tracks(conn, ids: "1,3")
# => { :ok , [%Spotify.Track{}, ...] }

Method: GET

Get several tracks

iex> Spotify.Track.get_tracks_url(ids: "1,3")
"https://api.spotify.com/v1/tracks?ids=1%2C3"