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 Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Defines the supported authorization types.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(String authInfoJson)
    Deserializes the given authInfoJson string to a new AuthInfo object.
    Gets the AuthInfo type.
    default String
    Serializes this AuthInfo to a JSON formatted string.
  • Field Details

  • Method Details

    • fromJson

      static DiscogsAuthInfo fromJson(String authInfoJson)
      Deserializes the given authInfoJson string to a new AuthInfo 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

      default String toJson()
      Serializes this AuthInfo to a JSON formatted string.
      Returns:
      the JSON formatted AuthInfo
    • getType

      Gets the AuthInfo type.
      Returns:
      the type
      See Also: