yelp api的python包装器
ezapi-yelp的Python项目详细描述
Ezapi yelp
的python包装器安装
pip install ezapi-yelp
测试
git clone git@github.com:zehengl/ezapi-yelp.git
export token="..."
cd ezapi-yelp
python setup.py test
用法
from yelp import YelpFusion
token = "..."
yelp_fusion = YelpFusion(token)
print(yelp_fusion.business_search(location="San Francisco"))
print(yelp_fusion.transaction_search("delivery", location="San Francisco"))
print(yelp_fusion.business_details("WavvLdfdP6g8aZTtbBQHTw"))
print(
yelp_fusion.business_match(
name="Gary Danko",
address1="800 N Point St",
city="San Francisco",
state="CA",
country="US",
)
)
print(yelp_fusion.reviews("WavvLdfdP6g8aZTtbBQHTw"))
print(
yelp_fusion.autocomplete(
text="Gary Danko", latitude=37.80587, longitude=-122.42058
)
)
print(yelp_fusion.all_categories())
print(yelp_fusion.category_details("hotdogs"))
print(yelp_fusion.event_lookup("oakland-saucy-oakland-restaurant-pop-up"))
print(yelp_fusion.event_search(location="Oakland"))
print(yelp_fusion.featured_event(location="Oakland"))