Skip to content
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

docs: Update getSamples.md #180

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

bobbyjcolley
Copy link
Contributor

Description

Resolves #81 by adding a table with permissions and a sample permissions object

Fixes #81

Type of change

Documentation update

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have checked my code and corrected any misspellings

@bobbyjcolley
Copy link
Contributor Author

bobbyjcolley commented Nov 14, 2021

Hi React Native Health!

I'm considering this a WIP PR since I did some digging around and wanted to make sure I was clear on what getSamples can return. The current documentation for getSamples describes the options object as a HealthInputOptions object. Thus, the type of options object would be a 'HealthObserver' enum property, which only 5 are listed currently in the documentation:

https://github.com/agencyenterprise/react-native-health/blob/master/docs/getSamples.md#getsamples

let options = {
  startDate: new Date(2021, 0, 0).toISOString(),
  endDate: new Date().toISOString(),
  type: 'Walking', // one of: ['Walking', 'StairClimbing', 'Running', 'Cycling', 'Workout']
}

Should the documentation be updated to reflect all the properties of the HealthObserver enum? Or can getSamples only receive these 5 types?

If so, I will update the permissions table to make sure to account for everything here.

Otherwise, I can make a separate enum for this 'GetSamplesOptionsType' and update the types correctly.

@ruan-azevedo ruan-azevedo changed the base branch from master to development January 25, 2023 15:31
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.

Update the documentation to add the permission necessary on getSamples
2 participants