Class: CatalogConfig

CatalogConfig()

Catalog API Configuration with base64-encoded key storage Matches the metals API key pattern in js/api.js

Constructor

new CatalogConfig()

Source:

Methods

canMakePcgsRequest() → {boolean}

Check if a PCGS API request can be made (under daily rate limit)

Source:
Returns:
Type
boolean

clearNumistaKey()

Clear stored Numista key

Source:

clearPcgsToken()

Clear stored PCGS token

Source:

getNumistaConfig()

Get current Numista configuration

Source:

getNumistaUsage() → {Object}

Get current Numista usage stats

Source:
Returns:
Type
Object

getPcgsConfig() → {Object}

Get current PCGS configuration

Source:
Returns:
Type
Object

getPcgsUsage() → {Object}

Get current PCGS usage stats

Source:
Returns:
Type
Object

hasNumistaKey()

Check if user has stored a key

Source:

incrementNumistaUsage()

Increment Numista usage counter, auto-resetting if month changed

Source:

incrementPcgsUsage()

Increment PCGS usage counter, auto-resetting if date changed (daily limit)

Source:

isNumistaEnabled()

Check if Numista is configured with a valid key

Source:

isPcgsEnabled() → {boolean}

Check if PCGS is configured with a valid token

Source:
Returns:
Type
boolean

setNumistaConfig(apiKey, quota)

Set Numista API key

Parameters:
Name Type Default Description
apiKey string

Plain text API key

quota number 2000

API quota (default 2000)

Source:

setPcgsConfig(token)

Set PCGS bearer token

Parameters:
Name Type Description
token string

Bearer token from PCGS

Source: