-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example to very method, fix types, convert example output to JSON
- Loading branch information
Showing
58 changed files
with
956 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
# getActiveEnergyBurned | ||
|
||
A quantity sample type that measures the amount of active energy the user has burned. | ||
|
||
Example input options: | ||
|
||
```javascript | ||
let d = new Date(2016, 1, 1) | ||
let options = { | ||
startDate: new Date(2016, 10, 1).toISOString(), // required | ||
startDate: new Date(2021, 0, 0).toISOString(), // required | ||
endDate: new Date().toISOString(), // optional; default now | ||
} | ||
``` | ||
|
||
Call the method: | ||
|
||
```javascript | ||
AppleHealthKit.getActiveEnergyBurned( | ||
(options: Object), | ||
(err: Object, results: Object) => { | ||
(options: HealthInputOptions), | ||
(err: Object, results: HealthValue) => { | ||
if (err) { | ||
return | ||
} | ||
console.log(results) | ||
}, | ||
) | ||
``` | ||
|
||
Example output: | ||
|
||
```json | ||
[ | ||
{ | ||
"endDate": "2021-03-22T16:00:00.000-0300", | ||
"startDate": "2021-03-22T15:00:00.000-0300", | ||
"value": 123 | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
# getAppleStandTime | ||
|
||
A quantity sample type that measures the amount of time the user has spent standing. | ||
|
||
Example input options: | ||
|
||
```javascript | ||
let d = new Date(2016, 1, 1) | ||
let options = { | ||
startDate: new Date(2016, 10, 1).toISOString(), // required | ||
startDate: new Date(2021, 0, 0).toISOString(), // required | ||
endDate: new Date().toISOString(), // optional; default now | ||
} | ||
``` | ||
|
||
Call the method: | ||
|
||
```javascript | ||
AppleHealthKit.getAppleStandTime( | ||
(options: Object), | ||
(err: Object, results: Object) => { | ||
(options: HealthInputOptions), | ||
(err: Object, results: HealthValue) => { | ||
if (err) { | ||
return | ||
} | ||
console.log(results) | ||
}, | ||
) | ||
``` | ||
|
||
Example output: | ||
|
||
```json | ||
[ | ||
{ | ||
"endDate": "2021-03-22T16:00:00.000-0300", | ||
"startDate": "2021-03-22T15:00:00.000-0300", | ||
"value": 123 | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
# getBasalEnergyBurned | ||
|
||
A quantity sample type that measures the amount of energy burned. | ||
|
||
Example input options: | ||
|
||
```javascript | ||
let d = new Date(2016, 1, 1) | ||
let options = { | ||
startDate: new Date(2018, 10, 1).toISOString(), // required | ||
endDate: new Date().toISOString(), // optional; default now | ||
} | ||
``` | ||
|
||
Call the method: | ||
|
||
```javascript | ||
AppleHealthKit.getBasalEnergyBurned( | ||
(options: Object), | ||
(err: Object, results: Object) => { | ||
(options: HealthInputOptions), | ||
(err: Object, results: HealthValue) => { | ||
if (err) { | ||
return | ||
} | ||
console.log(results) | ||
}, | ||
) | ||
``` | ||
|
||
Example output: | ||
|
||
```json | ||
[ | ||
{ | ||
"endDate": "2021-03-22T17:00:00.000-0300", | ||
"startDate": "2021-03-22T16:00:00.000-0300", | ||
"value": 42 | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.