Skip to content

dcorbett/yelp-fusion-proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yelp Fusion Proxy

This is an example proxy script for working with the Yelp Fusion API from a browser. It is meant for instructional purposes only, and should not be used in a production environment with additional security measures.

Usage

First, copy config-sample.php to config.php, and update the parameters with your own app keys.

Then to call an API, pass a parameter _ep that contains the desired endpoint within the API, beginning with a forward slash:

jQuery.getJSON("./yelp.php?_ep=/businesses/search&term=Taco+Mac");

Note that the endpoint will be prepended with https://api.yelp.com/v3 (no trailing slash).

Any other parameters will be sent to the requested endpoint, so this should allow full access to the API. It is currently only meant for making GET requests; any POST/PUT/DELETE requests will fail in unexpected (but spectacular?!) ways.

Cheers!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 91.2%
  • HTML 8.8%