diff --git a/README.md b/README.md index 928abfe19b1647745dfda6c88a7fa838fa32c49f..3892298ab0cbf964e41cae44a3726c945015e7b2 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`