Package se.michaelthelin.spotify
Class SpotifyApi.Builder
java.lang.Object
se.michaelthelin.spotify.SpotifyApi.Builder
- Enclosing class:
SpotifyApi
Builder class for building
SpotifyApi
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aSpotifyApi
instance with the information given to the builder.setAccessToken
(String accessToken) The access token setter.setClientId
(String clientId) The client ID setter.setClientSecret
(String clientSecret) The client secret setter.The Spotify API host setter.setHttpManager
(IHttpManager httpManager) The HttpManager setter.The Spotify API port setter.setProxyPassword
(Integer proxyPassword) The proxy password setter.setProxyPort
(Integer proxyPort) The proxy port setter.setProxyUrl
(String proxyUrl) The proxy URL setter.setProxyUsername
(Integer proxyUsername) The proxy username setter.setRedirectUri
(URI redirectUri) The redirect URI setter.setRefreshToken
(String refreshToken) The refresh token setter.The scheme setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setHttpManager
The HttpManager setter.- Parameters:
httpManager
- A Spotify HttpManager.- Returns:
- A
SpotifyApi.Builder
.
-
setScheme
The scheme setter.- Parameters:
scheme
- A HTTP-scheme.- Returns:
- A
SpotifyApi.Builder
.
-
setHost
The Spotify API host setter.- Parameters:
host
- A Spotify API host.- Returns:
- A
SpotifyApi.Builder
.
-
setPort
The Spotify API port setter.- Parameters:
port
- A Spotify API port.- Returns:
- A
SpotifyApi.Builder
.
-
setProxyUrl
The proxy URL setter.- Parameters:
proxyUrl
- A proxy URL.- Returns:
- A
SpotifyApi.Builder
.
-
setProxyPort
The proxy port setter.- Parameters:
proxyPort
- A proxy port.- Returns:
- A
SpotifyApi.Builder
.
-
setProxyUsername
The proxy username setter.- Parameters:
proxyUsername
- A proxy username.- Returns:
- A
SpotifyApi.Builder
.
-
setProxyPassword
The proxy password setter.- Parameters:
proxyPassword
- A proxy password.- Returns:
- A
SpotifyApi.Builder
.
-
setClientId
The client ID setter.- Parameters:
clientId
- A client ID of your application.- Returns:
- A
SpotifyApi.Builder
.
-
setClientSecret
The client secret setter.- Parameters:
clientSecret
- A client secret of your application.- Returns:
- A
SpotifyApi.Builder
.
-
setRedirectUri
The redirect URI setter.- Parameters:
redirectUri
- A redirect URI of your application.- Returns:
- A
SpotifyApi.Builder
.
-
setAccessToken
The access token setter.- Parameters:
accessToken
- A Spotify API access token.- Returns:
- A
SpotifyApi.Builder
.
-
setRefreshToken
The refresh token setter.- Parameters:
refreshToken
- A Spotify API refresh token.- Returns:
- A
SpotifyApi.Builder
.
-
build
Build aSpotifyApi
instance with the information given to the builder.- Returns:
- A
SpotifyApi
instance.
-