Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created May 19, 2017 22:29
Show Gist options
  • Save fmasanori/cbd0a7e44fc13b2b9a251cd63ce29144 to your computer and use it in GitHub Desktop.
Save fmasanori/cbd0a7e44fc13b2b9a251cd63ce29144 to your computer and use it in GitHub Desktop.
Calcular Uber para Dinner Party do Django Girls
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