Skip to content

Commit

Permalink
Renamed get_primary_training_device_info
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunky committed Apr 6, 2024
1 parent c87ac7d commit 6aeeb3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ def switch(api, i):
)

# Get primary training device information
device_primary_training_info = api.get_primary_training_device_info()
display_json("api.get_primary_training_device_info()", device_primary_training_info)
primary_training_device = api.get_primary_training_device()
display_json("api.get_primary_training_device()", primary_training_device)

elif i == "R":
# Get solar data from Garmin devices
Expand Down
6 changes: 4 additions & 2 deletions garminconnect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def __init__(self, email=None, password=None, is_cn=False):
)
self.garmin_connect_device_url = "/device-service/deviceservice"

self.garmin_connect_primary_device_url = "/web-gateway/device-info/primary-training-device"
self.garmin_connect_primary_device_url = (
"/web-gateway/device-info/primary-training-device"
)

self.garmin_connect_solar_url = "/web-gateway/solar"
self.garmin_connect_weight_url = "/weight-service"
Expand Down Expand Up @@ -744,7 +746,7 @@ def get_device_settings(self, device_id: str) -> Dict[str, Any]:

return self.connectapi(url)

def get_primary_training_device_info(self) -> Dict[str, Any]:
def get_primary_training_device(self) -> Dict[str, Any]:
"""Return detailed information around primary training devices, included the specified device and the
priority of all devices.
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "garminconnect"
version = "0.2.15"
version = "0.2.16"
description = "Python 3 API wrapper for Garmin Connect"
authors = [
{name = "Ron Klinkien", email = "[email protected]"},
Expand Down

0 comments on commit 6aeeb3c

Please sign in to comment.