@ecomplus/client

2.4.0 • Public • Published

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;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.4.0205latest

Version History

VersionDownloads (Last 7 Days)Published
2.4.0205
2.3.16
2.2.117
2.2.00
2.1.41
2.1.30
2.1.20
2.1.10
2.1.00
2.0.40
2.0.32
2.0.20
2.0.11
2.0.00
1.1.32
1.1.21
1.1.10
1.1.00
1.0.30
1.0.20
1.0.10
1.0.00
0.8.00
0.7.10
0.7.00
0.6.00
0.5.10
0.5.00
0.4.30
0.4.20
0.4.10
0.4.00
0.3.00
0.2.10
0.2.00
0.0.11

Package Sidebar

Install

npm i @ecomplus/client

Weekly Downloads

236

Version

2.4.0

License

MIT

Unpacked Size

1.87 MB

Total Files

38

Last publish

Collaborators

  • leomp12