yelp-python
yelp-python copied to clipboard
'Client' object has no attribute 'business'
Hello,
I try the following python code copied from this site: from yelp.client import Client
MY_API_KEY = 'xxxx'
client = Client(MY_API_KEY) business_response = client.business.get_by_id('yelp-san-francisco')
Then, I have the error "'Client' object has no attribute 'business'". Any idea why the given code doesn't work? Thanks for your help.
I have the exact same issue.
Finally, I use this solution: url = 'https://api.yelp.com/v3/businesses/search' API_KEY = xxxx headers = {'Authorization': f"Bearer {API_KEY}"} categories = ['french', 'chinese', 'japanese', 'italian', 'indian']
for i, category in enumerate(categories): params = {'location': location, 'limit': 50, 'categories': category} resp = requests.get(url, headers=headers, params=params)
Heh, may want to fork and start something anew, project looks dead to me.