Lybron / health-auto-export

This repository provides documentation for the API Export feature of Health Auto Export.
https://healthyapps.dev
112 stars 5 forks source link

Complete Data-Model of JSON Export #4

Closed psanwald closed 2 years ago

psanwald commented 3 years ago

Hello there and thank you for enabling access to apple health data via api with your app. I had no problems setting up the app, a secure api interface and got it up and running within 5 minutes.

Now I want to parse the JSON-Data to a corresponding PHP-Class with the ability to save and evaluate them. The metrics itself seem to be easy to adapt, but the data within them are of course different from each other. I checked apple's dev docs, but the orginal data seems to be proprietary and different from the exported JSON objects. Also, in the example data (for testing the connection) most data fields are empty. Can you provide a data model (or full example) of the JSON Export from your app? Also, Iam lazy by nature, so I don't want to write 80 classes with 80 more data classes. Do you have any suggestions on how to keep the structure simple and not lose the ability to adapt/upgrade, when the model of the app has changed i.e. in future versions? My idea is to have 2 classes to start with. Like a metrics class (with the name as UID) and a data class. I would set aside the workout and other categories at first.

Lybron commented 2 years ago

I should probably close this one now.

Documentation is available here