【问题标题】:Fitbit API: Not returning the steps for a time range on a dateFitbit API:不返回日期时间范围内的步数
【发布时间】:2019-07-03 06:15:14
【问题描述】:

我在 iOS 应用中使用 Fitbit 端点来获取如下步骤:

https://api.fitbit.com/1/user/-/activities/steps/date/2019-07-01/1d/15min/time/12:00/12:15.json

这是在某个时间间隔内获取某个日期的步数,但它返回一些活动的数组,如瑜伽、步行、冬季活动等,但不返回该时间间隔的步数。谁能告诉我如何获取相同的数据?

它返回结果为:

"categories": [
    {
        "activities": [
            {
                "accessLevel": "PUBLIC",
                "activityLevels": [
                    {
                        "id": 3016,
                        "maxSpeedMPH": -1,
                        "mets": 8.5,
                        "minSpeedMPH": -1,
                        "name": "6 - 8 inch step"
                    },
                    {
                        "id": 3017,
                        "maxSpeedMPH": -1,
                        "mets": 10,
                        "minSpeedMPH": -1,
                        "name": "10 - 12 inch step"
                    }
                ],
                "hasSpeed": false,
                "id": 90004,
                "name": "Aerobic step"
            },
            {
                "accessLevel": "PUBLIC",
                "hasSpeed": false,
                "id": 3015,
                "mets": 6.5,
                "name": "Aerobic, general"
            },

【问题讨论】:

  • 您是否在授权中授予了步骤?
  • @iVarun yes 授予了 Fitbit 请求的权限。在我的问题中添加了带有编辑的屏幕截图。
  • 确保您的数据正确同步。您可以查看 Fitbit 应用程序的上次同步时间。
  • Fitbit 中的数据已正确同步。

标签: ios swift fitbit


【解决方案1】:

我找到了 Fitbit 返回此类数据的原因。只是因为当日数据获取需要Fitbit的审核,或者我们可以使用“个人”应用程序类型来获取数据。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-03-21
    • 2017-02-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多