cyberjunky / python-garminconnect

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

Adding blood pressure data #184

Closed demokedes closed 10 months ago

demokedes commented 10 months ago

Dear cyberjunky, Is there a way to add Blood pressure readings, similar to an option that you're having under E: Add Weight? Doest Garmin API support that? Thank you!

matin commented 10 months ago

It does. Here's an example:

garmin.garth.post(
    "connectapi",
    "/bloodpressure-service/bloodpressure",
    json={
        "systolic": 120,
        "version": 0,
        "measurementTimestampLocal": {
            "date": "2024-01-13T13:06:34.451Z"
        },
        "measurementTimestampGMT": {
            "date": "2024-01-13T19:06:34.451Z"
        },
        "notes": "",
        "multiMeasurement": False,
        "category": "NORMAL",
        "categoryName": "NORMAL",
        "diastolic": 70,
        "pulse": 60,
        "sourceType": "MANUAL"
    },
    api=True,
)
cyberjunky commented 10 months ago

@demokedes see also option 'M' in the example.py script!