fusetools.commerce_tools.Discogs

class fusetools.commerce_tools.Discogs[source]

Bases: object

Discogs’ API infrastructure.

../_images/discogs1.png

Methods

api_request

Function to perform generic Discogs API requests.

get_authentication_token

Creates a JSON authentication token to use for API calls.

classmethod api_request(key, secret, token_path, request_type, inventory_bytes=False, search_cat=False, search_string=False)[source]

Function to perform generic Discogs API requests.

Parameters
  • key – Discogs API key.

  • secret – Discogs API secret.

  • token_path – Authenticated API token.

  • request_type – API request type.

  • inventory_bytes – Encoded bytes array for inventory to list.

  • search_cat – Search category.

  • search_string – Search string.

Returns

API JSON response.

classmethod get_authentication_token(usr, pwd, sav_dir, chromedriver_path, key, secret)[source]

Creates a JSON authentication token to use for API calls.

Parameters
  • usr – Discogs username.

  • pwd – Discogs password.

  • sav_dir – Local filepath to save auth token.

  • chromedriver_path – Path to Chromedriver instance for Selenium.

  • key – Discogs API key.

  • secret – Discogs API secret.

Returns

JSON authentication token.