Skip to content

Instantly share code, notes, and snippets.

@thomasfr
Last active August 29, 2015 14:04
Show Gist options
  • Save thomasfr/70ecc8a42229de7e2ef4 to your computer and use it in GitHub Desktop.
Save thomasfr/70ecc8a42229de7e2ef4 to your computer and use it in GitHub Desktop.
var MagentoAPI = require('magento');
var util = require('util');
var magento = new MagentoAPI({
host: 'wunderl.sernji.com',
port: 80,
path: '/api/xmlrpc/',
login: 'user',
pass: 'password'
});
magento.login(function(err, sessId) {
console.log(arguments);
if (err) {
// deal with error
return;
}
magento.catalogProduct.list(function(error, result) {
console.log(util.inspect(result,{depth:5,colors:true}));
});
});
@thomasfr
Copy link
Author

node magento-test.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment