diff --git a/README.md b/README.md index cae1f59dfc2570659bb2e78fd26f176c08e8d8f6..ca8e13d61955f75e87338ec314ffec614898273e 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,13 @@ A React Native bridge module for interacting with [Apple HealthKit] data. ![Alt text](https://devimages.apple.com.edgekey.net/assets/elements/icons/healthkit/healthkit-64x64.png "Apple HealthKit") +#### Notice +*This package is undergoing rapid development and should be considered unstable for the time being. +Use at your own risk* + #### Table of Contents * [Getting Started](#getting-started) - * [Installation](#installation-xcode) + * [Installation](#installation) * [Usage](#usage) * [Documentation](#documentation) * [Permissions](#permissions) @@ -13,6 +17,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 +174,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 +187,23 @@ AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => { ___ +#### **`getStepCountForDay`** +get the the aggregated total steps for the day provided as `date` in options object. the `date` field expects an ISO date string as its value +```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