From fc0aa615b0eb2c758080ad45879265dff9d96c12 Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Sat, 9 Jul 2016 12:18:53 -0400 Subject: [PATCH] update readme --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 928abfe..3892298 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ A React Native bridge module for interacting with [Apple HealthKit] data. * [initHealthKit](#inithealthkit) * [getBiologicalSex](#getbiologicalsex) * [getDateOfBirth](#getdateofbirth) + * [getStepCount](#getstepcount) * ~~[getStepCountForToday](#getstepcountfortoday)~~ * ~~[getStepCountForDay](#getstepcountforday)~~ - * [getStepCount] * [getMultiDayStepCounts](#getmultidaystepcounts) * [getDistanceWalkingRunning](#getdistancewalkingrunning) * [getDistanceCycling](#getdistancecycling) @@ -241,6 +241,28 @@ AppleHealthKit.getDateOfBirth(null, (err: Object, dob: string) => { ___ +#### ~~**`getStepCount`**~~ +get the aggregated total steps for a specific day (starting and ending at midnight). + +an optional options object may be provided containing `date` field representing the selected day. If `date` is not set or an options object is not provided then the current day will be used. +```javascript +let d = new Date(2016,5,27); +let options = { + date: d.toISOString() +}; +``` + +``` +AppleHealthKit.getStepCount(options: Object, (err: Object, steps: Object) => { + if(this._handleHealthKitError(err, 'getStepCount')){ + return; + } + // steps.value is the step count for day 'd' +}); +``` + +___ + #### ~~**`getStepCountForToday`**~~ `removed - replaced by getStepCount` -- 2.26.2