I have been working with implementing code to make Yelp API calls and have been using this https://arian.io/how-to-use-yelps-api-with-node/ as a reference. I've been looking at and messing with the code for awhile and trying to really understand it so I can go and implement my own version but I cant seem to understand this part.
-How do i use the callback from this? Do I pass in a function callback then use that to get data from the request. I guess my main question that I am confused on is how I use this function expression?
Thanks for any help in the right direction.
Code:var request_yelp = function(set_parameters, callback) { .... request(apiURL, function(error, response, body){ return callback(error, response, body); });



Reply With Quote
