Class AuthorizationCodeCredentials.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
AuthorizationCodeCredentials
Builder class for building
AuthorizationCodeCredentials
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAccessToken
(String accessToken) The access token setter.setExpiresIn
(Integer expiresIn) The expiration time setter.setRefreshToken
(String refreshToken) The refresh token setter.The scopes setter.setTokenType
(String tokenType) The access token type setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAccessToken
The access token setter.- Parameters:
accessToken
- An access token that can be provided in subsequent calls, for example to Spotify Web API services.- Returns:
- An
AuthorizationCodeCredentials.Builder
.
-
setTokenType
The access token type setter.- Parameters:
tokenType
- How the access token may be used: always "Bearer".- Returns:
- An
AuthorizationCodeCredentials.Builder
.
-
setScope
The scopes setter.- Parameters:
scope
- The scopes specified in the credentials request.- Returns:
- An
AuthorizationCodeCredentials.Builder
.
-
setExpiresIn
The expiration time setter.- Parameters:
expiresIn
- The time period (in seconds) for which the access token is valid.- Returns:
- An
AuthorizationCodeCredentials.Builder
.
-
setRefreshToken
The refresh token setter.- Parameters:
refreshToken
- A token that can be sent to the Spotify Accounts service in place of an authorization code.- Returns:
- An
AuthorizationCodeCredentials.Builder
.
-
build
Description copied from interface:IModelObject.Builder
Build a model object with the information set in the builder object.
The type of the model object and its methods depend on its corresponding implementation.- Returns:
- A model object.
-