Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 684 Bytes

getDistanceWalkingRunning.md

File metadata and controls

38 lines (30 loc) · 684 Bytes

getDistanceWalkingRunning

Get the total distance walking/running on a specific day.

Example input options:

let options = {
  unit: 'mile', // optional; default 'meter'
  date: (new Date(2016,5,1)).toISOString(), // optional; default now
  includeManuallyAdded: false. // optional: default true

};

Call the method:

AppleHealthKit.getDistanceWalkingRunning(
  (options: HealthInputOptions),
  (err: Object, results: HealthValue) => {
    if (err) {
      return
    }
    console.log(results)
  },
)

Example output:

{
  "value": 1.45,
  "startDate": "2016-07-08T12:00:00.000-0400",
  "endDate": "2016-07-08T12:00:00.000-0400"
}