Open minnnji opened 4 years ago
"session": [
{
"modifiedTimeMillis": "1585630592267",
"endTimeMillis": "1585607403000",
"name": "\uc7a0",
"activityType": 72,
"application": {
"packageName": "com.google.android.apps.fitness",
"version": "",
"name": "",
"detailsUrl": ""
},
"startTimeMillis": "1585580403000",
"activeTimeMillis": "27000000",
"id": "D0EB1333-A7C4-4586-88EE-AF0774D86CCC"
}
]
요청url) https://www.googleapis.com/fitness/v1/users/me/dataset:aggregate 요청 본문)
{
"startTimeMillis": 1585580403000,
"endTimeMillis": 1585780919000,
"aggregateBy": [
{
"dataTypeName": "com.google.activity.segment"
}
]
}
{
"bucket": [
{
"startTimeMillis": "1585580403000",
"endTimeMillis": "1585780919000",
"dataset": [
{
"dataSourceId": "derived:com.google.activity.segment:com.google.android.gms:merge_activity_segments",
"point": [
{
"startTimeNanos": "1585770900000000000",
"originDataSourceId": "derived:com.google.activity.segment:com.google.fitkit:apple:iphone:hm.wristband:session_activity_segment",
"endTimeNanos": "1585771559000000000",
"value": [
{
"mapVal": [],
"intVal": 72
}
],
"dataTypeName": "com.google.activity.segment"
}
}]}
종종 일치하지 않는 데이터가 들어옴.. 고려해서 보정 필요! ex) 03:45:59(google fit 데이터) -> 04:21:59(mi fit 데이터)
미밴드 -> google-fit 연동으로 수면 데이터 api 수신 가능
REST API Docs https://developers.google.com/fit/rest
google Oauthplayground https://developers.google.com/oauthplayground