tonybadguy / yelp-fusion Goto Github PK
View Code? Open in Web Editor NEWYelp Fusion API client for Node.js
License: MIT License
Yelp Fusion API client for Node.js
License: MIT License
mapquest might be the answer
I am getting 3 comments and related data only how to get all reviews
Nearly all of Yelp's endpoints support passing a ISO-639 string as a parameter called locale
. That way, you can get data that is specific to the country/area that the user is in, in the language that they speak. How would I pass this flag to the Yelp API with this library?
I am working on a project where i call yelps api and returns bars with reviews less than 100. But I cannot seem to figure out how to actually call it in react. Any ideas? Would i just have to do the client.yelp?
I'm currently trying to implement Yelp into a React application and I am receiving a CORS error trying to access Yelp from the client-side. Do you know of any possible way to work around this?
i get this error when starting up.
cleared npm cache and reinstalled node, updated to node 7+
W20161231-01:39:21.561(-5)? (STDERR) /Users/ME/Sites/SITE/app/.meteor/local/build/programs/server/packages/modules.js:3537 W20161231-01:39:21.562(-5)? (STDERR) const _send = require('@tonybadguy/call-me-maybe'); W20161231-01:39:21.562(-5)? (STDERR) ^^^^^ W20161231-01:39:21.598(-5)? (STDERR) SyntaxError: Use of const in strict mode. W20161231-01:39:21.599(-5)? (STDERR) at /Users/ME/Sites/SITEapp/.meteor/local/build/programs/server/boot.js:292:30 W20161231-01:39:21.599(-5)? (STDERR) at Array.forEach (native) W20161231-01:39:21.599(-5)? (STDERR) at Function._.each._.forEach (/Users/ME/.meteor/packages/meteor-tool/.1.3.5_1.17pn3ki++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) W20161231-01:39:21.600(-5)? (STDERR) at /Users/ME/Sites/SITE/app/.meteor/local/build/programs/server/boot.js:133:5 => Exited with code: 8
it looks like an issue in the package itself...
InternalError Metro has encountered an error: While trying to resolve module
yelp-fusionfrom file
C:\Users\chukw\OneDrive\Desktop\ubereats-clone\Screens\Home.js, the package
C:\Users\chukw\OneDrive\Desktop\ubereats-clone\node_modules\yelp-fusion\package.jsonwas successfully found. However, this package itself specifies a
main module field that could not be resolved (
C:\Users\chukw\OneDrive\Desktop\ubereats-clone\node_modules\yelp-fusion\lib\index.js. Indeed, none of these files exist:
^ would be nice to have. Currently there's no easy way to let the request timeout if yelp is taking too long to respond.
Hi there, thanks for the library. I'm attempting to pull this into an old version of react-native and consistently get
Unable to resolve module url from /Users/***/MyAwesomeProject/node_modules/@tonybadguy/call-me-maybe/lib/request-filters/url-params.js:
Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/url and its parent directories
This is just using a basic import of import yelp from 'yelp-fusion'
It may well be that my packager just isn't able to deal with this but I'd rather write my request by hand than have to go through another react-native upgrade. Any easy fixes for this?
react-native 0.29.0, node 9.0.0, npm 6.4.1
Already done the recommended node_module reinstall, clearing watchman watches, reseting the packager cache. Thanks.
Then installed via npm install yelp-fusion --save
getting old version of index.js class
client.allCategories().then(response => {
^
TypeError: client.allCategories is not a function
at Object. (C:\WEB...\yelp-fusion\fusion\node\sample.js:27:8)
?[90m at Module._compile (internal/modules/cjs/loader.js:959:30)?[39m
?[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)?[39m
?[90m at Module.load (internal/modules/cjs/loader.js:815:32)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:727:14)?[39m
?[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)?[39m
?[90m at internal/main/run_main_module.js:17:11?[39m
Hi,
My yelp fusion call is now returning this error after previously working for 5 months.
{
errno: "EAI_AGAIN", code: "EAI_AGAIN", syscall: "getaddrinfo", hostname: "api.yelp.com",…}
code: "EAI_AGAIN"
errno: "EAI_AGAIN"
host: "api.yelp.com"
hostname: "api.yelp.com"
port: 443
syscall: "getaddrinfo"
}
Was on version 2.2.1, then updated to 3.0.0. Still getting the same error.
Here is what my code looks like
const functions = require('firebase-functions');
const yelp = require('yelp-fusion');
const client = yelp.client("not-real-key");
exports.yelpBusinessSearch = functions.https.onRequest((req, res) => {
res.set('Access-Control-Allow-Origin', '*');
client.search({
latitude: req.query.lat,
longitude: req.query.lng,
radius: req.query.radius,
limit: 50,
open_now: true
}).then(response => {
res.send(response.jsonBody.businesses);
}).catch(e => {
res.send(e);
});
});
API key is correct.
Thank you very much for this wrapper, has been very useful!
I encountered this bug when I tried to use yelp api fusion.
The wrapper for our Oauth 2 becomes depreciated, wondering if there's any fix for #6
body: '{"error": {"code": "OAUTH_TOKEN_ENDPOINT_DEPRECATED", "description": "The oauth2 token endpoint has been deprecated and removed; you must use your API key for authentication instead. Please see https://www.yelp.com/developers/documentation/v3/authentication#where-is-my-client-secret-going for info & migration steps"}}' },
Prior to December 7, 2017 the API used OAuth 2.0 to authenticate requests to the API. In an effort to simplify authentication, starting March 1, 2018 the API no longer uses OAuth 2.0 for requests and moved over to only API Keys.
With OAuth 2.0 the process to authenticate was:
Get your Client ID and client secret from the Manage App page.
Make a request to the token endpoint with your Client ID and client secret to get an access token.
Put the access token inside of the request header as "Authorization: Bearer " and make requests against the API.
With just API Keys the process to authenticate is:
Get your API Key from the Manage App page.
Put the API Key in the request header as "Authorization: Bearer ".
And that's it! You no longer need to make a request to the token endpoint to get an access token. Your API Key does not expire like the access tokens used to, so you don't need to worry about generating new ones. Note that the API Key is not a drop in replacement for the client secret. Using the API Key as a client secret in the token endpoint will not work.
No issue, but just wanted to say thank you for this. Just got it up and running.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.