Class AuthorizationCodeRequest.Builder
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest.Builder<AuthorizationCodeCredentials,AuthorizationCodeRequest.Builder>
se.michaelthelin.spotify.requests.authorization.AbstractAuthorizationRequest.Builder<AuthorizationCodeCredentials,AuthorizationCodeRequest.Builder>
se.michaelthelin.spotify.requests.authorization.authorization_code.AuthorizationCodeRequest.Builder
- All Implemented Interfaces:
IRequest.Builder<AuthorizationCodeCredentials,
AuthorizationCodeRequest.Builder>
- Enclosing class:
AuthorizationCodeRequest
public static final class AuthorizationCodeRequest.Builder
extends AbstractAuthorizationRequest.Builder<AuthorizationCodeCredentials,AuthorizationCodeRequest.Builder>
Builder class for building an
AuthorizationCodeRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The request build method.The authorization code setter.grant_type
(String grant_type) The grant type setter.redirect_uri
(URI redirect_uri) The redirect URI setter.protected AuthorizationCodeRequest.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
-
-
Method Details
-
grant_type
The grant type setter.- Parameters:
grant_type
- Required. As defined in the OAuth 2.0 specification, this field must contain the value"authorization_code"
- Returns:
- An
AuthorizationCodeRequest.Builder
.
-
code
The authorization code setter.- Parameters:
code
- Required. The authorization code returned from the initial request to the Account's /authorize endpoint.- Returns:
- An
AuthorizationCodeRequest.Builder
.
-
redirect_uri
The redirect URI setter.- Parameters:
redirect_uri
- Required. This parameter is used for validation only (there is no actual redirection). The value of this parameter must exactly match the value ofredirect_uri
supplied when requesting the authorization code.- Returns:
- An
AuthorizationCodeRequest.Builder
.
-
build
The request build method.- Returns:
- An
AuthorizationCodeRequest
.
-
self
Description copied from class:AbstractRequest.Builder
Return this instance to simulate a self-type.- Specified by:
self
in classAbstractRequest.Builder<AuthorizationCodeCredentials,
AuthorizationCodeRequest.Builder> - Returns:
- This instance.
-