Closed3

Fitbit API

前提条件

  • 任意の日時の心拍数は、Fitbit社に申請して承認を貰わないと取得できない様子。
  • ただし、開発者個人のは取得できる。

https://dev.fitbit.com/build/reference/web-api/heart-rate/#get-heart-rate-intraday-time-series

Access to the Intraday Time Series for all other uses is currently granted on a case-by-case basis. Applications must demonstrate necessity to create a great user experience. Fitbit is very supportive of non-profit research and personal projects. Commercial applications require thorough review and are subject to additional requirements. Only select applications are granted access and Fitbit reserves the right to limit this access. To request access, fill out the form here.

FitbitAPIレスポンス

心拍数を秒単位で取得

  • 開発者本人であれば、任意の日時の心拍数を取得できる
  • リアルタイムには取れないが、現在時刻から15分ほど前のデータであれば取得できそう
  • 秒単位といっても5秒間隔くらいっぽい
json
{
    "activities-heart": [
        {
            "customHeartRateZones": [],
            "dateTime": "today",
            "heartRateZones": [
                {
                    "caloriesOut": 10.40906,
                    "max": 108,
                    "min": 30,
                    "minutes": 10,
                    "name": "Out of Range"
                },
                {
                    "caloriesOut": 0,
                    "max": 136,
                    "min": 108,
                    "minutes": 0,
                    "name": "Fat Burn"
                },
                {
                    "caloriesOut": 0,
                    "max": 171,
                    "min": 136,
                    "minutes": 0,
                    "name": "Cardio"
                },
                {
                    "caloriesOut": 0,
                    "max": 220,
                    "min": 171,
                    "minutes": 0,
                    "name": "Peak"
                }
            ],
            "value": "60.49"
        }
    ],
    "activities-heart-intraday": {
        "dataset": [
            {
                "time": "17:50:09",
                "value": 60
            },
            {
                "time": "17:50:14",
                "value": 61
            },
            {
                "time": "17:50:19",
                "value": 60
            },
            {
                "time": "17:50:24",
                "value": 60
            },
            {
                "time": "17:50:39",
                "value": 60
            },
            {
                "time": "17:50:49",
                "value": 59
            },
            {
                "time": "17:50:54",
                "value": 55
            },
            {
                "time": "17:50:59",
                "value": 56
            },
            {
                "time": "17:51:04",
                "value": 57
            },
            {
                "time": "17:51:19",
                "value": 57
            },
            {
                "time": "17:51:34",
                "value": 57
            },
            {
                "time": "17:51:44",
                "value": 56
            },
            {
                "time": "17:51:49",
                "value": 56
            },
            {
                "time": "17:51:54",
                "value": 57
            },
            {
                "time": "17:52:04",
                "value": 57
            },
            {
                "time": "17:52:14",
                "value": 58
            },
            {
                "time": "17:52:29",
                "value": 58
            },
            {
                "time": "17:52:34",
                "value": 59
            },
            {
                "time": "17:52:39",
                "value": 59
            },
            {
                "time": "17:52:49",
                "value": 59
            },
            {
                "time": "17:53:04",
                "value": 59
            },
            {
                "time": "17:53:09",
                "value": 60
            },
            {
                "time": "17:53:24",
                "value": 60
            },
            {
                "time": "17:53:29",
                "value": 59
            },
            {
                "time": "17:53:34",
                "value": 59
            },
            {
                "time": "17:53:49",
                "value": 70
            },
            {
                "time": "17:53:54",
                "value": 71
            },
            {
                "time": "17:53:59",
                "value": 66
            },
            {
                "time": "17:54:14",
                "value": 65
            },
            {
                "time": "17:54:29",
                "value": 65
            },
            {
                "time": "17:54:34",
                "value": 64
            },
            {
                "time": "17:54:39",
                "value": 59
            },
            {
                "time": "17:54:44",
                "value": 58
            },
            {
                "time": "17:54:49",
                "value": 57
            },
            {
                "time": "17:54:54",
                "value": 55
            },
            {
                "time": "17:55:04",
                "value": 56
            },
            {
                "time": "17:55:09",
                "value": 56
            },
            {
                "time": "17:55:14",
                "value": 56
            },
            {
                "time": "17:55:29",
                "value": 57
            },
            {
                "time": "17:55:44",
                "value": 59
            },
            {
                "time": "17:55:49",
                "value": 61
            },
            {
                "time": "17:55:54",
                "value": 62
            },
            {
                "time": "17:56:09",
                "value": 62
            },
            {
                "time": "17:56:19",
                "value": 67
            },
            {
                "time": "17:56:24",
                "value": 71
            },
            {
                "time": "17:56:34",
                "value": 71
            },
            {
                "time": "17:56:39",
                "value": 70
            },
            {
                "time": "17:56:44",
                "value": 69
            },
            {
                "time": "17:56:49",
                "value": 59
            }
        ],
        "datasetInterval": 1,
        "datasetType": "second"
    }
}
このスクラップは2ヶ月前にクローズされました
作成者以外のコメントは許可されていません