Class GetRecommendationsRequest.Builder
java.lang.Object
com.wrapper.spotify.requests.AbstractRequest.Builder<T,BT>
com.wrapper.spotify.requests.data.AbstractDataRequest.Builder<Recommendations,GetRecommendationsRequest.Builder>
com.wrapper.spotify.requests.data.browse.GetRecommendationsRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<Recommendations,GetRecommendationsRequest.Builder>
- Enclosing class:
- GetRecommendationsRequest
public static final class GetRecommendationsRequest.Builder extends AbstractDataRequest.Builder<Recommendations,GetRecommendationsRequest.Builder>
Builder class for building a
GetRecommendationsRequest.-
Constructor Summary
Constructors Constructor Description Builder(String accessToken)Create a newGetRecommendationsRequest.Builderinstance. -
Method Summary
Methods inherited from class com.wrapper.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
Constructor Details
-
Builder
Create a newGetRecommendationsRequest.Builderinstance.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
limit
The limit 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
The country code setter.- Parameters:
market- Optional. An ISO 3166-1 alpha-2 country code. 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.- Returns:
- A
GetRecommendationsRequest.Builder. - See Also:
- Wikipedia: ISO 3166-1 alpha-2 country codes
-
max_acousticness
The maximum acousticness setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_acousticness- A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_danceability
The maximum danceability setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_danceability- Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_duration_ms
The maximum duration setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_duration_ms- The duration of the track in milliseconds.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_energy
The maximum energy setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_energy- Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic seed_tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_instrumentalness
The maximum instrumentalness setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_instrumentalness- Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated as instrumental in this context. Rap or spoken word seed_tracks are clearly "vocal". The closer the instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content. Values above 0.5 are intended to represent instrumental seed_tracks, but confidence is higher as the value approaches 1.0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_key
The maximum key setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_key- The key the track is in. Integers map to pitches using standard Pitch Class notation. E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_liveness
The maximum liveness setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_liveness- Detects the presence of an audience in the recording. Higher liveness values represent an increased probability that the track was performed live. A value above 0.8 provides strong likelihood that the track is live.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_loudness
The maximum loudness setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_loudness- The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of seed_tracks. Loudness is the quality of a sound that is the primary psychological correlate of physical strength (amplitude). Values typical range between -60 and 0 db.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_mode
The maximum mode setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_mode- Mode indicates the modality (major or minor) of a track, the type of scale from which its melodic content is derived. Major is represented by 1 and minor is 0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_popularity
The maximum popularity setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_popularity- The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_speechiness
The maximum speechiness setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_speechiness- Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above 0.66 describe seed_tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 describe seed_tracks that may contain both music and speech, either in sections or layered, including such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like seed_tracks.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_tempo
The maximum tempo setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_tempo- The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_time_signature
The maximum time signature setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_time_signature- An estimated overall time signature of a track. The time signature (meter) is a notational convention to specify how many beats are in each bar (or measure).- Returns:
- A
GetRecommendationsRequest.Builder.
-
max_valence
The maximum valence setter. Tracks with the attribute value above the maximum value will be omitted.- Parameters:
max_valence- A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while seed_tracks with low valence sound more negative (e.g. sad, depressed, angry).- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_acousticness
The minimum acousticness setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_acousticness- A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_danceability
The minimum danceability setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_danceability- Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_duration_ms
The minimum duration setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_duration_ms- The duration of the track in milliseconds.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_energy
The minimum energy setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_energy- Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic seed_tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_instrumentalness
The minimum instrumentalness setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_instrumentalness- Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated as instrumental in this context. Rap or spoken word seed_tracks are clearly "vocal". The closer the instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content. Values above 0.5 are intended to represent instrumental seed_tracks, but confidence is higher as the value approaches 1.0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_key
The minimum key setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_key- The key the track is in. Integers map to pitches using standard Pitch Class notation. E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_liveness
The minimum liveness setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_liveness- Detects the presence of an audience in the recording. Higher liveness values represent an increased probability that the track was performed live. A value above 0.8 provides strong likelihood that the track is live.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_loudness
The minimum loudness setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_loudness- The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of seed_tracks. Loudness is the quality of a sound that is the primary psychological correlate of physical strength (amplitude). Values typical range between -60 and 0 db.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_mode
The minimum mode setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_mode- Mode indicates the modality (major or minor) of a track, the type of scale from which its melodic content is derived. Major is represented by 1 and minor is 0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_popularity
The minimum popularity setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_popularity- The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_speechiness
The minimum speechiness setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_speechiness- Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above 0.66 describe seed_tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 describe seed_tracks that may contain both music and speech, either in sections or layered, including such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like seed_tracks.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_tempo
The minimum tempo setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_tempo- The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_time_signature
The minimum time signature setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_time_signature- An estimated overall time signature of a track. The time signature (meter) is a notational convention to specify how many beats are in each bar (or measure).- Returns:
- A
GetRecommendationsRequest.Builder.
-
min_valence
The minimum valence setter. Tracks with the attribute value below the minimum value will be omitted.- Parameters:
min_valence- A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while seed_tracks with low valence sound more negative (e.g. sad, depressed, angry).- Returns:
- A
GetRecommendationsRequest.Builder.
-
seed_artists
The seed artists setter.- Parameters:
seed_artists- A comma separated list of Spotify IDs for seed seed_artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.- Returns:
- A
GetRecommendationsRequest.Builder. - See Also:
- Spotify URIs & IDs
-
seed_genres
The seed genres setter.- Parameters:
seed_genres- A comma separated list of any seed_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.- Returns:
- A
GetRecommendationsRequest.Builder. - See Also:
- Spotify URIs & IDs
-
seed_tracks
The seed tracks setter.- Parameters:
seed_tracks- 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.- Returns:
- A
GetRecommendationsRequest.Builder. - See Also:
- Spotify URIs & IDs
-
target_acousticness
The target acousticness setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_acousticness- A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_danceability
The target danceability setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_danceability- Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_duration_ms
The target duration setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_duration_ms- The duration of the track in milliseconds.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_energy
The target energy setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_energy- Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic seed_tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_instrumentalness
The target instrumentalness setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_instrumentalness- Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated as instrumental in this context. Rap or spoken word seed_tracks are clearly "vocal". The closer the instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content. Values above 0.5 are intended to represent instrumental seed_tracks, but confidence is higher as the value approaches 1.0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_key
The target key setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_key- The key the track is in. Integers map to pitches using standard Pitch Class notation. E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_liveness
The target liveness setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_liveness- Detects the presence of an audience in the recording. Higher liveness values represent an increased probability that the track was performed live. A value above 0.8 provides strong likelihood that the track is live.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_loudness
The target loudness setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_loudness- The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of seed_tracks. Loudness is the quality of a sound that is the primary psychological correlate of physical strength (amplitude). Values typical range between -60 and 0 db.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_mode
The target mode setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_mode- Mode indicates the modality (major or minor) of a track, the type of scale from which its melodic content is derived. Major is represented by 1 and minor is 0.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_popularity
The target popularity setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_popularity- The value will be between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_speechiness
The target speechiness setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_speechiness- Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above 0.66 describe seed_tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 describe seed_tracks that may contain both music and speech, either in sections or layered, including such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like seed_tracks.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_tempo
The target tempo setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_tempo- The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_time_signature
The target time signature setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_time_signature- An estimated overall time signature of a track. The time signature (meter) is a notational convention to specify how many beats are in each bar (or measure).- Returns:
- A
GetRecommendationsRequest.Builder.
-
target_valence
The target valence setter. Tracks with the attribute value nearest to the target value will be preferred. All target values will be weighed equally in ranking results.- Parameters:
target_valence- A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while seed_tracks with low valence sound more negative (e.g. sad, depressed, angry).- Returns:
- A
GetRecommendationsRequest.Builder.
-
build
The request build method.- Returns:
- A custom
GetRecommendationsRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<Recommendations,GetRecommendationsRequest.Builder>- Returns:
- This instance.
-