diff --git a/Lesson_2/10_Requesting from Python Code/geocode.py b/Lesson_2/10_Requesting from Python Code/geocode.py index a023419..36bb39d 100644 --- a/Lesson_2/10_Requesting from Python Code/geocode.py +++ b/Lesson_2/10_Requesting from Python Code/geocode.py @@ -1,11 +1,10 @@ import httplib2 import json -def GetGeocodeLocation(inputString): +def getGeocodeLocation(inputString): # Use Google Maps to convert a location into Latitute/Longitute coordinates # FORMAT: https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=API_KEY - # Then Store it in the DB - google_api_key = "PASTE_YOUR_KEY_HERE" + google_api_key = "YOUR_API_KEY" locationString = inputString.replace(" ", "+") url = ('https://maps.googleapis.com/maps/api/geocode/json?address=%s&key=%s'% (locationString, google_api_key)) h = httplib2.Http()