cyberjunky / python-garminconnect

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

Where is weight value stored in garmin activity for 'strength' type activities? #180

Closed mwcoleman closed 7 months ago

mwcoleman commented 7 months ago

using the .get_activities() method I can successfully get all of my past logged exercise activities from my account. I'm interested in working with the strength exercises. Each activity has totalSets and totalReps keys, but no key associated with weight/load that I can find. e.g. here are all the key/value pairs with numeric values for a typical logged strength activity:

{'activityId': 12949443775,
 'distance': 0.0,
 'duration': 1019.558,
 'elapsedDuration': 1019.5579833984375,
 'movingDuration': 273.74200439453125,
 'averageSpeed': 0.0,
 'ownerId': 117866458,
 'calories': 95.0,
 'bmrCalories': 26.0,
 'averageHR': 98.0,
 'maxHR': 134.0,
 'steps': 38,
 'timeZoneId': 140,
 'beginTimestamp': 1701499080000,
 'sportTypeId': 4,
 'aerobicTrainingEffect': 0.4000000059604645,
 'anaerobicTrainingEffect': 0.0,
 'workoutId': 786412842,
 'deviceId': 3460891529,
 'avgVerticalSpeed': 0.0,
 'lapCount': 1,
 'caloriesConsumed': 0.0,
 'waterEstimated': 182.0,
 'waterConsumed': 0.0,
 'totalSets': 5,
 'activeSets': 5,
 'totalReps': 18,
 'minRespirationRate': 14.699999809265137,
 'maxRespirationRate': 30.459999084472656,
 'avgRespirationRate': 19.510000228881836,
 'activityTrainingLoad': 5.1538848876953125,
 'minActivityLapDuration': 1019.5579833984375,
 'moderateIntensityMinutes': 9,
 'vigorousIntensityMinutes': 1}

I know weight is being logged somewhere as it exists on the connect web ui. Any tips?

mwcoleman commented 7 months ago

Ok, was probably a bit impatient posting this. For anyone interested in the future: return activity ids using .get_activites() Return strength exercise details using .get_activity_exercise_sets(activity_id) and parse the json.