Class Discogs
java.lang.Object
com.amilesend.discogs.Discogs
A helper class to vend API classes that are associated with a
DiscogsConnection to the Discogs service.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiscogs(@NonNull DiscogsConnection connection) Creates a newDiscogsinstance. -
Method Summary
Modifier and TypeMethodDescription@NonNull DiscogsConnectionThe HTTP client connection.Gets a newDatabaseApiinstance for the client connection.Gets a newInventoryExportApiinstance for the client connection.Gets a newInventoryUploadApiinstance for the client connection.Gets a newMarketplaceApiinstance for the client connection.Gets a newUserCollectionApiinstance for the client connection.Gets a newUserIdentityApiinstance for the client connection.Gets a newUserListsApiinstance for the client connection.Gets a newUserWantListApiinstance for the client connection.static DiscogsnewKeySecretAuthenticatedInstance(String key, String secret, String userAgent) Creates a new user-provided key-secret authenticatedDiscogsinstance.static DiscogsnewOAuthInstance(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort) Creates a new OAuth authenticatedDiscogsinstance.static DiscogsnewOAuthInstance(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort, OAuthInfo oAuthToken) Creates a new OAuth authenticatedDiscogsinstance.static DiscogsnewTokenAuthenticatedInstance(String token, String userAgent) Creates a new user-provided personal token based authenticatedDiscogsinstance.static DiscogsnewUnauthenticatedInstance(String userAgent) Creates a new unauthenticatedDiscogsinstance.
-
Constructor Details
-
Discogs
Creates a newDiscogsinstance.- Parameters:
connection- The HTTP client connection.
-
-
Method Details
-
newUnauthenticatedInstance
-
newKeySecretAuthenticatedInstance
-
newTokenAuthenticatedInstance
-
newOAuthInstance
public static Discogs newOAuthInstance(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort) Creates a new OAuth authenticatedDiscogsinstance. This will initiate the OAuth flow to fetch the OAuth token for the user's behalf.- Parameters:
appKeySecret- the application key and secretuserAgent- the user agent for your applicationoAuthReceiverPort- 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 authenticatedDiscogsinstance. This will initiate the OAuth flow to fetch the OAuth token for the user's behalf.- Parameters:
appKeySecret- the application key and secretuserAgent- the user agent for your applicationoAuthReceiverPort- the port for listening on the OAuth redirect callbackoAuthToken- the existing user OAuth token- Returns:
- the Discogs instance
-
getUserIdentityApi
Gets a newUserIdentityApiinstance for the client connection.- Returns:
- the user identity API interface implementation
- See Also:
-
getDatabaseApi
Gets a newDatabaseApiinstance for the client connection.- Returns:
- the database API interface implementation
- See Also:
-
getMarketplaceApi
Gets a newMarketplaceApiinstance for the client connection.- Returns:
- the marketplace API interface implementation
- See Also:
-
getUserCollectionApi
Gets a newUserCollectionApiinstance for the client connection.- Returns:
- the user collection API interface implementation
- See Also:
-
getUserWantListApi
Gets a newUserWantListApiinstance for the client connection.- Returns:
- the user want list API interface implementation
- See Also:
-
getUserListsApi
Gets a newUserListsApiinstance for the client connection.- Returns:
- the user lists API interface implementation
- See Also:
-
getInventoryExportApi
Gets a newInventoryExportApiinstance for the client connection.- Returns:
- the inventory export API interface implementation
- See Also:
-
getInventoryUploadApi
Gets a newInventoryUploadApiinstance for the client connection.- Returns:
- the inventory upload API interface implementation
- See Also:
-
getConnection
The HTTP client connection.
-