Socket
Socket
Sign inDemoInstall

@ecomplus/client

Package Overview
Dependencies
11
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ecomplus/client

JS client for E-Com Plus REST APIs


Version published
Maintainers
1
Install size
5.01 MB
Created

Readme

Source

E-Com Plus Client

Publish CodeFactor npm version License MIT

JS client for E-Com Plus REST APIs

CHANGELOG

Usage

TL;DR: We have methods to run requests for almost all E-Com Plus APIs, but you're probably searching for Store API.

The @ecomplus/client package provides a list of methods, each one is a function to request a specific E-Com Plus REST API, using axios HTTP client and returning a Promise.

It's available for both Node.js and browser environments.

Store API request example

import { store } from '@ecomplus/client'

const authenticationId = 'myAuthenticationId'
const accessToken = 'myAccessToken'

ecomClient.store({
  url: '/products.json',
  authenticationId,
  accessToken,
  method: 'post',
  data: { sku: '123', name: 'Sample Prduct 123' }
})
  .then(({ data, status }) => console.log(status, data))
  .catch(error => console.error(error))

Dependencies

It requires and may not include core-js, axios and @ecomplus/utils.

Node.js
npm i --save @ecomplus/utils @ecomplus/client
Webpack
npm i --save core-js @ecomplus/utils @ecomplus/client
CDN
<script src="https://cdn.jsdelivr.net/npm/@ecomplus/client/dist/ecom-client.polyfill.min.js"></script>

axios and ecomUtils libraries must be included separately and available on window scope.

Development

Fork/clone this repository and install dependencies normally:

git clone https://github.com/ecomplus/client
cd client
npm i

Then you can edit source files and test locally with npm run serve.

Contributing

Please read the contribution guidelines.

Deploy

Take a look on package.json scripts:

  • npm run doc - Update jsdoc/docdash generated documentation;
  • npm run release - Generate changelog and new version;

Keywords

FAQs

Last updated on 22 Mar 2024

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc