brokerbin-soap
v3.0.0
Published
BrokerBin API wrapper for Node.js
Downloads
15
Maintainers
Readme
brokerbin-soap
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.
:cloud: Installation
# Using npm
npm install --save brokerbin-soap
# Using yarn
yarn add brokerbin-soap
:clipboard: Example
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' }, ... ]
})()
:question: Get Help
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. :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.