Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I and some of my colleagues used this library to get user's calories for a specific time period as we want to record people's workouts in our app. The problem that we faced was that we could not get the Total Calories from an Apple Watch workout. The description of getActiveEnergyBurned and getBasalEnergyBurned in docs were the same, so not knowing what 'basal' means we kind of ignored it. We wanted to obtain the total calories which is the sum of the two but were pointed on the wrong track due to the wording of the docs. I am sure others have had the same confusion and thus I wanted to improve the docs a little bit so that other people figure out faster the idea of active, resting and total calories.
Also, I added some of the options we needed but again, didn't know existed at the beginning (figured out waaay later) as that meant looking into the library for interfaces, it is not obvious especially for javascript files that do not support interfaces. I hope this might help people understand the library faster and not spend time looking everywhere for answers.
Side note, most people use typescript these days, so I think it would be very beneficial if the docs were rewritten with the necessary interfaces, such as the
options
variable in my PR (I did not add the interface since it would not be consistent with the docs). People using typescript can import it and javascript users know what to look for to see the content of the interfaces. So if someone is willing to do that and if who's reviewing the PRs agrees, I think that would be very helpful.Checklist: