Comparing version 0.0.2 to 0.0.3
@@ -11,3 +11,3 @@ /** | ||
module.exports = function (options) { | ||
module.exports = function (options, sendAsREST) { | ||
@@ -17,2 +17,3 @@ // development and production ean endpoints | ||
ProdBaseUrl = "http://api.ean.com/ean-services/rs/hotel/v3/", | ||
sendAsREST = sendAsREST || false, | ||
defaults = { | ||
@@ -63,4 +64,11 @@ cid : null, | ||
customer = querystring.stringify(customer); | ||
var xml = querystring.stringify({"xml" : parser.toXML(parameters)}); | ||
return customer +"&json&" + xml; | ||
var paramsAsString = customer +"&json&"; | ||
if (sendAsREST){ | ||
paramsAsString += querystring.stringify(parameters); | ||
} | ||
else { | ||
paramsAsString += querystring.stringify({"xml" : parser.toXML(parameters)}); | ||
} | ||
return paramsAsString; | ||
} | ||
@@ -67,0 +75,0 @@ |
{ | ||
"name": "expedia", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "simple wrapper around the expedia EAN api", | ||
@@ -5,0 +5,0 @@ "main": "lib/expedia.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17000
355