Class GetRecommendationsRequest
- java.lang.Object
-
- de.sonallux.spotify.api.apis.browse.GetRecommendationsRequest
-
public class GetRecommendationsRequest extends Object
Get Recommendations requestResponse
On success, the HTTP status code in the response header is
200 OKand the response body contains a recommendations response object in JSON format.
-
-
Constructor Summary
Constructors Constructor Description GetRecommendationsRequest(ApiClient apiClient, String seedArtists, String seedGenres, String seedTracks)Get Recommendations request
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiCall<Recommendations>build()Build the request into an executable callGetRecommendationsRequestlimit(int limit)The target size of the list of recommended tracks.GetRecommendationsRequestmarket(String market)An ISO 3166-1 alpha-2 country code or the stringfrom_token.GetRecommendationsRequestmaxAcousticness(Number maxAcousticness)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxDanceability(Number maxDanceability)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxDurationMs(int maxDurationMs)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxEnergy(Number maxEnergy)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxInstrumentalness(Number maxInstrumentalness)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxKey(int maxKey)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxLiveness(Number maxLiveness)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxLoudness(Number maxLoudness)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxMode(int maxMode)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxPopularity(int maxPopularity)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxSpeechiness(Number maxSpeechiness)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxTempo(Number maxTempo)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxTimeSignature(int maxTimeSignature)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestmaxValence(Number maxValence)For each tunable track attribute, a hard ceiling on the selected track attribute's value can be provided.GetRecommendationsRequestminAcousticness(Number minAcousticness)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminDanceability(Number minDanceability)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminDurationMs(int minDurationMs)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminEnergy(Number minEnergy)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminInstrumentalness(Number minInstrumentalness)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminKey(int minKey)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminLiveness(Number minLiveness)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminLoudness(Number minLoudness)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminMode(int minMode)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminPopularity(int minPopularity)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminSpeechiness(Number minSpeechiness)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminTempo(Number minTempo)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminTimeSignature(int minTimeSignature)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequestminValence(Number minValence)For each tunable track attribute, a hard floor on the selected track attribute's value can be provided.GetRecommendationsRequesttargetAcousticness(Number targetAcousticness)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetDanceability(Number targetDanceability)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetDurationMs(int targetDurationMs)Target duration of the track (ms)GetRecommendationsRequesttargetEnergy(Number targetEnergy)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetInstrumentalness(Number targetInstrumentalness)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetKey(int targetKey)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetLiveness(Number targetLiveness)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetLoudness(Number targetLoudness)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetMode(int targetMode)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetPopularity(int targetPopularity)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetSpeechiness(Number targetSpeechiness)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetTempo(Number targetTempo)Target tempo (BPM)GetRecommendationsRequesttargetTimeSignature(int targetTimeSignature)For each of the tunable track attributes (below) a target value may be provided.GetRecommendationsRequesttargetValence(Number targetValence)For each of the tunable track attributes (below) a target value may be provided.
-
-
-
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_tracksandseed_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_tracksandseed_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_tracksandseed_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.
-
market
public GetRecommendationsRequest market(String market)
An ISO 3166-1 alpha-2 country code or the string
from_token. Provide this parameter if you want to apply Track Relinking. Becausemin_*,max_*andtarget_*are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via thelinked_fromattribute of the relinked track response.
-
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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_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=140would 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.35would filter out most tracks that are likely to be instrumental.
-
targetTempo
public GetRecommendationsRequest targetTempo(Number targetTempo)
Target tempo (BPM)
-
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=140would 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.35would 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.6andtarget_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=140would 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.35would 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.6andtarget_danceability=0.8. All target values will be weighed equally in ranking results.
-
build
public ApiCall<Recommendations> build()
Build the request into an executable call
-
-