cyberjunky / python-garminconnect

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

New methods: get and delete activity by id #187

Closed lrybak closed 7 months ago

lrybak commented 10 months ago

Hi Ron, thank you for the very useful software. I would like to ask if it would be possible to add a method that allows:

Garmin is not counting my zwift indoor rides to badges trophies and I writing myself kind of script to convert that rides to "garmin virtual rides". Above methods would help me with that.

thienlamc commented 9 months ago

butailijie

psdupvi commented 8 months ago

I can take a look at this if no one else has

psdupvi commented 8 months ago

It looks like the function currently called get_activity_evaluation , which accepts an activity id, actually returns the full activity summary JSON. Also, separately, download_activity accepts the activity ID and the format you'd like to download, and downloads the file for you.

I'll create a PR to rename get_activity_evaluation to get_activity, but in the meantime you can use that to retrieve activites by ID

Separately, I'll work on an activity deletion endpoint

psdupvi commented 8 months ago

PR https://github.com/cyberjunky/python-garminconnect/pull/191

cyberjunky commented 8 months ago

@lrybak I added the code from @psdupvi to version 0.2.14, can you check?

cyberjunky commented 7 months ago

A bit stale, so closing, if still an issue please (re)open one!