Class Discogs

java.lang.Object
com.amilesend.discogs.Discogs

public class Discogs extends Object
A helper class to vend API classes that are associated with a DiscogsConnection to the Discogs service.
See Also:
  • Constructor Details

    • Discogs

      public Discogs(@NonNull DiscogsConnection connection)
      Creates a new Discogs instance.
      Parameters:
      connection - The HTTP client connection.
  • Method Details

    • newUnauthenticatedInstance

      public static Discogs newUnauthenticatedInstance(String userAgent)
      Creates a new unauthenticated Discogs instance.
      Parameters:
      userAgent - the user agent for your application
      Returns:
      the Discogs instance
    • newKeySecretAuthenticatedInstance

      public static Discogs newKeySecretAuthenticatedInstance(String key, String secret, String userAgent)
      Creates a new user-provided key-secret authenticated Discogs instance.
      Parameters:
      key - the key
      secret - the secret
      userAgent - the user agent for your application
      Returns:
      the Discogs instance
    • newTokenAuthenticatedInstance

      public static Discogs newTokenAuthenticatedInstance(String token, String userAgent)
      Creates a new user-provided personal token based authenticated Discogs instance.
      Parameters:
      token - the personal access token
      userAgent - the user agent for your application
      Returns:
      the Discogs instance
    • newOAuthInstance

      public static Discogs newOAuthInstance(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort)
      Creates a new OAuth authenticated Discogs instance. This will initiate the OAuth flow to fetch the OAuth token for the user's behalf.
      Parameters:
      appKeySecret - the application key and secret
      userAgent - the user agent for your application
      oAuthReceiverPort - the port for listening on the OAuth redirect callback
      Returns:
      the Discogs instance
    • newOAuthInstance

      public static Discogs newOAuthInstance(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort, OAuthInfo oAuthToken)
      Creates a new OAuth authenticated Discogs instance. This will initiate the OAuth flow to fetch the OAuth token for the user's behalf.
      Parameters:
      appKeySecret - the application key and secret
      userAgent - the user agent for your application
      oAuthReceiverPort - the port for listening on the OAuth redirect callback
      oAuthToken - the existing user OAuth token
      Returns:
      the Discogs instance
    • getUserIdentityApi

      public UserIdentityApi getUserIdentityApi()
      Gets a new UserIdentityApi instance for the client connection.
      Returns:
      the user identity API interface implementation
      See Also:
    • getDatabaseApi

      public DatabaseApi getDatabaseApi()
      Gets a new DatabaseApi instance for the client connection.
      Returns:
      the database API interface implementation
      See Also:
    • getMarketplaceApi

      public MarketplaceApi getMarketplaceApi()
      Gets a new MarketplaceApi instance for the client connection.
      Returns:
      the marketplace API interface implementation
      See Also:
    • getUserCollectionApi

      public UserCollectionApi getUserCollectionApi()
      Gets a new UserCollectionApi instance for the client connection.
      Returns:
      the user collection API interface implementation
      See Also:
    • getUserWantListApi

      public UserWantListApi getUserWantListApi()
      Gets a new UserWantListApi instance for the client connection.
      Returns:
      the user want list API interface implementation
      See Also:
    • getUserListsApi

      public UserListsApi getUserListsApi()
      Gets a new UserListsApi instance for the client connection.
      Returns:
      the user lists API interface implementation
      See Also:
    • getInventoryExportApi

      public InventoryExportApi getInventoryExportApi()
      Gets a new InventoryExportApi instance for the client connection.
      Returns:
      the inventory export API interface implementation
      See Also:
    • getInventoryUploadApi

      public InventoryUploadApi getInventoryUploadApi()
      Gets a new InventoryUploadApi instance for the client connection.
      Returns:
      the inventory upload API interface implementation
      See Also:
    • getConnection

      @NonNull public @NonNull DiscogsConnection getConnection()
      The HTTP client connection.