1.3.1 • Published 4 years ago

open-icecat v1.3.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Open Icecat Logo

Install

Install with npm:

$ npm i open-icecat

Declaration & Methods

class OpenIcecat {
    constructor(baseParams: {});
    getProduct(options: GetProductOptions);
    getProductReviews(options: GetProductOptions);
    getProductRelatedProducts(options: GetProductOptions);
}

Usage

1. Setup

import { OpenIcecat } from 'open-icecat';

const oc = new OpenIcecat({
    username: 'your-username',
    lang: 'en'
});

2. Get a Product by Brand & Product Code

(async () => {
    const res = await oc.getProduct({ Brand: 'hp', ProductCode: 'RJ459AV' });
    console.log(res);
})();

3. Get a Product by GTIN/EAN/UPC/JAN

(async () => {
    const res = await oc.getProduct({ GTIN: '0882780751682' });
    console.log(res);
})();

4. Get a Product by icecat_id

(async () => {
    const res = await oc.getProduct({ icecat_id: 1198270 });
    console.log(res);
})();

5. Change the language for a single request

(async () => {
    const res = await oc.getProduct({ lang: 'en', Brand: 'hp', ProductCode: 'RJ459AV' });
    console.log(res);
})();

License

Copyright © 2020, Tjark Kuehl Released under the MIT License.

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago