1.1.4 • Published 1 year ago

brokerbin v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

brokerbin

Version Downloads

BrokerBin API wrapper for Node.js

:cloud: Installation

# Using npm
npm install --save brokerbin

# Using yarn
yarn add brokerbin

:clipboard: Example

const BrokerBin = require("brokerbin");

(async () => {

    // Initialize the BrokerBin
    const bbClient = new BrokerBin()

    // Run a search
    const results = await bbClient.search("F238F", {
        max_resultset: 50
      , search_type: "partkey"
      , sort_order: "ASC"
      , sort_by: "price"
    })

    // Output the result
    console.log(results)
    // =>
    // [ { company: '...',
    //     country: 'GBR',
    //     part: 'F238FNS',
    //     mfg: 'DELL',
    //     cond: 'REF',
    //     price: '...',
    //     qty: '4',
    //     age: '0',
    //     description: 'Dell 3.5" SAS Tray Caddy R710 R610 R410 T610 - No Screws',
    //     clei: '',
    //     status: '2' }, ... ]
})()

:question: Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. :bug:

:memo: Documentation

brokerbin(auth)

BrokerBin API wrapper for Node.js

Params

  • Object auth: An object containing the following data:
    • username (String): The BrokerBin username (or ENV variable: BROKERBIN_USERNAME)
    • password (String): The BrokerBin password (or ENV variable: BROKERBIN_PASSWORD)
    • soap_key (String): The BrokerBin soap key (or ENV variable: BROKERBIN_SOAP_KEY)
    • soap_uri (String): The BrokerBin soap uri (or ENV variable: BROKERBIN_SOAP_URI)
    • public_key (String): The BrokerBin public key (or ENV variable: BROKERBIN_PUBLIC_KEY)

Return

  • Number Return description.

authenticate

Setup the API authentication.

Return

  • Promise Resolves with the UID.

search

Runs a search request in BrokerBin.

Return

  • Promise Resolves with the results.

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

:scroll: License

MIT © Bloggify