cyberjunky / python-garminconnect

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

Add body battery endpoint #116

Closed dpfrakes closed 1 year ago

dpfrakes commented 1 year ago
-------------------- api.get_body_battery('2023-01-18, 2023-01-25') --------------------
[
    {
        "date": "2023-01-18",
        "charged": **,
        "drained": **,
        "startTimestampGMT": "2023-01-18T05:00:00.0",
        "endTimestampGMT": "2023-01-19T05:00:00.0",
        "startTimestampLocal": "2023-01-18T00:00:00.0",
        "endTimestampLocal": "2023-01-19T00:00:00.0",
        "bodyBatteryValuesArray": [
            [
                1674018000000,
                ***
            ],
            [
                1674034920000,
                ***
            ],
            [
                1674046800000,
                ***
            ],
            [
                1674075420000,
                ***
            ],
            [
                1674075600000,
                ***
            ],
            [
                1674095760000,
                ***
            ]
        ],
        "bodyBatteryValueDescriptorDTOList": [
            {
                "bodyBatteryValueDescriptorIndex": 0,
                "bodyBatteryValueDescriptorKey": "timestamp"
            },
            {
                "bodyBatteryValueDescriptorIndex": 1,
                "bodyBatteryValueDescriptorKey": "bodyBatteryLevel"
            }
        ]
    },
    {
        "date": "2023-01-19",
        "charged": **,
        "drained": **,
        "startTimestampGMT": "2023-01-19T05:00:00.0",
        "endTimestampGMT": "2023-01-20T05:00:00.0",
        "startTimestampLocal": "2023-01-19T00:00:00.0",
        "endTimestampLocal": "2023-01-20T00:00:00.0",
        "bodyBatteryValuesArray": [
            [
                ...
cyberjunky commented 1 year ago

Great work again @dpfrakes ! Thanks!