Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Oct 13, 2024
1 parent 5ee85aa commit 8f8182b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 99 deletions.
29 changes: 0 additions & 29 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -760,32 +760,3 @@ Find users and company who searched for an exact part number.

----

### `BrokerBinSOAP(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
- **BrokerBinSOAP** The `BrokerBinSOAP` instance.

### authenticate

Setup the API authentication.

#### Return
- **Promise** Resolves with the UID.

### search

Runs a search request in BrokerBin.

#### Return
- **Promise** Resolves with the results.

72 changes: 2 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,44 +72,7 @@ yarn add brokerbin


```js
const BrokerBinSOAP = require("brokerbin/lib/").SOAP;
const BrokerBinREST = require("brokerbin").REST; // or simply require("../lib")

// SOAP Example
(async () => {

// Initialize the BrokerBin
const bbClient = new BrokerBinSOAP({
username: process.env.BROKERBIN_USERNAME || "your username",
password: process.env.BROKERBIN_PASSWORD || "your password",
soap_key: process.env.BROKERBIN_SOAP_KEY || "your soap key",
soap_uri: process.env.BROKERBIN_SOAP_URI || "your soap uri",
public_key: process.env.BROKERBIN_PUBLIC_KEY || "public key"
})

// 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' }, ... ]
})();
const BrokerBinREST = require("brokerbin");

// REST Example
(async () => {
Expand All @@ -123,9 +86,7 @@ const BrokerBinREST = require("brokerbin").REST; // or simply require("../lib")
});

console.log(result)
})().catch(err => {
debugger
})
})().catch(console.error)
```


Expand Down Expand Up @@ -915,35 +876,6 @@ Find users and company who searched for an exact part number.

----

### `BrokerBinSOAP(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
- **BrokerBinSOAP** The `BrokerBinSOAP` instance.

### authenticate

Setup the API authentication.

#### Return
- **Promise** Resolves with the UID.

### search

Runs a search request in BrokerBin.

#### Return
- **Promise** Resolves with the results.




Expand Down

0 comments on commit 8f8182b

Please sign in to comment.