🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

shopware-api-client

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shopware-api-client

node client for shopware api

1.6.0
latest
Source
npm
Version published
Weekly downloads
51
4.08%
Maintainers
1
Weekly downloads
 
Created
Source

🛍 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
    • .getArticleByOrdernumber(ordernumber, [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
    • .getOrderByOrdernumber(ordernumber, [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
    • .updateTranslations(body, [callback]) 🔀 Promise
    • .deleteTranslation(id, [callback]) 🔀 Promise

Contributing

License

This software is distributed under MIT license.

Keywords

es6

FAQs

Package last updated on 18 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts