Skip to content

Commit 8f8182b

Browse files
committed
Updated docs
1 parent 5ee85aa commit 8f8182b

File tree

2 files changed

+2
-99
lines changed

2 files changed

+2
-99
lines changed

DOCUMENTATION.md

-29
Original file line numberDiff line numberDiff line change
@@ -760,32 +760,3 @@ Find users and company who searched for an exact part number.
760760

761761
----
762762

763-
### `BrokerBinSOAP(auth)`
764-
BrokerBin API wrapper for Node.js
765-
766-
#### Params
767-
768-
- **Object** `auth`: An object containing the following data:
769-
- `username` (String): The BrokerBin username (or ENV variable: `BROKERBIN_USERNAME`)
770-
- `password` (String): The BrokerBin password (or ENV variable: `BROKERBIN_PASSWORD`)
771-
- `soap_key` (String): The BrokerBin soap key (or ENV variable: `BROKERBIN_SOAP_KEY`)
772-
- `soap_uri` (String): The BrokerBin soap uri (or ENV variable: `BROKERBIN_SOAP_URI`)
773-
- `public_key` (String): The BrokerBin public key (or ENV variable: `BROKERBIN_PUBLIC_KEY`)
774-
775-
#### Return
776-
- **BrokerBinSOAP** The `BrokerBinSOAP` instance.
777-
778-
### authenticate
779-
780-
Setup the API authentication.
781-
782-
#### Return
783-
- **Promise** Resolves with the UID.
784-
785-
### search
786-
787-
Runs a search request in BrokerBin.
788-
789-
#### Return
790-
- **Promise** Resolves with the results.
791-

README.md

+2-70
Original file line numberDiff line numberDiff line change
@@ -72,44 +72,7 @@ yarn add brokerbin
7272

7373

7474
```js
75-
const BrokerBinSOAP = require("brokerbin/lib/").SOAP;
76-
const BrokerBinREST = require("brokerbin").REST; // or simply require("../lib")
77-
78-
// SOAP Example
79-
(async () => {
80-
81-
// Initialize the BrokerBin
82-
const bbClient = new BrokerBinSOAP({
83-
username: process.env.BROKERBIN_USERNAME || "your username",
84-
password: process.env.BROKERBIN_PASSWORD || "your password",
85-
soap_key: process.env.BROKERBIN_SOAP_KEY || "your soap key",
86-
soap_uri: process.env.BROKERBIN_SOAP_URI || "your soap uri",
87-
public_key: process.env.BROKERBIN_PUBLIC_KEY || "public key"
88-
})
89-
90-
// Run a search
91-
const results = await bbClient.search("F238F", {
92-
max_resultset: 50
93-
, search_type: "partkey"
94-
, sort_order: "ASC"
95-
, sort_by: "price"
96-
})
97-
98-
// Output the result
99-
console.log(results)
100-
// =>
101-
// [ { company: '...',
102-
// country: 'GBR',
103-
// part: 'F238FNS',
104-
// mfg: 'DELL',
105-
// cond: 'REF',
106-
// price: '...',
107-
// qty: '4',
108-
// age: '0',
109-
// description: 'Dell 3.5" SAS Tray Caddy R710 R610 R410 T610 - No Screws',
110-
// clei: '',
111-
// status: '2' }, ... ]
112-
})();
75+
const BrokerBinREST = require("brokerbin");
11376

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

12588
console.log(result)
126-
})().catch(err => {
127-
debugger
128-
})
89+
})().catch(console.error)
12990
```
13091

13192

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

916877
----
917878

918-
### `BrokerBinSOAP(auth)`
919-
BrokerBin API wrapper for Node.js
920-
921-
#### Params
922-
923-
- **Object** `auth`: An object containing the following data:
924-
- `username` (String): The BrokerBin username (or ENV variable: `BROKERBIN_USERNAME`)
925-
- `password` (String): The BrokerBin password (or ENV variable: `BROKERBIN_PASSWORD`)
926-
- `soap_key` (String): The BrokerBin soap key (or ENV variable: `BROKERBIN_SOAP_KEY`)
927-
- `soap_uri` (String): The BrokerBin soap uri (or ENV variable: `BROKERBIN_SOAP_URI`)
928-
- `public_key` (String): The BrokerBin public key (or ENV variable: `BROKERBIN_PUBLIC_KEY`)
929-
930-
#### Return
931-
- **BrokerBinSOAP** The `BrokerBinSOAP` instance.
932-
933-
### authenticate
934-
935-
Setup the API authentication.
936-
937-
#### Return
938-
- **Promise** Resolves with the UID.
939-
940-
### search
941-
942-
Runs a search request in BrokerBin.
943-
944-
#### Return
945-
- **Promise** Resolves with the results.
946-
947879

948880

949881

0 commit comments

Comments
 (0)