magento2-swagger

0.0.8 • Public • Published

Magento 2 REST API client automatically generated from Swagger specification

Magento 2 implements Swagger providing a JSON Schema of the REST endpoints, this package compiles the JSON into classes and methods using templates (see inside the templates/ directory) for consuming the API in a NodeJS applicaton.

Installation

npm install magento2-swagger --save

Example usage

A full specification of all the endpoints in this packages can be found in the Magento 2 Dev Docs

var magentoSwagger = require('magento2-swagger').Magento;
 
var magento = new magentoSwagger('http://www.example.com/rest');
 
magento.catalogCategoryManagementV1GetTreeGet().done(function (response) {
  console.log(response.body);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.8
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.8
    1
  • 0.0.7
    0
  • 0.0.6
    1
  • 0.0.5
    0

Package Sidebar

Install

npm i magento2-swagger

Weekly Downloads

2

Version

0.0.8

License

MIT

Last publish

Collaborators

  • adamj88