0.1.0 • Published 5 years ago

shopware-api-wrapper v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Shopware Api Wrapper

Shopware 6 promised based API wrapper for nodejs and browser.

Install

npm install shopware-api-wrapper

Usage

const Wrapper = require('shopware-api-wrapper');

const baseUrl = 'http://localhost';

const data = {
    client_id: "administration",
    grant_type: "password",
    scopes: "write",
    username: "admin",
    password: "shopware"
};

(async () => {
  const shopware = new Wrapper(
    baseUrl, {
      port: 8000
    },
    data);
  try {
    const categories = await shopware.getCategories();
    console.log(categories);
  } catch (e) {
    console.log(e);
  }
})();

API

Here you can fine the official Docs

  • getCategories(param)
  • getCategory(id)
  • createCategory(category)
  • updateCategory(category)
  • deleteCategory(id)
  • getProducts(param)
  • getProduct(id)