Is there any way to fetch info from the Uber API (Time away/fare to destination) without installing the ride widget?

≡放荡痞女 提交于 2020-01-06 02:21:05

问题


Is there a way to fetch info (time away/fare estimate) using purely deeplinking with the Uber API. Basically I want users to preview this info on my app, but to be deeplinked to the Uber App as opposed to the Ride Widget. The problem is that fetching this apparently needs authorization through sign in, which only the widget provides.

Is there any knowledge I am not aware of or a way around this?


回答1:


You can't do this via a deep link, but you can do it via the API.

The Uber API exposes time and price estimate endpoints that you can access using your application's server token (which won't require you to log in a user). The server token can be found on the developer dashboard for your app, on the settings tab.

If you configure the SDK with your server token (add the UberServerToken key to your info.plist) you can use the fetchTimeEstimates and fetchPriceEstimates methods on the RidesClient to get estimates. You can then deeplink in to the Uber app for the actual request.



来源:https://stackoverflow.com/questions/37997052/is-there-any-way-to-fetch-info-from-the-uber-api-time-away-fare-to-destination

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!