reformatted/tweaked and added the examples from example.py in the yelpapi package
[yelp-api-cdsw] / yelp1-json.py
1 from yelpapi import YelpAPI
2 from yelp_authentication import CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET
3
4 yelp_api = YelpAPI(CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET)
5
6 # Example search by location text and term. Take a look at
7 # http://www.yelp.com/developers/documentation/v2/search_api for
8 # the various options available.
9
10 # print the 5 best rated ice cream places in Austin, TX
11
12 response = yelp_api.search_query(term='ice cream', location='austin, tx', sort=2, limit=5)
13
14 print(response)

Benjamin Mako Hill || Want to submit a patch?