Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 602 Bytes

getMindfulSession().md

File metadata and controls

33 lines (30 loc) · 602 Bytes

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"
  }
];