Package com.spotify.sdk.android.auth
Class AuthorizationResponse
- java.lang.Object
-
- com.spotify.sdk.android.auth.AuthorizationResponse
-
- All Implemented Interfaces:
android.os.Parcelable
public class AuthorizationResponse extends java.lang.Object implements android.os.Parcelable
An object that contains the parsed response from the Spotify authorization service. To create one useAuthorizationResponse.Builder
or parse fromUri
withfromUri(android.net.Uri)
- See Also:
- Web API Authorization guide
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AuthorizationResponse.Builder
Use this builder to create anAuthorizationResponse
static class
AuthorizationResponse.Type
The type of the authorization response.
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<AuthorizationResponse>
CREATOR
-
Constructor Summary
Constructors Constructor Description AuthorizationResponse(android.os.Parcel source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
static AuthorizationResponse
fromUri(android.net.Uri uri)
Parses the URI returned from the Spotify accounts service.java.lang.String
getAccessToken()
java.lang.String
getCode()
java.lang.String
getError()
int
getExpiresIn()
java.lang.String
getState()
AuthorizationResponse.Type
getType()
void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<AuthorizationResponse> CREATOR
-
-
Method Detail
-
fromUri
public static AuthorizationResponse fromUri(android.net.Uri uri)
Parses the URI returned from the Spotify accounts service.- Parameters:
uri
- URI- Returns:
- Authorization response. If parsing failed, this object will be populated with the given error codes.
-
getType
public AuthorizationResponse.Type getType()
-
getCode
public java.lang.String getCode()
-
getAccessToken
public java.lang.String getAccessToken()
-
getState
public java.lang.String getState()
-
getError
public java.lang.String getError()
-
getExpiresIn
public int getExpiresIn()
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
-