Interface DiscogsAuthInfo
- All Superinterfaces:
com.amilesend.client.connection.auth.AuthInfo
- All Known Implementing Classes:
KeySecretAuthInfo, OAuthInfo, TokenAuthInfo
public interface DiscogsAuthInfo
extends com.amilesend.client.connection.auth.AuthInfo
Defines the base interface for Discogs authorization information.
Per the
Discogs API documentation, the following table outlines the authorization types:
Type | Rate Limit Tier | Image URLs | Auth as User |
---|---|---|---|
DiscogsAuthInfo.Type.NO_AUTH_LIMITED |
Low | N | N |
DiscogsAuthInfo.Type.KEY_SECRET |
High | Y | N |
DiscogsAuthInfo.Type.OAUTH_1_0_A |
High | Y | Y |
DiscogsAuthInfo.Type.TOKEN |
High | Y | Y |
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Defines the supported authorization types. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscogsAuthInfo
Deserializes the givenauthInfoJson
string to a newAuthInfo
object.getType()
Gets theAuthInfo
type.default String
toJson()
Serializes thisAuthInfo
to a JSON formatted string.
-
Field Details
-
DEFINED
- See Also:
-
-
Method Details
-
fromJson
Deserializes the givenauthInfoJson
string to a newAuthInfo
object.- Parameters:
authInfoJson
- the JSON-formatted auth info- Returns:
- the new
AuthInfo
object - Throws:
com.google.gson.JsonSyntaxException
- if there is an error while deserializing the JSON string
-
toJson
Serializes thisAuthInfo
to a JSON formatted string.- Returns:
- the JSON formatted
AuthInfo
-
getType
-