我下面就GitHub
該項目頁面上的說明狀況409是所有沙盒模式下運行尤伯杯的Python API返回的乘坐要求
首先我打電話
estimate = client.estimate_ride(
product_id=product_id,
start_latitude=start_lat,
start_longitude=start_long,
end_latitude=end_lat,
end_longitude=end_long,
seat_count=seat_count
)
並取回像
{
"pickup_estimate": 2,
"trip": {
"distance_estimate": 2.18,
"distance_unit": "mile",
"duration_estimate": 240
},
"fare": {
"fare_id": "14f81e7421f0ae124c2e5a97d0b9cf975cbb84fdd2bf6fc8b7bb2f49fc6c6f8a",
"value": 8.06,
"display": "$8.06",
"currency_code": "USD",
"expires_at": 1489104865
}
}
然後我用同樣的product_id和我上面得到了fare_id(與相同憑證的客戶對象)運行此
response = client.request_ride(
product_id=product_id,
start_latitude=start_lat,
start_longitude=start_long,
end_latitude=end_lat,
end_longitude=end_long,
seat_count=seat_count,
fare_id=fare_id
)
我得到的是一個ClientError
異常狀態爲409
任何想法有什麼不對?
client.get_current_ride_details()返回'ClientError:404'。 文檔說「如果沒有正在進行的旅程,端點將導致404找不到錯誤」 –