Skip to content
adp21 edited this page Nov 25, 2021 · 17 revisions

IMPORTANT - FOR NOW YOU ARE ONLY ALLOWED 1 CONNECTION PER MERCHANT KEY CONNECTING MULTIPLE TIMES/FROM MULTIPLE PLACES AT THE SAME TIME WILL CAUSE ISSUES (i.e. on a dev/prod server)

@skincrib/skincrib-merchant is used to interact with the Skincrib merchant API.

Note: All methods of @skincrib/skincrib-merchant are promised-based. Async/await is supported.

Flow of a user selling an item on skincrib.

Seller flow

Constructor

Before interacting with anything on the api, you must first initiate an instance of @skincrib/skincrib-merchant. Example:

const Skincrib = require('@skincrib/skincrib-merchant');
const market = new Skincrib({
    key: 'KEY HERE',
    reconnect: true,
    memory: true
});

Properties

key

  • Type: String

The key property is the auto-generated Skincrib merchant api-key you received. @skincrib/skincrib-merchant will store this key in memory so that it is only necessary to provide it once.

reconnect

  • Type: Boolean

The reconnect property is set to true by default. If set to false, the module will not auto-reconnect and authenticate to the websocket server if disconnected.

memory

  • Type: Boolean

The memory property is set to true by default. If set to false, the module will not store listings and market statistics in memory.