Class GetRecommendationsRequest
Get Recommendations request
Response
A set of recommendations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the request into an executable api calllimit(int limit) maxAcousticness(float maxAcousticness) maxDanceability(float maxDanceability) maxDurationMs(int maxDurationMs) maxEnergy(float maxEnergy) maxInstrumentalness(float maxInstrumentalness) maxKey(int maxKey) maxLiveness(float maxLiveness) maxLoudness(float maxLoudness) maxMode(int maxMode) maxPopularity(int maxPopularity) maxSpeechiness(float maxSpeechiness) maxTempo(float maxTempo) maxTimeSignature(int maxTimeSignature) maxValence(float maxValence) minAcousticness(float minAcousticness) minDanceability(float minDanceability) minDurationMs(int minDurationMs) minEnergy(float minEnergy) minInstrumentalness(float minInstrumentalness) minKey(int minKey) minLiveness(float minLiveness) minLoudness(float minLoudness) minMode(int minMode) minPopularity(int minPopularity) minSpeechiness(float minSpeechiness) minTempo(float minTempo) minTimeSignature(int minTimeSignature) minValence(float minValence) seedArtists(String seedArtists) seedGenres(String seedGenres) seedTracks(String seedTracks) targetAcousticness(float targetAcousticness) targetDanceability(float targetDanceability) targetDurationMs(int targetDurationMs) targetEnergy(float targetEnergy) targetInstrumentalness(float targetInstrumentalness) targetKey(int targetKey) targetLiveness(float targetLiveness) targetLoudness(float targetLoudness) targetMode(int targetMode) targetPopularity(int targetPopularity) targetSpeechiness(float targetSpeechiness) targetTempo(float targetTempo) targetTimeSignature(int targetTimeSignature) targetValence(float targetValence)
-
Constructor Details
-
GetRecommendationsRequest
Get Recommendations request- Parameters:
apiClient-The API client
-
-
Method Details
-
limit
- Parameters:
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.
- Returns:
- this request
-
market
- Parameters:
market-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:
- this request
-
seedArtists
- Parameters:
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_tracksandseed_genres.- Returns:
- this request
-
seedGenres
- Parameters:
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_tracksandseed_genres.- Returns:
- this request
-
seedTracks
- Parameters:
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_tracksandseed_genres.- Returns:
- this request
-
minAcousticness
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxAcousticness
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetAcousticness
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minDanceability
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxDanceability
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetDanceability
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minDurationMs
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxDurationMs
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetDurationMs
- Parameters:
targetDurationMs-Target duration of the track (ms)
- Returns:
- this request
-
minEnergy
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxEnergy
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetEnergy
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minInstrumentalness
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxInstrumentalness
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetInstrumentalness
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minKey
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxKey
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetKey
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minLiveness
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxLiveness
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetLiveness
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minLoudness
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxLoudness
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetLoudness
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minMode
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxMode
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetMode
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minPopularity
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxPopularity
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetPopularity
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minSpeechiness
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxSpeechiness
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetSpeechiness
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minTempo
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxTempo
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetTempo
- Parameters:
targetTempo-Target tempo (BPM)
- Returns:
- this request
-
minTimeSignature
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxTimeSignature
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetTimeSignature
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
minValence
- Parameters:
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=140would restrict results to only those tracks with a tempo of greater than 140 beats per minute.- Returns:
- this request
-
maxValence
- Parameters:
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.35would filter out most tracks that are likely to be instrumental.- Returns:
- this request
-
targetValence
- Parameters:
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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.- Returns:
- this request
-
build
Build the request into an executable api call- Returns:
- an executable api call
-