import requests 
import import_ipynb
import zomato as zomato

# testing
zomato_key = 'Zomato-Key'
zomato.example(zomato_key)

"""
Explanation: Now You Code In Class: Getting Directions!
Let's continue on our zomato journey, mashing it up with the Bing Maps API so that we can get driving instructions to the restaurant. 
Bing Maps Route API is here: https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-route 
The zomato functions are the the zomato.ipynb file. We can import one noteook into another using the import_ipynb python module.
End of explanation
"""


# PROMPT 3 Demonstrate you can call the API
start = 'Manley Field House, Syracuse, NY 13244'
finish =  'Carrier Dome, Syracuse, NY 13204'
bing_key = 'Bing-Key'


# PROMPT 4 What do I need from the response?


"""
Explanation: Step 1a: Learning The Bing Route API
FIRST: Sign up and get an API Key: https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key 
NEXT: Read the Bing Maps Route API is here: https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-route 
WHAT IS REQUIRED TO EXECUTE THE API (INPUTS): 
PROMPT 1

WHAT DOES THE API GIVE US BACK (OUTPUTS):
PROMPT 2

Algorithm (Steps in Program):
Algorithms to call API's are the same, so  the concerns are:

- What do we need to call the API? 
- What do I need from the response?

Step 1b: Code the API: Proof of Concept
End of explanation
"""


# PROMPT 9 - write function



"""
Explanation: Step 1.c: Refactor into a function getDirections()
Now the we understand the API, let's refactor the code into a useable function 
FUNCTION INPUTS:
PROMPT 5

FUNCTION OUTPUTS:
PROMPT 6

ALGORITHM:
PROMPT 7

TEST (How do we know it's right?)
PROMPT 8
End of explanation
"""


# PROMPT 10

bing_key = 'bing-Key'
start = 'Manley Field House, Syracuse, NY 13244'
finish =  'Carrier Dome, Syracuse, NY 13204'


"""
Explanation: Step 1.d: Test the function
End of explanation
"""


from IPython.display import display, HTML
from ipywidgets import widgets, interact
import requests

display(HTML("<h1>Fudge's Food Finder</h1>"))
bing_key = 'Bing-Key'
zomato_key = 'Zomato-Key'

# PROMPTS


# run this code to turn in your work!
from coursetools.submission import Submission
Submission().submit_now()

"""
Explanation: Step 2: Putting it all together
PROMPTS:
 11. Input your home address, then city where you want to eat.
 12. Use Zomato to find the cityid
 13. Use Zomato to get the trending restaurants
 14. Build a list of trending restaurants
 15. Start Interact - upon selection of a restaurant
     16. find restaurant ID
     17. get restaurant detail
     18. show restaurant details name, cuisine, hours, address, phone
     19. find driving directions from home address to restaurant
End of explanation
"""


