cyberjunky / python-garminconnect

Python 3 API wrapper for Garmin Connect to get activity statistics
MIT License
963 stars 149 forks source link

Edit swimming activity #221

Open hadim opened 2 months ago

hadim commented 2 months ago

Is that possible to edit an activity from the Garmin API?

I am trying to remove a few laps from a swimming workout and tried using the FITCSVTool.jar method but the generated FIT file from the edited CSV does not seem to be valid when I try to upload it on Garmin Connect.

See https://forums.garmin.com/developer/fit-sdk/f/discussion/383704/how-to-edit-a-fit-file-swimming-activity

psdupvi commented 1 month ago

I see a way to edit the number of laps through the Garmin UI, which suggests that we can edit things like that through the UI (check out this PR: https://github.com/cyberjunky/python-garminconnect/pull/224 - which adds some activity update capability and you can probably tweak to edit lap numbers).

However, I don't see a way to truly remove laps and their data. The Fit method is probably your best bet, but that's not an area of my expertise -- I see you sort of had a solution but not really in that Garmin Forum thread

cyberjunky commented 1 week ago

@hadim Latest version contains the activity update calls, if you need or discovered anything let us know!

hadim commented 1 week ago

Thank you. Can you give more details or an example how to update a swimming activity given its id?