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 enumDefines the supported authorization types. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscogsAuthInfoDeserializes the givenauthInfoJsonstring to a newAuthInfoobject.getType()Gets theAuthInfotype.default StringtoJson()Serializes thisAuthInfoto a JSON formatted string.
-
Field Details
-
DEFINED
- See Also:
-
-
Method Details
-
fromJson
Deserializes the givenauthInfoJsonstring to a newAuthInfoobject.- Parameters:
authInfoJson- the JSON-formatted auth info- Returns:
- the new
AuthInfoobject - Throws:
com.google.gson.JsonSyntaxException- if there is an error while deserializing the JSON string
-
toJson
Serializes thisAuthInfoto a JSON formatted string.- Returns:
- the JSON formatted
AuthInfo
-
getType
-