X-Git-Url: https://projects.mako.cc/source/yelp-api-cdsw/blobdiff_plain/780a521a94cb490636e3cd296b9ce339db1517bc..5632f1d30d231449e6174f3f9860cda6ab5ae4d2:/yelp2-json.py diff --git a/yelp2-json.py b/yelp2-json.py new file mode 100644 index 0000000..0d2d0c5 --- /dev/null +++ b/yelp2-json.py @@ -0,0 +1,16 @@ +from yelpapi import YelpAPI +from yelp_authentication import CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET + +yelp_api = YelpAPI(CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET) + +# Example search by bounding box and category. See +# http://www.yelp.com/developers/documentation/v2/all_category_list +# for an official list of Yelp categories. The bounding box definition +# comes from +# http://isithackday.com/geoplanet-explorer/index.php?woeid=12587707. + +# 5 bike rentals in San Francisco county + +response = yelp_api.search_query(category_filter='bikerentals', bounds='37.678799,-123.125740|37.832371,-122.356979', limit=5) + +print(response)