Skip to content
forked from xbenjii/Prestan

PrestaShop Node.js API Library [UNMAINTAINED]

Notifications You must be signed in to change notification settings

AClavijo/Prestan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
});

About

PrestaShop Node.js API Library [UNMAINTAINED]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%