Class FollowPlaylistRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<String,FollowPlaylistRequest.Builder>
se.michaelthelin.spotify.requests.data.AbstractDataRequest.Builder<String,FollowPlaylistRequest.Builder>
se.michaelthelin.spotify.requests.data.follow.FollowPlaylistRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<String,
FollowPlaylistRequest.Builder>
- Enclosing class:
FollowPlaylistRequest
public static final class FollowPlaylistRequest.Builder
extends AbstractDataRequest.Builder<String,FollowPlaylistRequest.Builder>
Builder class for building a
FollowPlaylistRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The request build method.playlist_id
(String playlist_id) The playlist ID setter.The public following state setter.protected FollowPlaylistRequest.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
-
Constructor Details
-
Builder
Create a newFollowPlaylistRequest
instance.Following a playlist publicly requires authorization of the
playlist-modify-public
scope; following it privately requires theplaylist-modify-private
scope.- Parameters:
accessToken
- Required. A valid access token from the Spotify Accounts service.- See Also:
-
-
Method Details
-
playlist_id
The playlist ID setter.- Parameters:
playlist_id
- The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.- Returns:
- A
FollowPlaylistRequest.Builder
. - See Also:
-
public_
The public following state setter.- Parameters:
public_
- Optional, defaulttrue
. Iftrue
the playlist will be included in user's public playlists, iffalse
it will remain private. To be able to follow playlists privately, the user must have granted theplaylist-modify-private
scope.- Returns:
- A
FollowPlaylistRequest.Builder
.
-
build
The request build method.- Returns:
- A custom
FollowPlaylistRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<String,
FollowPlaylistRequest.Builder> - Returns:
- This instance.
-