- Write a function to make a google maps api directions request.
- The function should take in 3 parameters: origin, destination, api_key
- Choose another API such as the one below and make 3 calls.
- Google Maps
- AWS
- IBM's Watson
- Write a function to make a google maps api directions request.
- The function should take in 3 parameters: origin, destination, api_key
Check out the documentation here: https://developers.google.com/maps/documentation/directions/start
import requests
#Starter code snippet
url = 'https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood4&key=YOUR_API_KEY'
response = requests.get(url)
def get_google_directions(input_variable1, input_variable2, etc.):
"""Your code goes here. Well, outside the comments section if you want it to do anything."""
return Whatever your function returns...maybe nothing
- Choose another API such as the one below and make 3 calls.