0.1.0 • Published 7 years ago
shopware-api-wrapper v0.1.0
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)
0.1.0
7 years ago