I am stuck trying to figure out how to implement Yelp’s api with node. I’ve tried everything from using node-yelp to my own ajax. I can’t figure out what I’m missing. Here’s my current ajax code:
$.ajax({
‘type’: message.method,
‘url’ : message.action,
‘data’ : parameterMap,
‘dataType’ : ‘jsonp’,
‘jsonpCallback’ : ‘cb’,
‘cache’: true
})
.done(function(data, textStatus, jqXHR) {
console.log(‘braaaaiinnns!’);
console.log(‘success[’ + data + ‘]’);
}
)
.fail(function(jqXHR, errorThrown) {
console.log(‘error[’ + errorThrown + ‘], jqXHR[’ + JSON.stringify(jqXHR) + ‘]’);
}
);
I’d appreciate any feedback. Thanks.