@ns8/magento2-rest-client
REST client for accessing Magento 2 functionality.
Last updated 7 months ago by crfroehlich .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ns8/magento2-rest-client 
SYNC missed versions from official npm registry.

Magento2 REST client

This Node.js library enables JavaScript applications to communicate with Magento2 sites using their REST API. This module based on magento2-rest-client, which is in turn based on the magento2-rest-client module created by Marko Novak (2016).

This module is used by the NS8 Protect Magento extension. It is safe for production use, but NOTE: the library is not finished yet! Only a subset of Magento2 API is currently implemented. Not all methods are fully documented, and not all return types are fully typed.

Installation

The library can be installed using the Npm package manager:

yarn add @ns8/magento2-rest-client

Usage

The code sample below shows the usage of the library:

import { RestClient } from '@ns8/magento2-rest-client';

const options = {
  url: 'http://www.test.com/index.php/rest',
  consumerKey: '<OAuth 1.0a consumer key>',
  consumerSecret: '<OAuth 1.0a consumer secret>',
  accessToken: '<OAuth 1.0a access token>',
  accessTokenSecret: '<OAuth 1.0a access token secret>'
};
const client = new RestClient(options);
client.categories.list().then( (categories) => {
  assert.equal(categories.parentId, 1);
});

TODO: Allow extending the API by adding your own modules or adding methods to the existing modules!

Contributing

Create issues or submit PRs to extend existing API support or add new functionality. All contributions are welcome.

usefull resources

Current Tags

  • 0.2.29                                ...           latest (7 months ago)

44 Versions

  • 0.2.29                                ...           7 months ago
  • 0.2.28                                ...           7 months ago
  • 0.2.27                                ...           7 months ago
  • 0.2.26                                ...           7 months ago
  • 0.2.25-dah                                ...           7 months ago
  • 0.2.25                                ...           7 months ago
  • 0.2.24                                ...           7 months ago
  • 0.2.23                                ...           7 months ago
  • 0.2.22                                ...           7 months ago
  • 0.2.21                                ...           7 months ago
  • 0.2.20                                ...           7 months ago
  • 0.2.19                                ...           7 months ago
  • 0.2.18                                ...           8 months ago
  • 0.2.17                                ...           8 months ago
  • 0.2.16                                ...           8 months ago
  • 0.2.15                                ...           8 months ago
  • 0.2.14                                ...           8 months ago
  • 0.2.13                                ...           8 months ago
  • 0.2.12                                ...           8 months ago
  • 0.2.11                                ...           8 months ago
  • 0.2.10                                ...           8 months ago
  • 0.2.9                                ...           8 months ago
  • 0.2.8                                ...           8 months ago
  • 0.2.7                                ...           8 months ago
  • 0.2.6                                ...           8 months ago
  • 0.2.5                                ...           8 months ago
  • 0.2.4                                ...           8 months ago
  • 0.2.3                                ...           8 months ago
  • 0.2.2                                ...           8 months ago
  • 0.2.1                                ...           8 months ago
  • 0.2.0                                ...           8 months ago
  • 0.1.9                                ...           8 months ago
  • 0.1.8                                ...           9 months ago
  • 0.1.7                                ...           9 months ago
  • 0.1.6                                ...           9 months ago
  • 0.1.5                                ...           9 months ago
  • 0.1.4                                ...           9 months ago
  • 0.1.3                                ...           9 months ago
  • 0.1.2                                ...           9 months ago
  • 0.1.1                                ...           9 months ago
  • 0.0.17                                ...           9 months ago
  • 0.0.16                                ...           9 months ago
  • 0.0.15                                ...           9 months ago
  • 0.0.14                                ...           9 months ago

Copyright 2014 - 2016 © taobao.org |