reformatted/tweaked and added the examples from example.py in the yelpapi package
[yelp-api-cdsw] / yelp3.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 business query. Look at
7 # http://www.yelp.com/developers/documentation/v2/business for more
8 # information.
9
10 print("***** selected reviews for Amy's on 6th St. *****")
11
12 business = yelp_api.business_query(id='amys-ice-creams-austin-3')
13
14 for review in business['reviews']:
15     print('rating: %d\nexcerpt: %s\n' % (review['rating'], review['excerpt']))
16

Benjamin Mako Hill || Want to submit a patch?