Class GetFeaturedPlaylistsRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<FeaturedPlaylists, GetFeaturedPlaylistsRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<FeaturedPlaylists, GetFeaturedPlaylistsRequest.Builder>
se.michaelthelin.spotify.requests.data.playlists.GetFeaturedPlaylistsRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<FeaturedPlaylists, GetFeaturedPlaylistsRequest.Builder>
- Enclosing class:
GetFeaturedPlaylistsRequest
public static final class GetFeaturedPlaylistsRequest.Builder
extends AbstractDataRequest.Builder<FeaturedPlaylists, GetFeaturedPlaylistsRequest.Builder>
Builder class for building a
GetFeaturedPlaylistsRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()The request build method.country(CountryCode country) The country code setter.The limit setter.The language code setter.The offset setter.protected GetFeaturedPlaylistsRequest.Builderself()Return this instance to simulate a self-type.The timestamp setter.Methods inherited from class AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemeModifier and TypeMethodDescriptionsetBody(org.apache.hc.core5.http.HttpEntity httpEntity) Set the body for the request.setBodyParameter(String name, X value) Set a body parameter for the request.setContentType(org.apache.hc.core5.http.ContentType contentType) Set the content type for the request.setDefaults(IHttpManager httpManager, String scheme, String host, Integer port) Set default values for the request.Set a header for the request.Set the host for the request.setHttpManager(IHttpManager httpManager) Set the HTTP manager for the request.Set the path for the request.setPathParameter(String name, String value) Set a path parameter for the request.Set the port for the request.setQueryParameter(String name, X value) Set a query parameter for the request.Set the scheme for the request.
-
Constructor Details
-
Builder
Create a newGetFeaturedPlaylistsRequest.Builderinstance.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
locale
The language code setter.- Parameters:
locale- Optional. The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category metadata returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English). The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For examplecountry=SE&locale=de_DEwill return a list of categories relevant to Sweden but as German language strings.- Returns:
- A
GetFeaturedPlaylistsRequest.Builder. - See Also:
-
country
The country code setter.- Parameters:
country- Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country. If omitted, the returned items will be globally relevant.- Returns:
- A
GetFeaturedPlaylistsRequest.Builder. - See Also:
-
timestamp
The timestamp setter.- Parameters:
timestamp- Optional. A timestamp in ISO 8601 format. Use this parameter to specify the user's local time to get results tailored for that specific date and time in the day. If not provided, the response defaults to the current UTC time.- Returns:
- A
GetFeaturedPlaylistsRequest.Builder. - See Also:
-
limit
The limit setter.- Parameters:
limit- Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.- Returns:
- A
GetFeaturedPlaylistsRequest.Builder.
-
offset
The offset setter.- Parameters:
offset- Optional. The index of the first item to return. Default: 0 (the first object). Use withlimit(Integer)to get the next set of items.- Returns:
- A
GetFeaturedPlaylistsRequest.Builder.
-
build
The request build method.- Returns:
- A custom
GetFeaturedPlaylistsRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<FeaturedPlaylists, GetFeaturedPlaylistsRequest.Builder>- Returns:
- This instance.
-