Jawbone API与我们的健康健康应用程序集成不会返回数据

时间:2016-06-02 07:20:04

标签: jawbone

我们已将Jawbone网络API与我们的健康跟踪器应用程序集成。

我们正在使用Jawbone UP 24设备进行测试。

Connect部分在我们的应用程序中运行良好。但同步总是返回空响应,如下所示。

数据响应{“meta”:{“user_xid”:“RCLWx75WGKTdnY0L4UyFZg”,“message”:“OK”,“code”:200,“time”:1464848584},“data”:{“items”:[ ], “尺寸”:0}}

在标头中发送的Jawbone用户访问令牌:

Je5CDuGC9OSc-05UAifnK9kVk6thTRHewCwuwXuPuTo7mW7qLWnnd2I4ljqtCw-RlXB3v78Ji6VXW2MSxp0B_VECdgRlo_GULMgGZS0EumxrKbZFiOmnmAPChBPDZ5JP

StepRequest网址:

https://jawbone.com/nudge/api/v.1.1/users/@me/moves?start_time=1464796800000&end_time=1464848584617

我们按照此链接中的文档执行步骤 - https://jawbone.com/up/developer/

我们担心它无法正常工作,因为API仅支持新设备(Jawbone UP 2,3和4),而不支持Jawbone UP 24。

1 个答案:

答案 0 :(得分:0)

问题是你的start_time和end_time是以毫秒为单位,而它们应该是秒。

此请求应获取您正在寻找的步骤数据: https://jawbone.com/nudge/api/v.1.1/users/@me/moves?start_time=1464796800.000&end_time=1464848584.617

以下是documentation for the moves endpoint中start_time和end_time的定义:

start_time   int To be used along with end_time. Epoch timestamp that denotes the start of the time range queried for move events. end_time  int To be used with start_time. Epoch timestamp that denotes the end of the time range queried for move events.

Wikipedia page for Unix Time将大纪元时间定义为:

  

Unix时间(也称为POSIX时间或纪元时间)是一个系统   描述时间瞬间,定义为的数量   已经过去了。 。