Commit 359d5e1b authored by Greg Wilson's avatar Greg Wilson Committed by GitHub

added saveBMI method docs

parent 5005b86a
...@@ -18,6 +18,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data. ...@@ -18,6 +18,7 @@ A React Native bridge module for interacting with [Apple HealthKit] data.
* [getLatestHeight](#getlatestheight) * [getLatestHeight](#getlatestheight)
* [saveHeight](#saveheight) * [saveHeight](#saveheight)
* [getLatestBmi](#getlatestbmi) * [getLatestBmi](#getlatestbmi)
* [saveBmi](#savebmi)
* [getLatestBodyFatPercentage](#getlatestbodyfatpercentage) * [getLatestBodyFatPercentage](#getlatestbodyfatpercentage)
* [getLatestLeanBodyMass](#getlatestleanbodymass) * [getLatestLeanBodyMass](#getlatestleanbodymass)
* [Examples](#examples) * [Examples](#examples)
...@@ -266,6 +267,24 @@ AppleHealthKit.getLatestBmi(null, (err: string, bmi: Object) => { ...@@ -266,6 +267,24 @@ AppleHealthKit.getLatestBmi(null, (err: string, bmi: Object) => {
___ ___
#### **`saveBmi`**
save a numeric BMI value to HealthKit
`saveBmi` accepts an options object containing a numeric BMI value:
```javascript
let options = {value: 27.2}
```
```javascript
AppleHealthKit.saveBmi(options, (err, res) => {
if(this._handleHealthKitError(err, 'saveBmi')){
return;
}
// BMI successfully saved
});
```
___
#### **`getLatestBodyFatPercentage`** #### **`getLatestBodyFatPercentage`**
get the most recent body fat percentage. the percentage value is a number between 0 and 100 get the most recent body fat percentage. the percentage value is a number between 0 and 100
```javascript ```javascript
......
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