Skip to content

Commit

Permalink
Update README content
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspbordignon committed Oct 3, 2020
1 parent e523865 commit 46c9beb
Show file tree
Hide file tree
Showing 60 changed files with 502 additions and 200 deletions.
332 changes: 153 additions & 179 deletions README.md

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions docs/Permissions.md

This file was deleted.

84 changes: 84 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Documentation

### Constants
* [Activities](activities.md)
* [Observers](observers.md)
* [Permissions](permissions.md)
* [Units](units.md)

### Base Methods
* [isAvailable](isAvailable.md)
* [initHealthKit](initHealthKit.md)
* [authorizationStatusForType](authorizationStatusForType.md)

### Background Methods
* [initStepCountObserver](initStepCountObserver.md)
* [setObserver](setObserver.md)

### Activity Methods
* [getActiveEnergyBurned](getActiveEnergyBurned.md)
* [getBasalEnergyBurned](getBasalEnergyBurned.md)

### Body Methods
* [getLatestHeight](getLatestHeight.md)
* [getLatestWeight](getLatestWeight.md)
* [getHeightSamples](getHeightSamples.md)
* [getWeightSamples](getWeightSamples.md)
* [getBodyTemperatureSamples](getBodyTemperatureSamples.md)
* [getLatestBodyFatPercentage](getLatestBodyFatPercentage.md)
* [getBodyFatPercentageSamples](getBodyFatPercentageSamples.md)
* [getLatestLeanBodyMass](getLatestLeanBodyMass.md)
* [getLeanBodyMassSamples](getLeanBodyMassSamples.md)
* [saveHeight](saveHeight.md)
* [saveWeight](saveWeight.md)
* [saveBodyFatPercentage](saveBodyFatPercentage.md)
* [saveLeanBodyMass](saveLeanBodyMass.md)

### Characteristic Methods
* [getBiologicalSex](getBiologicalSex.md)
* [getDateOfBirth](getDateOfBirth.md)

### Dietary Methods
* [saveFood](saveFood.md)
* [saveWater](saveWater.md)

### Fitness Methods
* [getDailyStepCountSamples](getDailyStepCountSamples.md)
* [getStepCount](getStepCount.md)
* [getSamples](docs/getSamples.md)
* [getDailyDistanceWalkingRunningSamples](getDailyDistanceWalkingRunningSamples.md)
* [getDistanceWalkingRunning](getDistanceWalkingRunning.md)
* [getDistanceSwimming](getDistanceSwimming.md)
* [getDailyDistanceCyclingSamples](getDailyDistanceCyclingSamples.md)
* [getDistanceCycling](getDistanceCycling.md)
* [getDailyFlightsClimbedSamples](getDailyFlightsClimbedSamples.md)
* [getFlightsClimbed](getFlightsClimbed.md)
* [saveSteps](saveSteps.md)

### Lab Tests Methods
* [getBloodAlcoholContentSamples](getBloodAlcoholContentSamples.md)
* [getBloodGlucoseSamples](getBloodglucoseSamples.md)
* [getLatestBloodAlcoholContent](getLatestBloodAlcoholContent.md)
* [saveBloodAlcoholContent](saveBloodAlcoholContent.md)
* [saveBloodGlucoseSample](saveBloodGlucoseSample.md)

### Mindfulness Methods
* [getMindfulSession](docs/getMindfulSession.md)
* [saveMindfulSession](saveMindfulSession.md)

### Sleep Methods
* [getSleepSamples](getSleepSamples.md)

#### Vitals Methods
* [getBloodPressureSamples](getBloodPressureSamples.md)
* [getHeartRateSamples](getHeartRateSamples.md)
* [getHeartRateVariabilitySamples](getHeartRateVariabilitySamples.md)
* [getRestingHeartRateSamples](getRestingHeartRateSamples.md)
* [getVo2MaxSamples](getVo2MaxSamples.md)
* [getLatestBmi](getLatestBmi.md)
* [getRespiratoryRateSamples](getRespiratoryRateSamples.md)
* [saveBmi](saveBmi.md)

#### Workout Methods
* [getWorkout](getWorkout.md)
* [saveWorkout](saveWorkout.md)
78 changes: 78 additions & 0 deletions docs/activities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Activities

The following activities are supported by the library

```
AmericanFootball
Archery
AustralianFootball
Badminton
Baseball
Basketball
Bowling
Boxing
Climbing
Cricket
CrossTraining
Curling
Cycling
Dance
Elliptical
EquestrianSports
Fencing
Fishing
FunctionalStrengthTraining
Golf
Gymnastics
Handball
Hiking
Hockey
Hunting
Lacrosse
MartialArts
MindAndBody
PaddleSports
Play
PreparationAndRecovery
Racquetball
Rowing
Rugby
Running
Sailing
SkatingSports
SnowSports
Soccer
Softball
Squash
StairClimbing
SurfingSports
Swimming
TableTennis
Tennis
TrackAndField
TraditionalStrengthTraining
Volleyball
Walking
WaterFitness
WaterPolo
WaterSports
Wrestling
Yoga
Barre
CoreTraining
CrossCountrySkiing
DownhillSkiing
Flexibility
HighIntensityIntervalTraining
JumpRope
Kickboxing
Pilates
Snowboarding
Stairs
StepTraining
WheelchairWalkPace
WheelchairRunPace
TaiChi
MixedCardio
HandCycling
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/getWorkout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Get Workout

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions docs/observers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Observers

The following observer types are supported by the library

```
Cycling
HeartRate
RestingHeartRate
Running
StairClimbing
Walking
Workout
```
126 changes: 126 additions & 0 deletions docs/permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Permissions

These permissions are exported as constants of the `react-native-health` module.

```typescript
import AppleHealthKit, { HealthValue, HealthKitPermissions } from 'react-native-health';

/* Permission options */
const permissions = {
permissions: {
read: [
AppleHealthKit.Constants.Permissions.HeartRate,
],
write: [
AppleHealthKit.Constants.Permissions.Steps,
],
}
} as HealthKitPermissions


AppleHealthKit.initHealthKit(permissions, (error: string) => {
/* Called after we receive a response from the system */
```
## Available Permissions
```
ActiveEnergyBurned
AppleExerciseTime
BasalEnergyBurned
BiologicalSex
BloodAlcoholContent
BloodGlucose
BloodPressureDiastolic
BloodPressureSystolic
BodyFatPercentage
BodyMass
BodyMassIndex
BodyTemperature
DateOfBirth
Biotin
Caffeine
Calcium
Carbohydrates
Chloride
Cholesterol
Copper
EnergyConsumed
FatMonounsaturated
FatPolyunsaturated
FatSaturated
FatTotal
Fiber
Folate
Iodine
Iron
Magnesium
Manganese
Molybdenum
Niacin
PantothenicAcid
Phosphorus
Potassium
Protein
Riboflavin
Selenium
Sodium
Sugar
Thiamin
VitaminA
VitaminB12
VitaminB6
VitaminC
VitaminD
VitaminE
VitaminK
Zinc
Water
DistanceCycling
DistanceWalkingRunning
FlightsClimbed
HeartRate
RestingHeartRate
HeartRateVariability
Height
LeanBodyMass
MindfulSession
NikeFuel
RespiratoryRate
SleepAnalysis
StepCount
Steps
Vo2Max
Weight
Workout
```
## Supported Apple Permissions
The available Healthkit identifiers are supported
| Permission | Healthkit Identifier Type | Read | Write |
|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|-------|
| ActiveEnergyBurned | [HKQuantityTypeIdentifierActiveEnergyBurned](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/1615771-activeenergyburned?language=objc) | ✓ | |
| BasalEnergyBurned | [HKQuantityTypeIdentifierBasalEnergyBurned](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/1615512-basalenergyburned?language=objc) | ✓ | |
| BiologicalSex | [HKCharacteristicTypeIdentifierBiologicalSex](https://developer.apple.com/reference/Healthkit/hkcharacteristictypeidentifierbiologicalsex?language=objc) | ✓ | |
| BloodAlcoholContent | [HKQuantityTypeIdentifierBloodAlcoholContent](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbloodalcoholcontent?language=objc) | ✓ | ✓ |
| BloodGlucose | [HKQuantityTypeIdentifierBloodGlucose](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbloodglucose?language=objc) | ✓ | |
| BloodPressureDiastolic | [HKQuantityTypeIdentifierBloodPressureDiastolic](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressurediastolic?language=objc) | ✓ | ✓ |
| BloodPressureSystolic | [HKQuantityTypeIdentifierBloodPressureSystolic](https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodpressuresystolic?language=objc) | ✓ | ✓ |
| BodyMassIndex | [HKQuantityTypeIdentifierBodyMassIndex](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodymassindex?language=objc) | ✓ | ✓ |
| BodyTemperature | [HKQuantityTypeIdentifierBodyTemperature](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodytemperature?language=objc) | ✓ | |
| DateOfBirth | [HKCharacteristicTypeIdentifierDateOfBirth](https://developer.apple.com/reference/Healthkit/hkcharacteristictypeidentifierdateofbirth?language=objc) | ✓ | |
| DistanceCycling | [HKQuantityTypeIdentifierDistanceCycling](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierdistancecycling?language=objc) | ✓ | ✓ |
| DistanceWalkingRunning | [HKQuantityTypeIdentifierDistanceWalkingRunning](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierdistancewalkingrunning?language=objc) | ✓ | ✓ |
| FlightsClimbed | [HKQuantityTypeIdentifierFlightsClimbed](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierflightsclimbed?language=objc) | ✓ | ✓ |
| HeartRate | [HKQuantityTypeIdentifierHeartRate](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierheartrate?language=objc) | ✓ | |
| Height | [HKQuantityTypeIdentifierHeight](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierheight?language=objc) | ✓ | ✓ |
| LeanBodyMass | [HKQuantityTypeIdentifierLeanBodyMass](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierleanbodymass?language=objc) | ✓ | ✓ |
| MindfulSession | [HKCategoryTypeIdentifierMindfulSession](https://developer.apple.com/reference/healthkit/hkcategorytypeidentifiermindfulsession?language=objc) | | ✓ |
| RespiratoryRate | [HKQuantityTypeIdentifierRespiratoryRate](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierrespiratoryrate?language=objc) | ✓ | |
| SleepAnalysis | [HKCategoryTypeIdentifierSleepAnalysis](https://developer.apple.com/reference/Healthkit/hkcategorytypeidentifiersleepanalysis?language=objc) | ✓ | |
| StepCount | [HKQuantityTypeIdentifierStepCount](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierstepcount?language=objc) | ✓ | ✓ |
| Steps | [HKQuantityTypeIdentifierSteps](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifiersteps?language=objc) | ✓ | ✓ |
| Weight | [HKQuantityTypeIdentifierBodyMass](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodymass?language=objc) | ✓ | ✓ |
| BodyFatPercentage | [HKQuantityTypeIdentifierBodyFatPercentage](https://developer.apple.com/reference/Healthkit/hkquantitytypeidentifierbodyfatpercentage?language=objc) | ✓ | ✓ |
4 changes: 4 additions & 0 deletions docs/saveBloodAlcoholContent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Save BloodAlcoholContent

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR
5 changes: 5 additions & 0 deletions docs/saveBloodGlucoseSample.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Save BloodGlucoseContent

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR

File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/saveFood.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Save Food

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/saveWater.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Save Water

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/saveWorkout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Save Workout

> Oops! Seems that we don't have documentation for this method yet. Feel free to contribute opening a new PR
File renamed without changes.
27 changes: 27 additions & 0 deletions docs/units.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Units

The following units are supported by the library

```
bpm
calorie
celsius
count
day
fahrenheit
foot
gram
hour
inch
joule
meter
mgPerdL
mile
minute
mmhg
mmolPerL
percent
pound
second
mlPerKgMin
```

0 comments on commit 46c9beb

Please sign in to comment.