cyberjunky / python-garminconnect

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

Add all day stress #156

Closed matin closed 9 months ago

matin commented 9 months ago

I found a way to get details body battery information. This closes #115.

Here's how to get body battery:

from getpass import getpass

import garminconnect

email = input("Enter email address: ")
password = getpass("Enter password: ")

garmin = garminconnect.Garmin(email, password)
garmin.login()
garmin.get_all_day_stress('2023-09-19')['bodyBatteryValuesArray'][:10]
[[1695103200000, 'MEASURED', 42, 2.0],
 [1695103380000, 'MEASURED', 42, 2.0],
 [1695103560000, 'MEASURED', 42, 2.0],
 [1695103740000, 'MEASURED', 43, 2.0],
 [1695103920000, 'MEASURED', 43, 2.0],
 [1695104100000, 'MEASURED', 43, 2.0],
 [1695104280000, 'MEASURED', 43, 2.0],
 [1695104460000, 'MEASURED', 44, 2.0],
 [1695104640000, 'MEASURED', 44, 2.0],
 [1695104820000, 'MEASURED', 44, 2.0]]
cyberjunky commented 9 months ago

Thanks a lot (again) @matin