Commit ea00912f authored by skleest's avatar skleest

update readme

parent 0e38039f
...@@ -42,6 +42,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data. ...@@ -42,6 +42,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data.
* [getRespiratoryRateSamples](#getrespiratoryratesamples) * [getRespiratoryRateSamples](#getrespiratoryratesamples)
* [getBloodGlucoseSamples](#getbloodglucosesamples) * [getBloodGlucoseSamples](#getbloodglucosesamples)
* [getSleepSamples](#getsleepsamples) * [getSleepSamples](#getsleepsamples)
* [saveMindfulSession](#saveMindfulSession)
* [Examples](#examples) * [Examples](#examples)
...@@ -155,7 +156,8 @@ The available HealthKit permissions to use with `initHealthKit` ...@@ -155,7 +156,8 @@ The available HealthKit permissions to use with `initHealthKit`
| BloodGlucose | [HKQuantityTypeIdentifierBloodGlucose](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierbloodglucose?language=objc) | ✓ | | BloodGlucose | [HKQuantityTypeIdentifierBloodGlucose](https://developer.apple.com/reference/healthkit/hkquantitytypeidentifierbloodglucose?language=objc) | ✓ |
| |
| SleepAnalysis | [HKCategoryTypeIdentifierSleepAnalysis](https://developer.apple.com/reference/healthkit/hkcategorytypeidentifiersleepanalysis?language=objc) | ✓ | | SleepAnalysis | [HKCategoryTypeIdentifierSleepAnalysis](https://developer.apple.com/reference/healthkit/hkcategorytypeidentifiersleepanalysis?language=objc) | ✓ |
| | MindfulSession | [HKCategoryTypeIdentifierMindfulSession](https://developer.apple.com/reference/healthkit/hkcategorytypeidentifiermindfulsession?language=objc) | | ✓ |
These permissions are exported as constants of the `react-native-apple-healthkit` module. These permissions are exported as constants of the `react-native-apple-healthkit` module.
...@@ -911,6 +913,20 @@ AppleHealthKit.getSleepSamples(options, (err: Object, samples: Array<Object>) => ...@@ -911,6 +913,20 @@ AppleHealthKit.getSleepSamples(options, (err: Object, samples: Array<Object>) =>
}); });
``` ```
___
#### **`saveMindfulSession`**
saveMindfulSession
each mindfulness sample represents a period of time with a startDate and an endDate.
the options must contain `startDate` and `endDate`
```javascript
let options = {
startDate: (new Date(2016,10,1)).toISOString(), // required
endDate: (new Date()).toISOString(), // optional; default now
};
```
## Examples ## Examples
......
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