Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 880 Bytes

getWorkoutRouteSamples.md

File metadata and controls

48 lines (42 loc) · 880 Bytes

getWorkoutRouteSamples.md

Query for workout route samples. The options object is used to setup a query to retrieve relevant samples.

Example input options:

let options = {
  id: 'E621E1F8-C36C-495A-93FC-0C247A3E6E5F',  // required [UUID]
}
AppleHealthKit.getWorkoutRouteSamples(
  options,
  (err: Object, results: Array<WorkoutRouteQueryResults>) => {
    if (err) {
      return
    }
    console.log(results)
  },
)

Example output:

  {
    anchor: String,
    data: {
      device: String,
      id: String,
      metadata: String,
      sourceName: String,
      sourceId: String,
      start: String,
      end: String,
      locations: [{
        latitude: Number,
        longitude: Number,
        altitude: Number,
        timestamp: String,
        speed: Number,
        speedAccuracy: Number,
      }]
    }
  }