BrokerBin API wrapper for Node.js
This module is using the SOAP interface from BrokerBin APIs. For the REST interface, please refer to Bloggify/BrokerBin.
# Using npm
npm install --save brokerbin-soap
# Using yarn
yarn add brokerbin-soap
const BrokerBin = require("brokerbin-soap");
(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' }, ... ]
})()
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. π
BrokerBin API wrapper for Node.js
- 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
)
- Number Return description.
Setup the API authentication.
- Promise Resolves with the UID.
Runs a search request in BrokerBin.
- Promise Resolves with the results.
Have an idea? Found a bug? See how to contribute.