Skip to content

Get Energy Doc Fixes #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2023
Merged

Conversation

sash20m
Copy link

@sash20m sash20m commented Mar 27, 2023

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:

  • [+] I have made corresponding changes to the documentation
  • [+] I have checked my code and corrected any misspellings

@GGGava GGGava self-requested a review July 3, 2023 09:15
@GGGava
Copy link
Contributor

GGGava commented Jul 3, 2023

Amazing, thank you for your contribution :)

@GGGava GGGava merged commit 2fa62bf into agencyenterprise:master Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants