v2睡眠数据查询

参数说明

  • IDOSyncSleepDataItemInfoBluetoothModel
参数 说明 备注
sleepStatus 睡眠状态 睡眠状态(0x01: 醒着,
0x02:浅睡,
0x03:深睡)
durations 持续时间 int
dateStr 时间戳 精确到日期 int
startTimeStr 时间戳 精确到分钟 int
serialNumber 序列号 int
  • IDOSyncSleepDataInfoBluetoothModel
参数 说明 备注
itemsCount 睡眠数据包数量 int
endHour 睡眠结束时钟 int
endMinute 睡眠结束分钟 int
totalMinute 总睡眠时长 int (单位 :分钟)
lightSleepCount 浅睡眠次数 int
deepSleepCount 深睡眠次数 int
wakeCount 醒来次数 int
wakeMinute 醒来时长 int (单位 : 分钟)
lightSleepMinute 浅睡眠时长 int (单位 : 分钟)
deepSleepMinute 深睡眠时长 int (单位 : 分钟)
goalSleepData 目标睡眠时长 int (单位 : 分钟)
sleepItems 睡眠数据集合 array (IDOSyncSleepDataItemInfoBluetoothModel)
year 年份 int
month 月份 int
day 日期 int
dateStr 时间戳 精确到日期 str
startTimeStr 时间戳 精确到分钟 str
sleepScore 睡眠评分 int (1-100)

按年查询睡眠

Objc:

//参数:年、Mac地址、是否查询详情
[IDOSyncSleepDataModel queryOneYearSleepsWithYear:year                                  
                                          macAddr:macAddr     
                                     isQueryItems:NO];

Swift:

//参数:年、Mac地址、是否查询详情
IDOSyncSleepDataModel.queryOneYearSleeps(withYear: year, macAddr: macAddr, isQueryItems: false);

按月查询睡眠

Objc:

//参数:年、月、Mac地址、月份内的日期集合、是否查询详情
[IDOSyncSleepDataModel queryOneMonthSleepsWithYear:year                                     
                                           month:month 
                                         macAddr:macAddr 
                                    datesOfMonth:&days
                                    isQueryItems:NO];

Swift:

//参数:年、月、Mac地址、月份内的日期集合、是否查询详情
IDOSyncSleepDataModel.queryOneMonthSleeps(withYear:year, month:month, macAddr:macAddr, datesOfMonth:&days, isQueryItems:false);

按周查询睡眠

Objc:

//参数: 星期索引、星期开始、Mac地址、星期内日期集合、是否查询详情
[IDOSyncSleepDataModel queryOneWeekSleepsWithWeekIndex:week
                                          weekStartDay:0                                                             
                                          macAddr:macAddr                                                           
                                      datesOfWeek:&days                                                 
                                      isQueryItems:NO];

Swift:

//参数: 星期索引、星期开始、Mac地址、星期内日期集合、是否查询详情
IDOSyncSleepDataModel.queryOneWeekSleeps(withWeekIndex:week, weekStartDay:0, macAddr:macAddr, datesOfWeek:&days, isQueryItems: false);

按日查询睡眠

Objc:

//参数: 年、月、日、Mac地址
[IDOSyncSleepDataModel queryOneDaySleepsDetailWithMac:macAddr                                                                                                             
                                                year:year                                                                    
                                                month:month 
                                                  day:day];

Swift:

//参数: 年、月、日、Mac地址
IDOSyncSleepDataModel.queryOneDaySleepsDetail(withMac:macAddr, year:year, month:month, day:day);

查询所有睡眠

Objc:

//参数: Mac地址
[IDOSyncSleepDataModel queryAllSleepsWithMac:macAddr];

Swift:

//参数: Mac地址
IDOSyncSleepDataModel.queryAllSleeps(withMac:macAddr);

查询所有基础睡眠

Objc:

//参数: Mac地址
[IDOSyncSleepDataModel queryAllContractedSleepsWithMac:macAddr];

Swift:

//参数: Mac地址
IDOSyncSleepDataModel.queryAllContractedSleeps(withMac:macAddr);
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by Gitbook修订时间: 2023-12-18 10:04:13

results matching ""

    No results matching ""