IgnisDa / ryot

Roll your own tracker!
https://app.ryot.io
GNU General Public License v3.0
1.61k stars 43 forks source link

API Docs / examples #795

Closed skr32 closed 1 month ago

skr32 commented 1 month ago

Hi, I'm trying to create a script to import body measurements from WeightGuru (I can't use OpenScale since I have a iPhone:(). I figured out the GraphQL IDE page at /backend/graphql but I'm struggling to figure out on how to create a post request to add a new measurement. Can you provide me with a example for that? Otherwise I'd have to go the selenium way.

Thanks You!

skr32 commented 1 month ago

Never mind, I just figured it out: mutation addUserMeasurement { createUserMeasurement( input: { timestamp: "2024-04-28T17:30:15+05:30", name: "test", comment: "", stats: { weight: 10 } } ) }

Do you think its worth to add WeightGuru as an implementation? WightGuru is the default App that came with my Bluetooth Scale. Also I can't find a place to list and revoke API Tokens.

IgnisDa commented 1 month ago

For importing measurements, i suggest you use the "Measurements Json" method for the import. You'll find it in the importing docs.

I have never used weight guru myself so unless many people demand this, I don't think I'll add it to Ryot.

There is no list for api tokens. They are Just jwt tokens and automatically expire after 90 days.