1

I am testing Uber API User Activity endpoints in sandbox. I have created a request, then successively changed its status from "processing" to "completed" - request details returns me status: "completed".

However when I try to fetch history (both v1.1 & v1.2), I receive an empty "history" array: {"count":0,"offset":0,"limit":5,"history":[]}

Is it currently impossible to test history in the sandbox, or am I doing something wrong?

4

1 回答 1

3

沙盒旨在测试/request端点,以便您可以在不请求实时骑行的情况下测试您的代码。这意味着当您创建一个假乘车时POST/request您可以更改其状态、获取收据或地图并取消,就像您可以做的那样。

使用/productsor等​​其他端点时/history,即使您在沙箱中,也会返回真实数据。沙盒中的游乐设施或设置变量不会影响此数据 - 即您的沙盒游乐设施不会被添加/history,并且在沙盒中使产品激增不会改变实际估计/estimates/price

您收到的历史记录为空,因为与访问令牌相关联的用户没有使用 Uber 进行任何实际乘车。响应反映了实际历史,这是测试历史端点的正确方法。

于 2015-12-26T00:27:44.673 回答