Class SearchAlbumsRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<Paging<AlbumSimplified>,SearchAlbumsRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<Paging<AlbumSimplified>,SearchAlbumsRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataPagingRequest.Builder<AlbumSimplified,SearchAlbumsRequest.Builder>
se.michaelthelin.spotify.requests.data.search.simplified.SearchAlbumsRequest.Builder
- All Implemented Interfaces:
IPagingRequestBuilder<AlbumSimplified,
,SearchAlbumsRequest.Builder> IRequest.Builder<Paging<AlbumSimplified>,
SearchAlbumsRequest.Builder>
- Enclosing class:
SearchAlbumsRequest
public static final class SearchAlbumsRequest.Builder
extends AbstractDataPagingRequest.Builder<AlbumSimplified,SearchAlbumsRequest.Builder>
Builder class for building a
SearchAlbumsRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The request build method.includeExternal
(String includeExternal) The include external setter.The limit setter.market
(com.neovisionaries.i18n.CountryCode market) The market country code setter.The offset setter.The search query setter.protected SearchAlbumsRequest.Builder
self()
Return this instance to simulate a self-type.Methods inherited from class se.michaelthelin.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.michaelthelin.spotify.requests.IRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
Constructor Details
-
Builder
Create a newSearchAlbumsRequest.Builder
.- Parameters:
accessToken
- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
q
The search query setter.- Parameters:
q
- Required. The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchAlbumsRequest.Builder
. - See Also:
-
market
The market country code setter.- Parameters:
market
- Optional. An ISO 3166-1 alpha-2 country code. If a country code is given, only artists, albums, and tracks with content playable in that market will be returned. (Playlist results are not affected by the market parameter.)- Returns:
- A
SearchAlbumsRequest.Builder
. - See Also:
-
limit
The limit setter.- Parameters:
limit
- Optional. The maximum number of results to return. Default: 20. Minimum: 1. Maximum: 50.- Returns:
- A
SearchAlbumsRequest.Builder
.
-
offset
The offset setter.- Parameters:
offset
- Optional. The index of the first result to return. Default: 0 (i.e., the first result). Maximum offset: 100.000. Use withlimit(Integer)
to get the next page of search results.- Returns:
- A
SearchAlbumsRequest.Builder
.
-
includeExternal
The include external setter.- Parameters:
includeExternal
- Optional. Possible values:audio
. Ifaudio
is set the response will include any relevant audio content that is hosted externally. By default external content is filtered out from responses.- Returns:
- A
SearchItemRequest.Builder
.
-
build
The request build method.- Returns:
- A
SearchAlbumsRequest.Builder
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<Paging<AlbumSimplified>,
SearchAlbumsRequest.Builder> - Returns:
- This instance.
-