Socket
Socket
Sign inDemoInstall

prestan

Package Overview
Dependencies
60
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prestan

A node module which consumes the PrestaShop API


Version published
Weekly downloads
32
increased by966.67%
Maintainers
1
Install size
5.37 MB
Created
Weekly downloads
 

Readme

Source

Prestan

A node module to interact and consume the PrestaShop shop API.

Example


var Prestan = require('prestan'),
    options = {debug: true},
    prestan = new Prestan('http://myPrestaShopSiteUrl.com', 'MYAPIKEY000000', options);

prestan.get('orders').then(function(response) {
    console.log(response);
}).catch(function(errors) {
    console.log(errors);
});

//Or

prestan.get('orders', {id: 1}).then(function(response) {
    console.log(response);
}).catch(function(errors) {
    console.log(errors);
});

//And you can even use the filter querystrings

prestan.get('orders', {
    'display': 'full',
    'filter[id]': 1
}).then(function(response) {
    console.log(response);
}).catch(function(errors) {
    console.log(errors);
});

//You can add/edit too.

prestan.get('products', {
    id: 1
}).then(function(response) {
    response.prestashop.product.price = '1.99';
    return prestan.edit('products', response, {
        id: 1
    });
}).catch(function(errors) {
    console.log(errors);
});

Keywords

FAQs

Last updated on 27 Aug 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc