Installations
npm install bolcom
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=12
Node Version
18.1.0
NPM Version
8.11.0
Score
70.5
Supply Chain
98.3
Quality
75.6
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
4,852
Last Day
3
Last Week
13
Last Month
51
Last Year
242
GitHub Statistics
5 Stars
255 Commits
2 Forks
4 Watching
2 Branches
4 Contributors
Bundle Size
7.73 kB
Minified
2.80 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.1.3
Package Id
bolcom@2.1.3
Unpacked Size
13.82 kB
Size
3.82 kB
File Count
4
NPM Version
8.11.0
Node Version
18.1.0
Total Downloads
Cumulative downloads
Total Downloads
4,852
Last day
-70%
3
Compared to previous day
Last week
-18.8%
13
Compared to previous week
Last month
363.6%
51
Compared to previous month
Last year
-49.6%
242
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
bolcom
Access the Bol.com Partner Open API with Node.js (unofficial)
Usage
1const BolAPI = require ('bolcom'); 2const bol = new BolAPI ({ 3 apikey: 'abc123', 4}); 5 6bol.catalogSearch ({ 7 q: 'node.js', 8}) 9 .then (data => { 10 for (let p in data.products) { 11 product = data.products[p]; 12 console.log (`${product.title} - € ${product.offerData.offers[0].price}`); 13 } 14 }) 15 .catch (err => { 16 console.log ('Search failed'); 17 console.log (err); 18 }) 19;
Requirements
Installation
npm install bolcom
Methods
Error handling is not included in the following examples. See the Usage section above for an example with proper error handling.
ping
( )
Simple API access test. The result data
should be an object with only one
property named message
with the exact value Hello world!!
.
1bol.ping().then (data => { 2 if (data.Message === 'Hello World!') { 3 console.log ('pong'); 4 } 5 else { 6 console.log ('ouch'); 7 } 8});
catalogSearch
({ ... })
Search products in the catalog.
The result data
is modified to remove a few xml-style annoyances.
param | type | description |
---|---|---|
... | object | search paramaters |
1bol.catalogSearch ({ 2 q: 'node.js', 3}) 4 .then (data => { 5 for (let i in data.products) { 6 let product = data.products[p]; 7 console.log (`${product.title} - ${product.summary}`); 8 } 9 }) 10;
catalogLists
({ [...] })
Product lists, based on list type and category.
param | type | description |
---|---|---|
[...] | object | Arguments, see API documentation |
1bol.catalogLists() 2 .then (data => data.products) 3 .then (data => data.filter (itm => itm.rating >= 40)) 4 .then (data => data.forEach (itm => { 5 console.log (`${itm.rating} - ${itm.title}`); 6 })) 7;
catalogProducts
({ productId, [...] })
Get details information for one or more products.
param | type | description |
---|---|---|
productId | string | Product ID |
[...] | object | Arguments, see API documentation |
1bol.catalogProducts ({ 2 productId: '9200000023292527', 3 includeattributes: true, 4}) 5 .then (data => { 6 for (let p in data.products) { 7 let product = data.products[p]; 8 console.log (`${product.title} - € ${product.offerData.offers[0].price}`); 9 } 10 }) 11;
catalogRecommendations
({ productId, [...] })
Get recommended products for a given product.
param | type | description |
---|---|---|
productId | string | Product ID |
[...] | object | Arguments, see API documentation |
1bol.catalogRecommendations ({ 2 productId: '9200000023292527', 3}) 4 .then (data => { 5 for (let i in data) { 6 let product = data[i]; 7 console.log (`${product.title} - ${product.rating}`); 8 } 9 }) 10;
catalogRelatedproducts
({ productId, [...] })
Get related products for a given product.
param | type | description |
---|---|---|
productId | string | Product ID |
[...] | object | Arguments, see API documentation |
1bol.catalogRelatedProducts ({ 2 productId: '9200000010839998', 3}) 4 .then (console.log) 5;
Errors
message | description |
---|---|
missing apikey | Credentials are not set |
Unlicense
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to https://unlicense.org/
Author
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: The Unlicense: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/fvdm/.github/SECURITY.md:1
- Info: Found linked content: github.com/fvdm/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/fvdm/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/fvdm/.github/SECURITY.md:1
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 0 commits out of 5 are checked with a SAST tool
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/codeql-analysis.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/codeql-analysis.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/codeql-analysis.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/node.js.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/node.js.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node.js.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/node.js.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node.js.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/fvdm/nodejs-bolcom/node.js.yml/develop?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:35
- Info: 0 out of 5 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
5
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More