Google Fit Rest API - 看不到任何有用的数据

Google Fit Rest API - cant see any useful data

你好,我想知道我是如何从下面得到真实数据的。我把它放入 Oauth 2.0 playgournd:

https://www.googleapis.com/fitness/v1/users/me/dataSources/derive_step_cadence<-raw:com.google.step_count.cumulative:LGE:Nexus 5:bc5f1b97:Step Counter/datasets/8587796212108459505-8587784116108409439

我回来了:

HTTP/1.1 200 好 内容长度:202 X-xss-保护:1;模式=块 内容位置:https://www.googleapis.com/fitness/v1/users/me/dataSources/derive_step_cadence<-raw:com.google.step_count.cumulative:LGE:Nexus 5:bc5f1b97:Step Counter/datasets/8587796212108459505-8587784116108409439 X-内容类型选项:nosniff 过期时间:1990 年 1 月 1 日星期五 00:00:00 GMT 变化:原点,X原点 服务器:GSE 电子标签:"hLUJCvL5ZSSqXM3VrwyiV-fn_Cc/UTWu-5kuRnTemL1Tzb1qSZ4O9uk" Pragma:无缓存 缓存控制:无缓存、无存储、max-age=0、必须重新验证 日期:2015 年 2 月 6 日星期五 04:22:06 GMT X 框架选项:SAMEORIGIN 内容类型:application/json;字符集=UTF-8 { "minStartTimeNs": "8587784116108409439", "maxEndTimeNs": "8587796212108459505", "dataSourceId": "derive_step_cadence<-raw:com.google.step_count.cumulative:LGE:Nexus 5:bc5f1b97:Step 计数器 }

没有任何有用的数据。

我是不是做错了什么?

谢谢 拉斯

确保您在端点末尾提供的时间戳采用 nanotime 格式。

https://www.googleapis.com/fitness/v1/users/me/dataSources/derive_step_cadence<-raw:com.google.step_count.cumulative:LGE:Nexus 5:bc5f1b97:Step Counter/datasets/000000-1720845034000000000

这个解决方案非常有效