Class GetListOfCategoriesRequest.Builder
java.lang.Object
com.wrapper.spotify.requests.AbstractRequest.Builder<T,BT>
com.wrapper.spotify.requests.data.AbstractDataRequest.Builder<Paging<T>,BT>
com.wrapper.spotify.requests.data.AbstractDataPagingRequest.Builder<Category,GetListOfCategoriesRequest.Builder>
com.wrapper.spotify.requests.data.browse.GetListOfCategoriesRequest.Builder
- All Implemented Interfaces:
IPagingRequestBuilder<Category,GetListOfCategoriesRequest.Builder>,IRequest.Builder<Paging<Category>,GetListOfCategoriesRequest.Builder>
- Enclosing class:
- GetListOfCategoriesRequest
public static final class GetListOfCategoriesRequest.Builder extends AbstractDataPagingRequest.Builder<Category,GetListOfCategoriesRequest.Builder>
Builder class for building a
GetListOfCategoriesRequest.-
Constructor Summary
Constructors Constructor Description Builder(String accessToken)Create a newGetListOfCategoriesRequest.Builderinstance. -
Method Summary
Modifier and Type Method Description GetListOfCategoriesRequestbuild()The request build method.GetListOfCategoriesRequest.Buildercountry(com.neovisionaries.i18n.CountryCode country)The country code setter.GetListOfCategoriesRequest.Builderlimit(Integer limit)The limit setter.GetListOfCategoriesRequest.Builderlocale(String locale)The language code setter.GetListOfCategoriesRequest.Builderoffset(Integer offset)The offset setter.protected GetListOfCategoriesRequest.Builderself()Return this instance to simulate a self-type.Methods inherited from class com.wrapper.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.wrapper.spotify.requests.IRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
Constructor Details
-
Builder
Create a newGetListOfCategoriesRequest.Builderinstance.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
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
GetListOfCategoriesRequest.Builder - See Also:
- Wikipedia: ISO 3166-1 alpha-2 country codes
-
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
GetListOfCategoriesRequest.Builder - See Also:
- Wikipedia: ISO 3166-1 alpha-2 country codes, Wikipedia: ISO 639 language code
-
limit
The limit setter.- Parameters:
limit- Optional. The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.- Returns:
- A
GetListOfCategoriesRequest.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 categories.- Returns:
- A
GetListOfCategoriesRequest.Builder.
-
build
The request build method.- Returns:
- A custom
GetListOfCategoriesRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<Paging<Category>,GetListOfCategoriesRequest.Builder>- Returns:
- This instance.
-