Class TracksApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCheck User's Saved TracksGet Track's Audio AnalysisGet Track's Audio FeaturesGet RecommendationsGet Tracks' Audio FeaturesgetSeveralTracks(String ids) Get Several TracksGet TrackGet User's Saved TracksremoveTracksUser(List<String> ids) Remove User's Saved TrackssaveTracksUser(List<String> ids) Save Tracks for Current User
-
Constructor Details
-
TracksApi
public TracksApi()
-
-
Method Details
-
checkUsersSavedTracks
Check User's Saved Tracks
Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library.
- Parameters:
ids-A comma-separated list of the Spotify IDs. For example:
ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.- Returns:
- a
CheckUsersSavedTracksRequestobject to build and execute the request
-
getAudioAnalysis
Get Track's Audio Analysis
Get a low-level audio analysis for a track in the Spotify catalog. The audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.
- Parameters:
id-The Spotify IDfor the track.
- Returns:
- a
GetAudioAnalysisRequestobject to build and execute the request
-
getAudioFeatures
Get Track's Audio Features
Get audio feature information for a single track identified by its unique Spotify ID.
- Parameters:
id-The Spotify ID for the track.
- Returns:
- a
GetAudioFeaturesRequestobject to build and execute the request
-
getRecommendations
Get Recommendations
Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.
For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.
- Returns:
- a
GetRecommendationsRequestobject to build and execute the request
-
getSeveralAudioFeatures
Get Tracks' Audio Features
Get audio features for multiple tracks based on their Spotify IDs.
- Parameters:
ids-A comma-separated list of the Spotify IDsfor the tracks. Maximum: 100 IDs.
- Returns:
- a
GetSeveralAudioFeaturesRequestobject to build and execute the request
-
getSeveralTracks
Get Several Tracks
Get Spotify catalog information for multiple tracks based on their Spotify IDs.
- Parameters:
ids-A comma-separated list of the Spotify IDs. For example:
ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.- Returns:
- a
GetSeveralTracksRequestobject to build and execute the request
-
getTrack
Get Track
Get Spotify catalog information for a single track identified by its unique Spotify ID.
- Parameters:
id-The Spotify IDfor the track.
- Returns:
- a
GetTrackRequestobject to build and execute the request
-
getUsersSavedTracks
Get User's Saved Tracks
Get a list of the songs saved in the current Spotify user's 'Your Music' library.
- Returns:
- a
GetUsersSavedTracksRequestobject to build and execute the request
-
removeTracksUser
Remove User's Saved Tracks
Remove one or more tracks from the current user's 'Your Music' library.
- Parameters:
ids-A JSON array of the Spotify IDs. For example:
["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]
A maximum of 50 items can be specified in one request. Note: if theidsparameter is present in the query string, any IDs listed here in the body will be ignored.- Returns:
- a
RemoveTracksUserRequestobject to build and execute the request
-
saveTracksUser
Save Tracks for Current User
Save one or more tracks to the current user's 'Your Music' library.
- Parameters:
ids-A JSON array of the Spotify IDs. For example:
["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]
A maximum of 50 items can be specified in one request. Note: if theidsparameter is present in the query string, any IDs listed here in the body will be ignored.- Returns:
- a
SaveTracksUserRequestobject to build and execute the request
-