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 newDiscogs
instance. -
Method Summary
Modifier and TypeMethodDescription@NonNull DiscogsConnection
The HTTP client connection.Gets a newDatabaseApi
instance for the client connection.Gets a newInventoryExportApi
instance for the client connection.Gets a newInventoryUploadApi
instance for the client connection.Gets a newMarketplaceApi
instance for the client connection.Gets a newUserCollectionApi
instance for the client connection.Gets a newUserIdentityApi
instance for the client connection.Gets a newUserListsApi
instance for the client connection.Gets a newUserWantListApi
instance for the client connection.static Discogs
newKeySecretAuthenticatedInstance
(String key, String secret, String userAgent) Creates a new user-provided key-secret authenticatedDiscogs
instance.static Discogs
newOAuthInstance
(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort) Creates a new OAuth authenticatedDiscogs
instance.static Discogs
newOAuthInstance
(KeySecretAuthInfo appKeySecret, String userAgent, int oAuthReceiverPort, OAuthInfo oAuthToken) Creates a new OAuth authenticatedDiscogs
instance.static Discogs
newTokenAuthenticatedInstance
(String token, String userAgent) Creates a new user-provided personal token based authenticatedDiscogs
instance.static Discogs
newUnauthenticatedInstance
(String userAgent) Creates a new unauthenticatedDiscogs
instance.
-
Constructor Details
-
Discogs
Creates a newDiscogs
instance.- 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 authenticatedDiscogs
instance. 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 authenticatedDiscogs
instance. 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 newUserIdentityApi
instance for the client connection.- Returns:
- the user identity API interface implementation
- See Also:
-
getDatabaseApi
Gets a newDatabaseApi
instance for the client connection.- Returns:
- the database API interface implementation
- See Also:
-
getMarketplaceApi
Gets a newMarketplaceApi
instance for the client connection.- Returns:
- the marketplace API interface implementation
- See Also:
-
getUserCollectionApi
Gets a newUserCollectionApi
instance for the client connection.- Returns:
- the user collection API interface implementation
- See Also:
-
getUserWantListApi
Gets a newUserWantListApi
instance for the client connection.- Returns:
- the user want list API interface implementation
- See Also:
-
getUserListsApi
Gets a newUserListsApi
instance for the client connection.- Returns:
- the user lists API interface implementation
- See Also:
-
getInventoryExportApi
Gets a newInventoryExportApi
instance for the client connection.- Returns:
- the inventory export API interface implementation
- See Also:
-
getInventoryUploadApi
Gets a newInventoryUploadApi
instance for the client connection.- Returns:
- the inventory upload API interface implementation
- See Also:
-
getConnection
The HTTP client connection.
-