Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (13 sloc) 422 Bytes
const functions = require('firebase-functions');
const yelp = require('yelp-fusion');
const client = yelp.client("API Key here!");
exports.yelpBusinessSearch = functions.https.onRequest((req, res) => {
client.search({
latitude: req.query.lat,
longitude: req.query.lng
}).then(response => {
res.send(response.jsonBody.businesses);
}).catch(e => {
res.send(e);
});
});
You can’t perform that action at this time.