linkedin-js icon indicating copy to clipboard operation
linkedin-js copied to clipboard

Consecutive call to apiCall does not reset paramAppender

Open Softveras opened this issue 12 years ago • 1 comments

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()

Softveras avatar Feb 10 '13 22:02 Softveras

Vote for it. Had the same problem. Please correct.

Nomeasmo avatar Jan 21 '14 14:01 Nomeasmo