We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78e8eba commit a910ab4Copy full SHA for a910ab4
yelp-connect.py
@@ -0,0 +1,15 @@
1
+# Import the requests module which allows us to make the API call
2
+import requests
3
+#use authentication code as app_secret
4
+app_secret = 'DbcVh6n74NPHG_3-QvbS_HEHzcacvIfZTPlsV4UdL8QA6gULwLU34PFLtA6FSr90ubQ30hB8FZdzdBNAvug22H5P703sX-kGNyD_atIoFvi1N64Jyhzmux2ThFW1W3Yx'
5
+
6
+#To Authorize use a header with authentication code as bearer.
7
+headers = {'Authorization': 'bearer %s' % app_secret}
8
9
+# Call Yelp API to pull info from local bakery
10
+biz_id = 'kizbees-kitchen-egg-harbor-city'
11
+url = 'https://api.yelp.com/v3/businesses/%s' % biz_id
12
+response = requests.get(url=url, headers=headers)
13
+response_data = response.json()
14
15
+print(response_data)
0 commit comments