diff --git a/package.json b/package.json index f4ebf39..1625519 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,14 @@ { "name": "magento", - "author": "Tim Marshall ", + "author": "Stephen Keep ", "description": "Magento SOAP API wrapper for Node.js", - "version": "0.0.5", + "version": "0.0.6", "main": "./src/magento", "contributors": [ + { + "name": "Stephen Keep", + "email": "stephenkeep@gmail.com" + }, { "name": "Tim Marshall", "email": "timothyjmarshall@gmail.com" @@ -14,15 +18,15 @@ "node": ">=0.10.20" }, "dependencies" : { - "request": "2.34.0", - "xmlrpc": "1.2.0" - }, +- "request": "2.34.0", +- "xmlrpc": "1.2.0" +- }, "keywords": [ "magento", "soap", "api", "xml" ], - "repository": "git://github.com/MadisonReed/magentoapi", + "repository": "git://github.com/stephenkeep/magentoapi", "license": "MIT" } diff --git a/src/magento.js b/src/magento.js index 1d3938b..6c3ba08 100644 --- a/src/magento.js +++ b/src/magento.js @@ -48,7 +48,8 @@ var configDefaults = { path: mandatory, login: mandatory, pass: mandatory, - parallelLimit: Infinity + parallelLimit: Infinity, + secure: false }; /** @@ -77,7 +78,13 @@ function Magento(config) { } this.config = magentoConfig; - this.client = xmlrpc.createClient(this.config); + + if (this.config.secure === true) { + this.client = xmlrpc.createSecureClient(this.config); + } else { + this.client = xmlrpc.createClient(this.config); + } + this.queue = []; this.queue.running = 0; this.queue.parallelLimit = this.config.parallelLimit;