diff --git a/README.md b/README.md index 7a1e53419c78f2e8efa58f05e3ac8a2dbfb06dc5..3965f991bcfeb09164477ebe3eb505af3c25bb8f 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,17 @@ let options = { endDate: (new Date()).toISOString() // optional; default now }; ``` -the function will be called with an array of elements. each element is an object containing `value`, `startDate`, and `endDate` fields +the function will be called with an array of elements. each element is an object containing `value`, `startDate`, and `endDate` fields: +```javascript +[ + { value: 8, startDate: '2016-07-09T00:00:00.000-0400', endDate: '2016-07-10T00:00:00.000-0400' }, + { value: 1923, startDate: '2016-07-08T00:00:00.000-0400', endDate: '2016-07-09T00:00:00.000-0400' }, + { value: 1802, startDate: '2016-07-07T00:00:00.000-0400', endDate: '2016-07-08T00:00:00.000-0400' }, + ... +] +``` + + ```javascript AppleHealthKit.getDailyStepCountSamples(options: Object, (err: Object, res: Array) => { if(this._handleHealthKitError(err, 'getDailyStepCountSamples')){ diff --git a/examples/StepsDemo/app/components/home/index.js b/examples/StepsDemo/app/components/home/index.js index b9b38cacf20ffab827acdf487876bf21341074ee..dc0a0623c634c1c6c14d16dcc4b7e116a212be84 100644 --- a/examples/StepsDemo/app/components/home/index.js +++ b/examples/StepsDemo/app/components/home/index.js @@ -108,6 +108,7 @@ class Home extends Component { if(this._handleHKError(err, 'getDailyStepCountSamples')){ return; } + console.log('res: ', res); this.setState({stepHistory: res}); }); }