loop54-js-connector
Advanced tools
Comparing version 1.3.111 to 1.3.112
@@ -65,3 +65,3 @@ 'use strict'; | ||
versions: { | ||
libVersion: "1.4.111", //"111" will be replaced by teamcity. also in package.json | ||
libVersion: "1.5.112", //"112" will be replaced by teamcity. also in package.json | ||
apiVersion: "V3" | ||
@@ -95,3 +95,3 @@ }, | ||
call: function (endpoint, path, body, method, callback, userId, apiKey) { | ||
call: function (endpoint, path, body, method, callback, userId, apiKey, customHeaders) { | ||
@@ -110,2 +110,9 @@ if(!userId) | ||
}; | ||
if(customHeaders){ | ||
for (const key in customHeaders) { | ||
headers[key] = customHeaders[key]; | ||
} | ||
} | ||
if(apiKey) | ||
@@ -269,3 +276,3 @@ headers["Loop54-key"] = apiKey; | ||
*/ | ||
function getLoop54Client (endpoint, userId, apiKey) { | ||
function getLoop54Client (endpoint, userId, apiKey, customHeaders) { | ||
@@ -294,2 +301,7 @@ if (typeof endpoint !== 'string' || endpoint.length === 0) { | ||
/** | ||
* Object of custom headers to be set with the calls. | ||
*/ | ||
customHeaders: customHeaders, | ||
/** | ||
* Used for performing autocomplete requests to the engine. | ||
@@ -316,3 +328,3 @@ * @param {string} searchTerm The query to find suggestions. | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -364,3 +376,3 @@ return req; | ||
customData:options.customData | ||
},null,callback, userId, apiKey); | ||
},null,callback, userId, apiKey, customHeaders); | ||
@@ -402,3 +414,3 @@ return req; | ||
customData:options.customData | ||
},null,callback, userId, apiKey); | ||
},null,callback, userId, apiKey, customHeaders); | ||
@@ -431,3 +443,3 @@ return req; | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -464,3 +476,3 @@ return req; | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -486,3 +498,3 @@ return req; | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -524,3 +536,3 @@ return req; | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -545,3 +557,3 @@ return req; | ||
customData:options.customData | ||
}, null, callback, userId, apiKey); | ||
}, null, callback, userId, apiKey, customHeaders); | ||
@@ -548,0 +560,0 @@ return req; |
{ | ||
"name": "loop54-js-connector", | ||
"version": "1.3.111", | ||
"version": "1.3.112", | ||
"description": "JS Wrapper for Loop54 JSON API", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
580883
8745