Skip to content

Bloggify/brokerbin-soap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

brokerbin-soap

Version Downloads

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.

☁️ Installation

# Using npm
npm install --save brokerbin-soap

# Using yarn
yarn add brokerbin-soap

πŸ“‹ 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' }, ... ]
})()

❓ 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. πŸ›

πŸ“ 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.

πŸ˜‹ How to contribute

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

πŸ“œ License

MIT Β© Bloggify