Last active
August 29, 2015 14:04
-
-
Save thomasfr/70ecc8a42229de7e2ef4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node magento-test.js