Skip to content

Commit

Permalink
Added example for getting pregnancy summery data
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunky committed Mar 15, 2024
1 parent ecd25e1 commit 4dab2ab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"P": "Get workouts 0-100, get and download last one to .FIT file",
# "Q": "Upload workout from json data",
"R": "Get solar data from your devices",
"S": "Get pregnancy summary data",
"Z": "Remove stored login tokens (logout)",
"q": "Exit",
}
Expand Down Expand Up @@ -789,6 +790,18 @@ def switch(api, i):
# f"api.upload_workout({workout_example})",
# api.upload_workout(workout_example))

# WOMEN'S HEALTH
elif i == "S":
# Get pregnancy summary data
display_json(
"api.get_pregnancy_summary()",
api.get_pregnancy_summary()
)

# Additional related calls:
# get_menstrual_data_for_date(self, fordate: str): takes a single date and returns the Garmin Menstrual Summary data for that date
# get_menstrual_calendar_data(self, startdate: str, enddate: str) takes two dates and returns summaries of cycles that have days between the two days

elif i == "Z":
# Remove stored login tokens for Garmin Connect portal
tokendir = os.path.expanduser(tokenstore)
Expand Down

0 comments on commit 4dab2ab

Please sign in to comment.