amazon-sp-api
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -34,3 +34,20 @@ const crypto = require('crypto-js'); | ||
_constructEncodedQueryString(query){ | ||
return qs.stringify(query); | ||
if (query){ | ||
query = qs.stringify(query, {arrayFormat:'comma'}); | ||
let encoded_query_obj = {}; | ||
let query_params = query.split('&'); | ||
query_params.map((query_param) => { | ||
let param_key_value = query_param.split('='); | ||
encoded_query_obj[param_key_value[0]] = param_key_value[1]; | ||
}); | ||
encoded_query_obj = this._sortQuery(encoded_query_obj); | ||
let encoded_query_arr = []; | ||
for (let key in encoded_query_obj){ | ||
encoded_query_arr.push(key + '=' + encoded_query_obj[key]); | ||
} | ||
if (encoded_query_arr.length){ | ||
return encoded_query_arr.join('&'); | ||
} | ||
} | ||
return ''; | ||
} | ||
@@ -37,0 +54,0 @@ |
{ | ||
"name": "amazon-sp-api", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Amazon Selling Partner API client", | ||
@@ -5,0 +5,0 @@ "main": "index.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
25553
436