Class AuthorizationRedirectResponse<T>
java.lang.Object
de.sonallux.spotify.api.authorization.AuthorizationRedirectResponse<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AuthorizationRedirectResponse<T>static <T> AuthorizationRedirectResponse<T>booleanstatic <T> AuthorizationRedirectResponse<T>Parses the authorization response from the callback urlstatic <T> AuthorizationRedirectResponse<T>Parses the authorization response from the callback urlstatic <T> AuthorizationRedirectResponse<T>success(T body) static <T> AuthorizationRedirectResponse<T>
-
Constructor Details
-
AuthorizationRedirectResponse
public AuthorizationRedirectResponse()
-
-
Method Details
-
isSuccess
public boolean isSuccess() -
success
-
success
-
error
-
error
-
parse
public static <T> AuthorizationRedirectResponse<T> parse(String url, Function<okhttp3.HttpUrl, T> contentExtractor) Parses the authorization response from the callback url- Parameters:
url- the callback url- Returns:
- the authorization response
- Throws:
IllegalArgumentException- Ifuriis not a well-formed URI.
-
parse
public static <T> AuthorizationRedirectResponse<T> parse(okhttp3.HttpUrl httpUrl, Function<okhttp3.HttpUrl, T> contentExtractor) Parses the authorization response from the callback url- Parameters:
httpUrl- the callback url- Returns:
- the authorization response
- Throws:
IllegalArgumentException- Ifuriis not a well-formed URI.
-