Class GetPlaylistItemsRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<Paging<PlaylistTrack>, GetPlaylistItemsRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<Paging<PlaylistTrack>, GetPlaylistItemsRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataPagingRequest.Builder<PlaylistTrack, GetPlaylistItemsRequest.Builder>
se.michaelthelin.spotify.requests.data.playlists.GetPlaylistItemsRequest.Builder
- All Implemented Interfaces:
IPagingRequestBuilder<PlaylistTrack, GetPlaylistItemsRequest.Builder>, IRequest.Builder<Paging<PlaylistTrack>, GetPlaylistItemsRequest.Builder>
- Enclosing class:
GetPlaylistItemsRequest
public static final class GetPlaylistItemsRequest.Builder
extends AbstractDataPagingRequest.Builder<PlaylistTrack, GetPlaylistItemsRequest.Builder>
Builder class for building a
GetPlaylistItemsRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalTypes(String additionalTypes) The additional types setter.build()The request build method.The fields filter setter.The limit setter.market(CountryCode market) The market country code setter.The offset setter.playlist_id(String playlist_id) The playlist ID setter.protected GetPlaylistItemsRequest.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 newGetPlaylistItemsRequest.Builder.Both Public and Private playlists belonging to any user are retrievable on provision of a valid access token.
- Parameters:
accessToken- Required. A valid access token from the Spotify Accounts service.
-
-
Method Details
-
playlist_id
The playlist ID setter.- Parameters:
playlist_id- The Spotify ID for the playlist.- Returns:
- A
GetPlaylistItemsRequest.Builder. - See Also:
-
fields
The fields filter setter.- Parameters:
fields- Optional. Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.- Returns:
- A
GetPlaylistItemsRequest.Builder. - See Also:
-
limit
The limit setter.- Parameters:
limit- Optional. The maximum number of items to return. Default: 50. Minimum: 1. Maximum: 50.- Returns:
- A
GetPlaylistItemsRequest.Builder.
-
offset
The offset setter.- Parameters:
offset- Optional. The index of the first item to return. Default: 0 (the first object).- Returns:
- A
GetPlaylistItemsRequest.Builder.
-
market
The market country code setter.- Parameters:
market- Optional. An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.- Returns:
- A
GetPlaylistItemsRequest.Builder. - See Also:
-
additionalTypes
The additional types setter.- Parameters:
additionalTypes- Optional. A comma-separated list of item types that your client supports besides the default track type. Valid types are:trackandepisode. An unsupported type in the response is expected to be represented asnullvalue in theitemfield.- Returns:
- A
GetPlaylistItemsRequest.Builder.
-
build
The request build method.- Returns:
- A custom
GetPlaylistItemsRequest.
-
self
Description copied from class:AbstractRequest.BuilderReturn this instance to simulate a self-type.- Specified by:
selfin classAbstractRequest.Builder<Paging<PlaylistTrack>, GetPlaylistItemsRequest.Builder>- Returns:
- This instance.
-