Class GetRecommendationsRequest


  • public class GetRecommendationsRequest
    extends Object
    Get Recommendations request

    Response

    On success, the HTTP status code in the response header is 200 OK and the response body contains a recommendations response object in JSON format.

    • Constructor Detail

      • GetRecommendationsRequest

        public GetRecommendationsRequest​(ApiClient apiClient,
                                         String seedArtists,
                                         String seedGenres,
                                         String seedTracks)

        Get Recommendations request

        Parameters:
        apiClient -

        The API client

        seedArtists -

        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.

        seedGenres -

        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.

        seedTracks -

        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.

    • Method Detail

      • limit

        public GetRecommendationsRequest limit​(int limit)

        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.

      • minAcousticness

        public GetRecommendationsRequest minAcousticness​(Number minAcousticness)

        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.

      • maxAcousticness

        public GetRecommendationsRequest maxAcousticness​(Number maxAcousticness)

        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.

      • targetAcousticness

        public GetRecommendationsRequest targetAcousticness​(Number targetAcousticness)

        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.

      • minDanceability

        public GetRecommendationsRequest minDanceability​(Number minDanceability)

        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.

      • maxDanceability

        public GetRecommendationsRequest maxDanceability​(Number maxDanceability)

        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.

      • targetDanceability

        public GetRecommendationsRequest targetDanceability​(Number targetDanceability)

        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.

      • minDurationMs

        public GetRecommendationsRequest minDurationMs​(int minDurationMs)

        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.

      • maxDurationMs

        public GetRecommendationsRequest maxDurationMs​(int maxDurationMs)

        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.

      • targetDurationMs

        public GetRecommendationsRequest targetDurationMs​(int targetDurationMs)

        Target duration of the track (ms)

      • minEnergy

        public GetRecommendationsRequest minEnergy​(Number minEnergy)

        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.

      • maxEnergy

        public GetRecommendationsRequest maxEnergy​(Number maxEnergy)

        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.

      • targetEnergy

        public GetRecommendationsRequest targetEnergy​(Number targetEnergy)

        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.

      • minInstrumentalness

        public GetRecommendationsRequest minInstrumentalness​(Number minInstrumentalness)

        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.

      • maxInstrumentalness

        public GetRecommendationsRequest maxInstrumentalness​(Number maxInstrumentalness)

        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.

      • targetInstrumentalness

        public GetRecommendationsRequest targetInstrumentalness​(Number targetInstrumentalness)

        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.

      • minKey

        public GetRecommendationsRequest minKey​(int minKey)

        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.

      • maxKey

        public GetRecommendationsRequest maxKey​(int maxKey)

        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.

      • targetKey

        public GetRecommendationsRequest targetKey​(int targetKey)

        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.

      • minLiveness

        public GetRecommendationsRequest minLiveness​(Number minLiveness)

        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.

      • maxLiveness

        public GetRecommendationsRequest maxLiveness​(Number maxLiveness)

        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.

      • targetLiveness

        public GetRecommendationsRequest targetLiveness​(Number targetLiveness)

        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.

      • minLoudness

        public GetRecommendationsRequest minLoudness​(Number minLoudness)

        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.

      • maxLoudness

        public GetRecommendationsRequest maxLoudness​(Number maxLoudness)

        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.

      • targetLoudness

        public GetRecommendationsRequest targetLoudness​(Number targetLoudness)

        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.

      • minMode

        public GetRecommendationsRequest minMode​(int minMode)

        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.

      • maxMode

        public GetRecommendationsRequest maxMode​(int maxMode)

        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.

      • targetMode

        public GetRecommendationsRequest targetMode​(int targetMode)

        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.

      • minPopularity

        public GetRecommendationsRequest minPopularity​(int minPopularity)

        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.

      • maxPopularity

        public GetRecommendationsRequest maxPopularity​(int maxPopularity)

        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.

      • targetPopularity

        public GetRecommendationsRequest targetPopularity​(int targetPopularity)

        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.

      • minSpeechiness

        public GetRecommendationsRequest minSpeechiness​(Number minSpeechiness)

        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.

      • maxSpeechiness

        public GetRecommendationsRequest maxSpeechiness​(Number maxSpeechiness)

        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.

      • targetSpeechiness

        public GetRecommendationsRequest targetSpeechiness​(Number targetSpeechiness)

        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.

      • minTempo

        public GetRecommendationsRequest minTempo​(Number minTempo)

        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.

      • maxTempo

        public GetRecommendationsRequest maxTempo​(Number maxTempo)

        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.

      • minTimeSignature

        public GetRecommendationsRequest minTimeSignature​(int minTimeSignature)

        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.

      • maxTimeSignature

        public GetRecommendationsRequest maxTimeSignature​(int maxTimeSignature)

        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.

      • targetTimeSignature

        public GetRecommendationsRequest targetTimeSignature​(int targetTimeSignature)

        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.

      • minValence

        public GetRecommendationsRequest minValence​(Number minValence)

        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.

      • maxValence

        public GetRecommendationsRequest maxValence​(Number maxValence)

        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.

      • targetValence

        public GetRecommendationsRequest targetValence​(Number targetValence)

        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.