From 72126472ad267df8a4ce13a38ff027b4c0ad1c7b Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Wed, 29 Jun 2016 18:41:30 -0400 Subject: [PATCH] updated readme --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a9168af..3d1e463 100644 --- a/README.md +++ b/README.md @@ -197,8 +197,42 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, res: Object) => { ___ +#### **`getBiologicalSex`** +get the biological sex (gender). if the `BiologicalSex` read permission is missing or the user has denied it then the value will be `unknown`. the possible values are: +| Value | HKBiologicalSex | +|---------|-----------------------| +| unknown | HKBiologicalSexNotSet | +| male | HKBiologicalSexMale | +| female | HKBiologicalSexFemale | +| other | HKBiologicalSexOther | + +```javascript +AppleHealthKit.getBiologicalSex(null, (err: Object, bioSex: string) => { + if(this._handleHealthKitError(err, 'getBiologicalSex')){ + return; + } + // use bioSex ... +}); +``` + +___ + +#### **`getDateOfBirth`** +get the date of birth. this will be an ISO timestamp + +```javascript +AppleHealthKit.getDateOfBirth(null, (err: Object, dob: string) => { + if(this._handleHealthKitError(err, 'getDateOfBirth')){ + return; + } + // use dob ... +}); +``` + +___ + #### **`getStepCountForToday`** -get the the aggregated total steps for the current day starting and ending at midnight +get the aggregated total steps for the current day starting and ending at midnight ```javascript AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => { if(this._handleHealthKitError(err, 'getStepCountForToday')){ -- 2.26.2