getDailyStepCountSamples().md 679 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Get the total steps per day over a specified date range.

`getDailyStepCountSamples` accepts an options object containing required *`startDate: ISO8601Timestamp`* and optional *`endDate: ISO8601Timestamp`*. If `endDate` is not provided it will default to the current time
```javascript
let options = {
    startDate: (new Date(2016,1,1)).toISOString() // required
    endDate:   (new Date()).toISOString() // optional; default now
};
```

```javascript
 AppleHealthkit.getDailyStepCountSamples(options: Object, (err: Object, results: Array<Object>) => {
    if (this._handleHealthkitError(err, 'getDailyStepCountSamples')) {
        return;
    }
    console.log(results)
});
```