Class GetRecentlyPlayedTracksRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<PagingCursorbased<PlayHistory>, GetRecentlyPlayedTracksRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<PagingCursorbased<PlayHistory>, GetRecentlyPlayedTracksRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataPagingCursorbasedRequest.Builder<PlayHistory, Date, GetRecentlyPlayedTracksRequest.Builder>
se.michaelthelin.spotify.requests.data.player.GetRecentlyPlayedTracksRequest.Builder
- All Implemented Interfaces:
IPagingCursorbasedRequestBuilder<PlayHistory, Date, GetRecentlyPlayedTracksRequest.Builder>, IRequest.Builder<PagingCursorbased<PlayHistory>, GetRecentlyPlayedTracksRequest.Builder>
- Enclosing class:
GetRecentlyPlayedTracksRequest
public static final class GetRecentlyPlayedTracksRequest.Builder
extends AbstractDataPagingCursorbasedRequest.Builder<PlayHistory, Date, GetRecentlyPlayedTracksRequest.Builder>
Builder class for building a
GetRecentlyPlayedTracksRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe after date setter.The before date setter.build()The request build method.The limit setter.protected GetRecentlyPlayedTracksRequest.Builderself()Return this instance to simulate a self-type.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 newGetRecentlyPlayedTracksRequest.Builder.Your access token must have the
user-read-recently-playedscope authorized in order to read the user's recently played track.- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.- See Also:
-
-
Method Details
-
limit
The limit setter.- Parameters:
limit- Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.- Returns:
- A
GetRecentlyPlayedTracksRequest.Builder.
-
after
The after date setter.- Parameters:
after- Optional. ADateobject. Returns all items after (but not including) this cursor position. If this is specified,before(Date)must not be specified.- Returns:
- A
GetRecentlyPlayedTracksRequest.Builder.
-
before
The before date setter.- Parameters:
before- Optional. ADateobject. Returns all items before (but not including) this cursor position. If this is specified,after(Date)must not be specified.- Returns:
- A
GetRecentlyPlayedTracksRequest.Builder.
-
build
The request build method.- Returns:
- A custom
GetRecentlyPlayedTracksRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<PagingCursorbased<PlayHistory>, GetRecentlyPlayedTracksRequest.Builder>- Returns:
- This instance.
-