Commit f388c49f authored by Greg Wilson's avatar Greg Wilson

update readme

parent 198bdd7d
...@@ -308,7 +308,17 @@ let options = { ...@@ -308,7 +308,17 @@ let options = {
endDate: (new Date()).toISOString() // optional; default now 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 ```javascript
AppleHealthKit.getDailyStepCountSamples(options: Object, (err: Object, res: Array<Array<Object>) => { AppleHealthKit.getDailyStepCountSamples(options: Object, (err: Object, res: Array<Array<Object>) => {
if(this._handleHealthKitError(err, 'getDailyStepCountSamples')){ if(this._handleHealthKitError(err, 'getDailyStepCountSamples')){
......
...@@ -108,6 +108,7 @@ class Home extends Component { ...@@ -108,6 +108,7 @@ class Home extends Component {
if(this._handleHKError(err, 'getDailyStepCountSamples')){ if(this._handleHKError(err, 'getDailyStepCountSamples')){
return; return;
} }
console.log('res: ', res);
this.setState({stepHistory: res}); this.setState({stepHistory: res});
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment