Class GetRecommendationsRequest.Builder

All Implemented Interfaces:
IRequest.Builder<Recommendations, GetRecommendationsRequest.Builder>
Enclosing class:
GetRecommendationsRequest

@Deprecated public static final class GetRecommendationsRequest.Builder extends AbstractDataRequest.Builder<Recommendations, GetRecommendationsRequest.Builder>
Deprecated.
This endpoint has been deprecated by Spotify.
Builder class for building a GetRecommendationsRequest.
  • Constructor Details

    • Builder

      public Builder(String accessToken)
      Deprecated.
      Create a new GetRecommendationsRequest.Builder instance.
      Parameters:
      accessToken - Required. A valid access token from the Spotify Accounts service.
  • Method Details

    • limit

      Deprecated.
      The limit query parameter setter.
      Parameters:
      limit - Optional. The target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response. Default: 20\. Minimum: 1\. Maximum: 100.
      Returns:
      A GetRecommendationsRequest.Builder.
    • market

      Deprecated.
      The market query parameter setter.
      Parameters:
      market - Optional. An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned.
      If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
      Note: If neither market or user country are provided, the content is considered unavailable for the client.
      Users can view the country that is associated with their account in the account settings.
      Returns:
      A GetRecommendationsRequest.Builder.
    • seed_artists

      public GetRecommendationsRequest.Builder seed_artists(String seed_artists)
      Deprecated.
      The seed_artists query parameter setter.
      Parameters:
      seed_artists - Required. A comma separated list of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
      _Note: only required if seed_genres and seed_tracks are not set_.
      Returns:
      A GetRecommendationsRequest.Builder.
    • seed_genres

      public GetRecommendationsRequest.Builder seed_genres(String seed_genres)
      Deprecated.
      The seed_genres query parameter setter.
      Parameters:
      seed_genres - Required. A comma separated list of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
      _Note: only required if seed_artists and seed_tracks are not set_.
      Returns:
      A GetRecommendationsRequest.Builder.
    • seed_tracks

      public GetRecommendationsRequest.Builder seed_tracks(String seed_tracks)
      Deprecated.
      The seed_tracks query parameter setter.
      Parameters:
      seed_tracks - Required. A comma separated list of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
      _Note: only required if seed_artists and seed_genres are not set_.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_acousticness

      public GetRecommendationsRequest.Builder min_acousticness(Float min_acousticness)
      Deprecated.
      The min_acousticness query parameter setter.
      Parameters:
      min_acousticness - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_acousticness

      public GetRecommendationsRequest.Builder max_acousticness(Float max_acousticness)
      Deprecated.
      The max_acousticness query parameter setter.
      Parameters:
      max_acousticness - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_acousticness

      public GetRecommendationsRequest.Builder target_acousticness(Float target_acousticness)
      Deprecated.
      The target_acousticness query parameter setter.
      Parameters:
      target_acousticness - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_danceability

      public GetRecommendationsRequest.Builder min_danceability(Float min_danceability)
      Deprecated.
      The min_danceability query parameter setter.
      Parameters:
      min_danceability - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_danceability

      public GetRecommendationsRequest.Builder max_danceability(Float max_danceability)
      Deprecated.
      The max_danceability query parameter setter.
      Parameters:
      max_danceability - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_danceability

      public GetRecommendationsRequest.Builder target_danceability(Float target_danceability)
      Deprecated.
      The target_danceability query parameter setter.
      Parameters:
      target_danceability - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_duration_ms

      public GetRecommendationsRequest.Builder min_duration_ms(Integer min_duration_ms)
      Deprecated.
      The min_duration_ms query parameter setter.
      Parameters:
      min_duration_ms - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_duration_ms

      public GetRecommendationsRequest.Builder max_duration_ms(Integer max_duration_ms)
      Deprecated.
      The max_duration_ms query parameter setter.
      Parameters:
      max_duration_ms - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_duration_ms

      public GetRecommendationsRequest.Builder target_duration_ms(Integer target_duration_ms)
      Deprecated.
      The target_duration_ms query parameter setter.
      Parameters:
      target_duration_ms - Optional. Target duration of the track (ms)
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_energy

      public GetRecommendationsRequest.Builder min_energy(Float min_energy)
      Deprecated.
      The min_energy query parameter setter.
      Parameters:
      min_energy - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_energy

      public GetRecommendationsRequest.Builder max_energy(Float max_energy)
      Deprecated.
      The max_energy query parameter setter.
      Parameters:
      max_energy - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_energy

      public GetRecommendationsRequest.Builder target_energy(Float target_energy)
      Deprecated.
      The target_energy query parameter setter.
      Parameters:
      target_energy - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_instrumentalness

      public GetRecommendationsRequest.Builder min_instrumentalness(Float min_instrumentalness)
      Deprecated.
      The min_instrumentalness query parameter setter.
      Parameters:
      min_instrumentalness - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_instrumentalness

      public GetRecommendationsRequest.Builder max_instrumentalness(Float max_instrumentalness)
      Deprecated.
      The max_instrumentalness query parameter setter.
      Parameters:
      max_instrumentalness - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_instrumentalness

      public GetRecommendationsRequest.Builder target_instrumentalness(Float target_instrumentalness)
      Deprecated.
      The target_instrumentalness query parameter setter.
      Parameters:
      target_instrumentalness - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_key

      public GetRecommendationsRequest.Builder min_key(Integer min_key)
      Deprecated.
      The min_key query parameter setter.
      Parameters:
      min_key - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_key

      public GetRecommendationsRequest.Builder max_key(Integer max_key)
      Deprecated.
      The max_key query parameter setter.
      Parameters:
      max_key - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_key

      public GetRecommendationsRequest.Builder target_key(Integer target_key)
      Deprecated.
      The target_key query parameter setter.
      Parameters:
      target_key - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_liveness

      public GetRecommendationsRequest.Builder min_liveness(Float min_liveness)
      Deprecated.
      The min_liveness query parameter setter.
      Parameters:
      min_liveness - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_liveness

      public GetRecommendationsRequest.Builder max_liveness(Float max_liveness)
      Deprecated.
      The max_liveness query parameter setter.
      Parameters:
      max_liveness - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_liveness

      public GetRecommendationsRequest.Builder target_liveness(Float target_liveness)
      Deprecated.
      The target_liveness query parameter setter.
      Parameters:
      target_liveness - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_loudness

      public GetRecommendationsRequest.Builder min_loudness(Float min_loudness)
      Deprecated.
      The min_loudness query parameter setter.
      Parameters:
      min_loudness - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_loudness

      public GetRecommendationsRequest.Builder max_loudness(Float max_loudness)
      Deprecated.
      The max_loudness query parameter setter.
      Parameters:
      max_loudness - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_loudness

      public GetRecommendationsRequest.Builder target_loudness(Float target_loudness)
      Deprecated.
      The target_loudness query parameter setter.
      Parameters:
      target_loudness - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_mode

      public GetRecommendationsRequest.Builder min_mode(Integer min_mode)
      Deprecated.
      The min_mode query parameter setter.
      Parameters:
      min_mode - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_mode

      public GetRecommendationsRequest.Builder max_mode(Integer max_mode)
      Deprecated.
      The max_mode query parameter setter.
      Parameters:
      max_mode - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_mode

      public GetRecommendationsRequest.Builder target_mode(Integer target_mode)
      Deprecated.
      The target_mode query parameter setter.
      Parameters:
      target_mode - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_popularity

      public GetRecommendationsRequest.Builder min_popularity(Integer min_popularity)
      Deprecated.
      The min_popularity query parameter setter.
      Parameters:
      min_popularity - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_popularity

      public GetRecommendationsRequest.Builder max_popularity(Integer max_popularity)
      Deprecated.
      The max_popularity query parameter setter.
      Parameters:
      max_popularity - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_popularity

      public GetRecommendationsRequest.Builder target_popularity(Integer target_popularity)
      Deprecated.
      The target_popularity query parameter setter.
      Parameters:
      target_popularity - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_speechiness

      public GetRecommendationsRequest.Builder min_speechiness(Float min_speechiness)
      Deprecated.
      The min_speechiness query parameter setter.
      Parameters:
      min_speechiness - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_speechiness

      public GetRecommendationsRequest.Builder max_speechiness(Float max_speechiness)
      Deprecated.
      The max_speechiness query parameter setter.
      Parameters:
      max_speechiness - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_speechiness

      public GetRecommendationsRequest.Builder target_speechiness(Float target_speechiness)
      Deprecated.
      The target_speechiness query parameter setter.
      Parameters:
      target_speechiness - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_tempo

      public GetRecommendationsRequest.Builder min_tempo(Float min_tempo)
      Deprecated.
      The min_tempo query parameter setter.
      Parameters:
      min_tempo - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_tempo

      public GetRecommendationsRequest.Builder max_tempo(Float max_tempo)
      Deprecated.
      The max_tempo query parameter setter.
      Parameters:
      max_tempo - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_tempo

      public GetRecommendationsRequest.Builder target_tempo(Float target_tempo)
      Deprecated.
      The target_tempo query parameter setter.
      Parameters:
      target_tempo - Optional. Target tempo (BPM)
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_time_signature

      public GetRecommendationsRequest.Builder min_time_signature(Integer min_time_signature)
      Deprecated.
      The min_time_signature query parameter setter.
      Parameters:
      min_time_signature - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_time_signature

      public GetRecommendationsRequest.Builder max_time_signature(Integer max_time_signature)
      Deprecated.
      The max_time_signature query parameter setter.
      Parameters:
      max_time_signature - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_time_signature

      public GetRecommendationsRequest.Builder target_time_signature(Integer target_time_signature)
      Deprecated.
      The target_time_signature query parameter setter.
      Parameters:
      target_time_signature - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • min_valence

      public GetRecommendationsRequest.Builder min_valence(Float min_valence)
      Deprecated.
      The min_valence query parameter setter.
      Parameters:
      min_valence - Optional. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
      Returns:
      A GetRecommendationsRequest.Builder.
    • max_valence

      public GetRecommendationsRequest.Builder max_valence(Float max_valence)
      Deprecated.
      The max_valence query parameter setter.
      Parameters:
      max_valence - Optional. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
      Returns:
      A GetRecommendationsRequest.Builder.
    • target_valence

      public GetRecommendationsRequest.Builder target_valence(Float target_valence)
      Deprecated.
      The target_valence query parameter setter.
      Parameters:
      target_valence - Optional. For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
      Returns:
      A GetRecommendationsRequest.Builder.
    • build

      public GetRecommendationsRequest build()
      Deprecated.
      The request build method.
      Returns:
      A GetRecommendationsRequest.
    • self

      Deprecated.
      Description copied from class: AbstractRequest.Builder
      Return this instance to simulate a self-type.
      Specified by:
      self in class AbstractRequest.Builder<Recommendations, GetRecommendationsRequest.Builder>
      Returns:
      This instance.