Created
May 19, 2017 22:29
-
-
Save fmasanori/cbd0a7e44fc13b2b9a251cd63ce29144 to your computer and use it in GitHub Desktop.
Calcular Uber para Dinner Party do Django Girls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uber_rides.session import Session | |
from pprint import pprint | |
session = Session(server_token='sua chave da API') | |
from uber_rides.client import UberRidesClient | |
client = UberRidesClient(session) | |
response = client.get_price_estimates( | |
start_latitude=-23.202480, | |
start_longitude=-45.903285, | |
end_latitude=-23.197670, | |
end_longitude=-45.890734, | |
seat_count=2 | |
) | |
estimate = response.json.get('prices') | |
print (estimate[0]['display_name'], estimate[0]['estimate']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment