Socket
Book a DemoInstallSign in
Socket

carrefour-web-api-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carrefour-web-api-client

Very simple Carrefour WEB API client written in TypeScript.

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Carrefour WEB API client

Description

Very simple Carrefour WEB API client written in TypeScript. Currently, this client can:

  • Return info about the product (Polish dataset) via barcode (EAN) or product name.

Installation

npm i carrefour-web-api-client # or yarn add carrefour-web-api-client

Usage

Get info about product 5900972012597:

import { CarrefourWebApiClient } from 'carrefour-web-api-client';

const carrefourWebApiClient = new CarrefourWebApiClient();

carrefourWebApiClient.getProductInfoByBarcode('5900972012597').then((products: any) => {
  if (products === null) {
    console.log(">> Can't find this product.");
  } else {
    const {
      name,
      defaultCategoryName,
      actualSku: {
        amount: { actualGrossPriceString },
      },
    } = products[0];

    console.log(`>> Found "${name}" of category "${defaultCategoryName}"! Actual price: ${actualGrossPriceString}`);
  }
});

To run this example install package, copy and paste above example into file named app.js and then run:

node --require ts-node/register --require source-map-support/register app.ts

Support

Please report any bugs here.

Roadmap

Currently, this project does all that I need, so I think that new features won't be added.

Contributing

Feel free to fork this project and made some changes, any upgrades will be much appreciated.

Authors

  • Oskar Jaskólski

License

MIT

Project status

This project is written to be as simple as it can be. It was created for me just for getting info about products. But who knows, maybe in future it will do more, but currently it will be as it is.

Keywords

Carrefour

FAQs

Package last updated on 19 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.