我检查了你的 curl 命令,它看起来很棒。事实上,我通过 server_token 得到了对确切命令的响应:
curl "https://api.uber.com.cn/v1/estimates/price?server_token=<SERVER_TOKEN>&start_latitude=31.993750705445024&start_longitude=118.71421140272062&end_latitude=32.046405144489704&end_longitude=118.80070636431914" | jq
我的回答是:
{
"prices": [
{
"localized_display_name": "People's Uber +",
"distance": 7.72,
"display_name": "People's Uber +",
"product_id": "...",
"high_estimate": 34,
"surge_multiplier": 1,
"minimum": 7,
"low_estimate": 24,
"duration": 2160,
"estimate": "CN¥24-34",
"currency_code": "CNY"
},
{
"localized_display_name": "Uber Sedan",
"distance": 7.72,
"display_name": "Uber Sedan",
"product_id": "...",
"high_estimate": 111,
"surge_multiplier": 1,
"minimum": 20,
"low_estimate": 86,
"duration": 2160,
"estimate": "CN¥86-111",
"currency_code": "CNY"
}
]
}
以下是我对您的查询不起作用的假设:您尝试在中国使用优步(基于 URL 和位置),这要求您也使用适用于中国的优步应用。您能否验证您的应用程序是否显示在Uber Dashboard China 中?如需更多信息,请查看我们的开发者文档中的China Guide。