Get the list of Mindful Sessions.
let options = {
startDate: Date,
endDate: Date,
limit?: number
};
AppleHealthKit.getMindfulSession(options, (err: string, results: Object) => {
if (err) {
console.log("error getting mindful session: ", err);
return;
}
// returns array of mindful session data
console.log(results);
});
[
{
startDate: "2016-07-08T12:00:00.000-0400",
endDate: "2016-07-08T12:00:00.000-0400"
},
{
startDate: "2016-07-08T12:00:00.000-0400",
endDate: "2016-07-08T12:00:00.000-0400"
}
];