# shopware-api-wrapper

> Shopware 6 promised based API wrapper for nodejs and browser.

Latest version **0.1.0** (published 2019-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install shopware-api-wrapper
pnpm add shopware-api-wrapper
yarn add shopware-api-wrapper
bun add shopware-api-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-05-26 |
| First published | 2019-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jan-Markus Langer |
| Maintainers | janmarkuslanger |

## Links

- npm: https://www.npmjs.com/package/shopware-api-wrapper
- npm.io page: https://npm.io/package/shopware-api-wrapper

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.18.0

## Recent versions

- 0.1.0 (latest) — 2019-05-26

## README

# Shopware Api Wrapper

Shopware 6 promised based API wrapper for nodejs and browser.

# Install

`npm install shopware-api-wrapper`

# Usage

``` javascript
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 <a href="https://docs.shopware.com/en/shopware-platform-dev-en/api">Docs</a>

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

---
_Source: https://npm.io/package/shopware-api-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
