Class TracksApi

java.lang.Object
de.sonallux.spotify.api.apis.TracksApi

public class TracksApi extends Object
Tracks
  • Constructor Details

    • TracksApi

      public TracksApi()
  • Method Details

    • checkUsersSavedTracks

      public CheckUsersSavedTracksRequest checkUsersSavedTracks(String ids)

      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 CheckUsersSavedTracksRequest object to build and execute the request
    • getAudioAnalysis

      public GetAudioAnalysisRequest getAudioAnalysis(String id)

      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 GetAudioAnalysisRequest object to build and execute the request
    • getAudioFeatures

      public GetAudioFeaturesRequest getAudioFeatures(String id)

      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 GetAudioFeaturesRequest object to build and execute the request
    • getRecommendations

      public GetRecommendationsRequest 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 GetRecommendationsRequest object to build and execute the request
    • getSeveralAudioFeatures

      public GetSeveralAudioFeaturesRequest getSeveralAudioFeatures(String ids)

      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 GetSeveralAudioFeaturesRequest object to build and execute the request
    • getSeveralTracks

      public GetSeveralTracksRequest getSeveralTracks(String ids)

      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 GetSeveralTracksRequest object to build and execute the request
    • getTrack

      public GetTrackRequest getTrack(String id)

      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 GetTrackRequest object to build and execute the request
    • getUsersSavedTracks

      public GetUsersSavedTracksRequest getUsersSavedTracks()

      Get User's Saved Tracks

      Get a list of the songs saved in the current Spotify user's 'Your Music' library.

      Returns:
      a GetUsersSavedTracksRequest object to build and execute the request
    • removeTracksUser

      public RemoveTracksUserRequest removeTracksUser(List<String> ids)

      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 the ids parameter is present in the query string, any IDs listed here in the body will be ignored.

      Returns:
      a RemoveTracksUserRequest object to build and execute the request
    • saveTracksUser

      public SaveTracksUserRequest saveTracksUser(List<String> ids)

      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 the ids parameter is present in the query string, any IDs listed here in the body will be ignored.

      Returns:
      a SaveTracksUserRequest object to build and execute the request