Giter Site home page Giter Site logo

shopware-api-client's Introduction

๐Ÿ› Shopware API Client

npm version Build Status codecov XO code style license

Node.js module to interact with the Shopware REST API.

yarn add shopware-api-client

Examples

Examples how to use the package:

ES2015

import Shopware from 'shopware-api-client'

const shop = new Shopware({
    host: 'YOUR HOST',
    user: 'YOUR USER',
    apiKey: 'YOUR APIKEY'
})

let articles

try {
  articles = await shop.getArticles()
} catch (err) {
  console.log(error)
}

console.log(articles)

Older ES ๐Ÿ˜”

const Shopware = require('shopware-api-client')
const shop = new Shopware({
  host: 'YOUR HOST',
  user: 'YOUR USER',
  apiKey: 'YOUR APIKEY'
})

shop.getArticles()
  .then(articles => console.log(articles))
  .catch(err => console.log(err))

Docs

Find the docs here contributions welcome

Implemented API Resources

  • /api/addresses
  • /api/articles
  • /api/caches
  • /api/categories
  • /api/countries
  • /api/customerGroups
  • /api/customers
  • /api/generateArticleImages
  • /api/media
  • /api/manufacturers
  • /api/orders
  • /api/propertyGroups
  • /api/shops
  • /api/translations
  • /api/variants
  • /api/version

API Reference

  • Shopware
    • new Shopware([object])
    • .version([callback]) ๐Ÿ”€ Promise
    • .getArticles([callback]) ๐Ÿ”€ Promise
    • .getArticle(id, [callback]) ๐Ÿ”€ Promise
    • .deleteArticle(id, [callback]) ๐Ÿ”€ Promise
    • .deleteArticles(ids, [callback]) ๐Ÿ”€ Promise
    • .createArticle(article, [callback]) ๐Ÿ”€ Promise
    • .updateArticle(id, article, [callback]) ๐Ÿ”€ Promise
    • .updateArticles(articles, [callback]) ๐Ÿ”€ Promise
    • .getCategories([callback]) ๐Ÿ”€ Promise
    • .getCategory(id, [callback]) ๐Ÿ”€ Promise
    • .createCategory(category, [callback]) ๐Ÿ”€ Promise
    • .updateCategory(id, category, [callback]) ๐Ÿ”€ Promise
    • .deleteCategory(id, [callback]) ๐Ÿ”€ Promise
    • .getVariants([callback]) ๐Ÿ”€ Promise
    • .getVariants([callback]) ๐Ÿ”€ Promise
    • .getVariant(id, [callback]) ๐Ÿ”€ Promise
    • .updateVariant(id, body, [callback]) ๐Ÿ”€ Promise
    • .createVariant(body, [callback]) ๐Ÿ”€ Promise
    • .deleteVariant(id, [callback]) ๐Ÿ”€ Promise
    • .deleteVariants(ids, [callback]) ๐Ÿ”€ Promise
    • .generateArticleImages(articleId, [callback]) ๐Ÿ”€ Promise
    • .listMedia([callback]) ๐Ÿ”€ Promise
    • .getMedia(id, [callback]) ๐Ÿ”€ Promise
    • .updateMedia(id, body, [callback]) ๐Ÿ”€ Promise
    • .createMedia(body, [callback]) ๐Ÿ”€ Promise
    • .deleteMedia(id, [callback]) ๐Ÿ”€ Promise
    • .getOrders([callback]) ๐Ÿ”€ Promise
    • .getOrder(id, [callback]) ๐Ÿ”€ Promise
    • .updateOrder(id, body, [callback]) ๐Ÿ”€ Promise
    • .getAddresses([callback]) ๐Ÿ”€ Promise
    • .getAddress(id, [callback]) ๐Ÿ”€ Promise
    • .createAddress(body, [callback]) ๐Ÿ”€ Promise
    • .updateAddress(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteAddress(id, [callback]) ๐Ÿ”€ Promise
    • .getCustomers([callback]) ๐Ÿ”€ Promise
    • .getCustomer(id, [callback]) ๐Ÿ”€ Promise
    • .createCustomer(body, [callback]) ๐Ÿ”€ Promise
    • .updateCustomer(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteCustomer(id, [callback]) ๐Ÿ”€ Promise
    • .getCaches([callback]) ๐Ÿ”€ Promise
    • .getCache(id, [callback]) ๐Ÿ”€ Promise
    • .deleteCache(id, [callback]) ๐Ÿ”€ Promise
    • .deleteCaches([callback]) ๐Ÿ”€ Promise
    • .getCountries([callback]) ๐Ÿ”€ Promise
    • .getCountry(id, [callback]) ๐Ÿ”€ Promise
    • .updateCountry(id, body, [callback]) ๐Ÿ”€ Promise
    • .createCountry(body, [callback]) ๐Ÿ”€ Promise
    • .deleteCountry(id, [callback]) ๐Ÿ”€ Promise
    • .getCustomerGroups([callback]) ๐Ÿ”€ Promise
    • .getCustomerGroup(id, [callback]) ๐Ÿ”€ Promise
    • .createCustomerGroup(body, [callback]) ๐Ÿ”€ Promise
    • .updateCustomerGroup(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteCustomerGroup(id, [callback]) ๐Ÿ”€ Promise
    • .getManufacturers([callback]) ๐Ÿ”€ Promise
    • .getManufacturer(id, [callback]) ๐Ÿ”€ Promise
    • .createManufacturer(body, [callback]) ๐Ÿ”€ Promise
    • .updateManufacturer(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteManufacturer(id, [callback]) ๐Ÿ”€ Promise
    • .getPropertyGroups([callback]) ๐Ÿ”€ Promise
    • .getPropertyGroup(id, [callback]) ๐Ÿ”€ Promise
    • .createPropertyGroup(body, [callback]) ๐Ÿ”€ Promise
    • .updatePropertyGroup(id, body, [callback]) ๐Ÿ”€ Promise
    • .deletePropertyGroup(id, [callback]) ๐Ÿ”€ Promise
    • .getShops([callback]) ๐Ÿ”€ Promise
    • .getShop(id, [callback]) ๐Ÿ”€ Promise
    • .createShop(body, [callback]) ๐Ÿ”€ Promise
    • .updateShop(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteShop(id, [callback]) ๐Ÿ”€ Promise
    • .getTranslations([callback]) ๐Ÿ”€ Promise
    • .getTranslation(id, [callback]) ๐Ÿ”€ Promise
    • .createTranslation(id, body, [callback]) ๐Ÿ”€ Promise
    • .updateTranslation(id, body, [callback]) ๐Ÿ”€ Promise
    • .deleteTranslation(id, [callback]) ๐Ÿ”€ Promise

Contributing

  1. Fork it ( https://github.com/apertureless/shopware-api-client/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This software is distributed under MIT license.

shopware-api-client's People

Contributors

apertureless avatar greenkeeper[bot] avatar zwergal avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.