Skip to content

Commit

Permalink
More docs updates..
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillo committed Nov 10, 2018
1 parent cc7cb34 commit 950fe09
Show file tree
Hide file tree
Showing 34 changed files with 87 additions and 67 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# React Native Apple Healthkit
A React Native bridge module for interacting with Apple Healthkit data. Checkout the [full documentation](https://github.com/terrillo/rn-apple-healthkit/wiki)
A React Native bridge module for interacting with Apple Healthkit data. Checkout the [full documentation](https://github.com/terrillo/rn-apple-healthkit/tree/master/docs)

## Installation

Expand Down Expand Up @@ -80,6 +80,11 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) =>
0.6.4v
- Basal energy ([#23](https://github.com/terrillo/rn-apple-healthkit/pull/23))
- Fixed issues with saving weight in the past
- Commited the docs to increase pull request support
- Add daily samples for:
- Flights Climbed
- WalkingRunning Distance
- Cycling Distance

0.6.3v
- Food and Water ([#19](https://github.com/terrillo/rn-apple-healthkit/pull/19))
Expand All @@ -105,8 +110,8 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, results: Object) =>
* [getBloodPressureSamples](/docs/getbloodpressuresamples().md)
* [getBodyTemperatureSamples](/docs/getbodytemperaturesamples().md)
* [getDailyDistanceCyclingSamples]()
* [getDailyDistanceWalkingRunningSamples]()
* [getDailyFlightsClimbedSamples]()
* [getDailyDistanceWalkingRunningSamples](/docs/getDailyDistanceWalkingRunningSamples().md)
* [getDailyFlightsClimbedSamples](/docs/getDailyFlightsClimbedSamples().md)
* [getDailyStepCountSamples](/docs/getDailyStepCountSamples().md)
* [getDateOfBirth](/docs/getDateOfBirth().md)
* [getDistanceCycling](/docs/getdistancecycling().md)
Expand Down
35 changes: 0 additions & 35 deletions docs/Home.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/_isAvailable.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/getActiveEnergyBurned().md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let options = {
```

```javascript
AppleHealthkit.getActiveEnergyBurned(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getActiveEnergyBurned(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getBasalEnergyBurned().md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let options = {
```

```javascript
AppleHealthkit.getBasalEnergyBurned(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getBasalEnergyBurned(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getBiologicalSex().md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Get the biological sex (gender). If the `BiologicalSex` read permission is missi
| other | HKBiologicalSexOther |

```javascript
AppleHealthkit.getBiologicalSex(null, (err: Object, results: Object) => {
AppleHealthKit.getBiologicalSex(null, (err: Object, results: Object) => {
if (this._handleHealthkitError(err, 'getBiologicalSex')) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getBloodGlucoseSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Available units are: `'mmolPerL'`, `'mgPerdL'`.
The callback function will be called with a `samples` array containing objects with *value*, *startDate*, and *endDate* fields

```javascript
AppleHealthkit.getBloodGlucoseSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getBloodGlucoseSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getBloodPressureSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let options = {
The callback function will be called with a `samples` array containing objects with *bloodPressureSystolicValue*, *bloodPressureDiastolicValue*, *startDate*, and *endDate* fields

```javascript
AppleHealthkit.getBloodPressureSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getBloodPressureSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getBodyTemperatureSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Available units are: `'fahrenheit'`, `'celsius'`.
The callback function will be called with a `samples` array containing objects with *value*, *startDate*, and *endDate* fields.

```javascript
AppleHealthkit.getBodyTemperatureSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getBodyTemperatureSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
17 changes: 17 additions & 0 deletions docs/getDailyDistanceCyclingSamples().md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
let options = {
startDate: (new Date(2016,4,27)).toISOString(), // required
endDate: (new Date()).toISOString(), // optional; default now
ascending: false, // optional; default false
limit:10, // optional; default no limit
};
```

```javascript
AppleHealthKit.getDailyDistanceCyclingSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
console.log(results)
});
```
17 changes: 17 additions & 0 deletions docs/getDailyDistanceWalkingRunningSamples().md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
let options = {
startDate: (new Date(2016,4,27)).toISOString(), // required
endDate: (new Date()).toISOString(), // optional; default now
ascending: false, // optional; default false
limit:10, // optional; default no limit
};
```

```javascript
AppleHealthKit.getDailyDistanceWalkingRunningSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
console.log(results)
});
```
17 changes: 17 additions & 0 deletions docs/getDailyFlightsClimbedSamples().md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
let options = {
startDate: (new Date(2016,4,27)).toISOString(), // required
endDate: (new Date()).toISOString(), // optional; default now
ascending: false, // optional; default false
limit:10, // optional; default no limit
};
```

```javascript
AppleHealthKit.getDailyFlightsClimbedSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
console.log(results)
});
```
2 changes: 1 addition & 1 deletion docs/getDailyStepCountSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let options = {
```

```javascript
AppleHealthkit.getDailyStepCountSamples(options: Object, (err: Object, results: Array<Object>) => {
AppleHealthKit.getDailyStepCountSamples(options: Object, (err: Object, results: Array<Object>) => {
if (this._handleHealthkitError(err, 'getDailyStepCountSamples')) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getDateOfBirth().md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Get the date of birth.

On success, the callback function will be provided with a `res` object containing dob `value: string` (ISO timestamp), and `age: number` (age in years):
```javascript
AppleHealthkit.getDateOfBirth(null, (err: Object, results: Object) => {
AppleHealthKit.getDateOfBirth(null, (err: Object, results: Object) => {
if (this._handleHealthkitError(err, 'getDateOfBirth')) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getDistanceCycling().md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let options = {
```

```javascript
AppleHealthkit.getDistanceCycling(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getDistanceCycling(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getDistanceWalkingRunning().md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let options = {
```

```javascript
AppleHealthkit.getDistanceWalkingRunning(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getDistanceWalkingRunning(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getFlightsClimbed().md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let options = {
```

```javascript
AppleHealthkit.getFlightsClimbed(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getFlightsClimbed(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getHeartRateSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let options = {

The callback function will be called with a `samples` array containing objects with *value*, *startDate*, and *endDate* fields
```javascript
AppleHealthkit.getHeartRateSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getHeartRateSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getHeightSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let options = {
```

```javascript
AppleHealthkit.getHeightSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getHeightSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getLatestBmi().md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Get the most recent BMI sample.

On success, the callback function will be provided with a `bmi` object containing the BMI `value`, and the `startDate` and `endDate` of the sample. *Note: startDate and endDate will be the same as bmi samples are saved at a specific point in time.*
```javascript
AppleHealthkit.getLatestBmi(null, (err: string, results: Object) => {
AppleHealthKit.getLatestBmi(null, (err: string, results: Object) => {
if (err) {
console.log("error getting latest bmi data: ", err);
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/getLatestBodyFatPercentage().md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Get the most recent body fat percentage. The percentage value is a number betwee
On success, the callback function will be provided with a `bodyFatPercentage` object containing the body fat percentage `value`, and the `startDate` and `endDate` of the sample. *Note: startDate and endDate will be the same as bodyFatPercentage samples are saved at a specific point in time.*

```javascript
AppleHealthkit.getLatestBodyFatPercentage(null, (err: Object, results: Object) => {
AppleHealthKit.getLatestBodyFatPercentage(null, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getLatestHeight().md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Get the most recent height value.
On success, the callback function will be provided with a `height` object containing the height `value`, and the `startDate` and `endDate` of the height sample. *Note: startDate and endDate will be the same as height samples are saved at a specific point in time.*

```javascript
AppleHealthkit.getLatestHeight(null, (err: string, results: Object) => {
AppleHealthKit.getLatestHeight(null, (err: string, results: Object) => {
if (err) {
console.log("error getting latest height: ", err);
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/getLatestLeanBodyMass().md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Get the most recent lean body mass. The value is a number representing the weigh
On success, the callback function will be provided with a `leanBodyMass` object containing the leanBodyMass `value`, and the `startDate` and `endDate` of the sample. *Note: startDate and endDate will be the same as leanBodyMass samples are saved at a specific point in time.*

```javascript
AppleHealthkit.getLatestLeanBodyMass(null, (err: Object, results: Object) => {
AppleHealthKit.getLatestLeanBodyMass(null, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getLatestWeight().md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let options = {
```

```javascript
AppleHealthkit.getLatestWeight(options, (err: string, results: Object) => {
AppleHealthKit.getLatestWeight(options, (err: string, results: Object) => {
if (err) {
console.log("error getting latest weight: ", err);
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/getRespiratoryRateSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let options = {
The callback function will be called with a `samples` array containing objects with *value*, *startDate*, and *endDate* fields

```javascript
AppleHealthkit.getRespiratoryRateSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getRespiratoryRateSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getSleepSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The callback function will be called with a `samples` array containing objects
with *value*, *startDate*, and *endDate* fields

```javascript
AppleHealthkit.getSleepSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getSleepSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getStepCount().md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let options = {
```

```javascript
AppleHealthkit.getStepCount(options: Object, (err: Object, results: Object) => {
AppleHealthKit.getStepCount(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getWeightSamples().md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let options = {
```

```javascript
AppleHealthkit.getWeightSamples(options, (err: Object, results: Array<Object>) => {
AppleHealthKit.getWeightSamples(options, (err: Object, results: Array<Object>) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/initStepCountObserver().md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ listen to the NativeAppEventEmitter `change:steps` event and re-fetch relevent
step count data in the event handler.

The `initStepCountObserver` method should be called after Healthkit has been
successfully initialized (AppleHealthkit.initHealthKit has been called without
successfully initialized (AppleHealthKit.initHealthKit has been called without
error).

```javascript
Expand Down
2 changes: 1 addition & 1 deletion docs/isAvailable().md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Check for Healthkit availability

```javascript
import AppleHealthkit from 'rn-apple-healthkit';
import AppleHealthKit from 'rn-apple-healthkit';

AppleHealthKit.isAvailable((err: Object, available: boolean) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion docs/saveBmi().md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let options = {
}
```
```javascript
AppleHealthkit.saveBmi(options: Object, (err: Object, results: Object) => {
AppleHealthKit.saveBmi(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/saveHeight().md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let options = {
```

```javascript
AppleHealthkit.saveHeight(options: Object, (err: Object, results: Object) => {
AppleHealthKit.saveHeight(options: Object, (err: Object, results: Object) => {
if (err) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/saveSteps().md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let options = {
```

```javascript
AppleHealthkit.saveSteps(options, (err, res) => {
AppleHealthKit.saveSteps(options, (err, res) => {
if (this._handleHKError(err, 'saveSteps')) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/saveWeight().md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let options = {
```

```javascript
AppleHealthkit.saveWeight(options: Object, (err: Object, results: Object) => {
AppleHealthKit.saveWeight(options: Object, (err: Object, results: Object) => {
if (err) {
console.log("error saving weight to Healthkit: ", err);
return;
Expand Down

0 comments on commit 950fe09

Please sign in to comment.