Skip to content

Conversation

agilst
Copy link

@agilst agilst commented Jul 28, 2025

IMPORTANT: It is mandatory to merge both #1193 and #1194 before merging this PR as it's depend on getHealthDataByUUID method in #1193 and #1194 PRs.

writeWorkoutData is now returns HealthDataPoint instead of boolean. Failed writing health data will return null instead.

agilst and others added 2 commits July 18, 2025 15:53
- Add write single health data example
- Add write single workout data example
@iarata iarata changed the base branch from master to health13/prs August 31, 2025 15:58
@iarata
Copy link
Contributor

iarata commented Aug 31, 2025

@agilst I'm thinking, the way this is implemented now might result in faster API rate limits on the device, since now you are doing WRITE & READ instead of just WRITE. Wouldn't it make more sense to generate the object before writing and then return it when writing is successful and null otherwise?

@agilst
Copy link
Author

agilst commented Sep 1, 2025

@iarata you're right. At this stage, I don't think generate the object before writing is a good idea as we already have getHealthDataByUUID. Probably only returns the health uuid or null is all we need then can freely decide to utilise getHealthDataByUUID if need the health object. I think that is the best way to keep the health object structure persistent.

I'll proceed with the changes if you agree. or let me know if you have another suggestion.

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