cyberjunky / python-garminconnect

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

Extend API to retrieve fitness age data #211

Closed fako1024 closed 4 months ago

fako1024 commented 5 months ago

Retrieves the following stats (fake values) from https://connect.garmin.com/fitnessage-service/fitnessage/[date]:

{
    "chronologicalAge": 20,
    "fitnessAge": 18.315871748264364,
    "achievableFitnessAge": 19.38654477840031,
    "previousFitnessAge": 18.315871748264364,
    "components": {
        "vigorousDaysAvg": {
            "value": 2.5,
            "stale": false,
            "numOfWeeksForIm": 4
        },
        "rhr": {
            "value": 52,
            "stale": false
        },
        "vigorousMinutesAvg": {
            "value": 104.5,
            "stale": false,
            "numOfWeeksForIm": 4
        },
        "bmi": {
            "value": 20.0,
            "stale": false,
            "lastMeasurementDate": "2024-06-19"
        }
    },
    "lastUpdated": "2024-06-22T00:00:00.0"
}
cyberjunky commented 4 months ago

Well done, nice addition!