linkedin-js
linkedin-js copied to clipboard
Consecutive call to apiCall does not reset paramAppender
If in callback of the linkedin_client.apiCall we make another call to linkedin_client.apiCall paramAppender does not reset which can cause problem for the next call.
Example:
linkedin_client.apiCall( 'GET' ,'/job-search?country-code=us&postal-code=90210&count=1' , {token: myToken} , searchCallback);
var searchCallback = function (error, response, body) {
if(error === null)
{
var results = response.jobs.values;
for(var i=0; i<jobs.length; i++)
{
linkedin_client.apiCall(
'GET'
,'/jobs/' + jobs[i].id +
, {token: myToken}
, anotherCallback);
}
}
}
Solution: add paramAppender = "?"; upon entering apiCall()
Vote for it. Had the same problem. Please correct.