Class: CatalogAPI

CatalogAPI()

Main Catalog API Manager Coordinates multiple providers with fallback chain

Constructor

new CatalogAPI()

Source:

Methods

(async) getMarketValue(catalogId) → {Promise.<number>}

Get market value with fallback

Parameters:
Name Type Description
catalogId string

Catalog identifier

Source:
Returns:

Current market value in USD

Type
Promise.<number>

getProviderStatus() → {Object}

Get provider status information

Source:
Returns:

Status of all providers

Type
Object

initializeProviders()

Initialize available providers based on API keys

Source:

loadSettings()

Load API settings from localStorage

Source:

(async) lookupItem(catalogId, optionsopt) → {Promise.<Object>}

Lookup item with fallback chain

Parameters:
Name Type Attributes Default Description
catalogId string

Catalog identifier

options Object <optional>
{}

Options (e.g. { action: 'test' })

Source:
Returns:

Standardized item data

Type
Promise.<Object>

saveSettings()

Save API settings to localStorage

Source:

(async) searchItems(query, filters) → {Promise.<Array>}

Search items with active provider

Parameters:
Name Type Description
query string

Search term

filters Object

Search filters

Source:
Returns:

Array of standardized item data

Type
Promise.<Array>

setApiKey(provider, apiKey)

Set API key for a provider

Parameters:
Name Type Description
provider string

Provider name ('numista')

apiKey string

API key

Source:

switchProvider(providerName)

Switch active provider

Parameters:
Name Type Description
providerName string

Provider name to switch to

Source: