ecomplus / apps-manager

JS lib to manage E-Com Plus store applications
GNU Affero General Public License v3.0
1 stars 1 forks source link
admin ecomplus ecomplus-apps marketplace

apps-manager

Publish CodeFactor npm version License AGPL

JS lib to manage E-Com Plus store applications

Changelog

Usage

The @ecomplus/apps-manager package can be used to work with E-Com Plus Market and Store API applications, with methods for apps search, install, edit and delete.

It's available for both Node.js and browser environments.

Example

import ecomAuth from '@ecomplus/auth'
import ecomApps from '@ecomplus/apps-manager'

ecomApps.listFromMarket()
  .then(availableApps => {
    console.log(availableApps)
  })
  .catch(console.error)

const listStoreApps = () => {
  ecomApps.list()
    .then(installedApps => {
      console.log(installedApps)
    })
    .catch(console.error)
}

if (ecomAuth.checkLogin()) {
  listStoreApps()
} else {
  ecomAuth.on('login', listStoreApps)
}