From 1e9641837fece850695f8f9394f09efe389a9fee Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Tue, 28 Jun 2016 20:11:55 -0400 Subject: [PATCH] added getStepCountForDay method docs --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cae1f59..f9775f6 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data. * [isAvailable](#isavailable) * [initHealthKit](#inithealthkit) * [getStepCountForToday](#getstepcountfortoday) + * [getStepCountForDay](#getstepcountforday) * [getLatestWeight](#getlatestweight) * [saveWeight](#saveweight) * [getLatestHeight](#getlatestheight) @@ -169,7 +170,6 @@ AppleHealthKit.initHealthKit(healthKitOptions: object, (err: string, res: object ___ - #### **`getStepCountForToday`** get the the aggregated total steps for the current day starting and ending at midnight ```javascript @@ -183,6 +183,23 @@ AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => { ___ +#### **`getStepCountForDay`** +get the the aggregated total steps for the day provided as `date` in options object. +```javascript +let d = new Date(2016,5,27); +let options = { + date: d.toISOString() +}; +AppleHealthKit.getStepCountForDay(options, (err, steps) => { + if(this._handleHealthKitError(err, 'getStepCountForDay')){ + return; + } + // steps is the step count for day 'd' +}); +``` + +___ + #### **`getLatestWeight`** get the most recent weight value ```javascript -- 2.26.2