Skip to content

Commit

Permalink
get_activities parameter type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
psdupvi committed Oct 4, 2024
1 parent e74e1d6 commit fc89f0d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions garminconnect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,13 @@ def get_device_last_used(self):

return self.connectapi(url)

def get_activities(self, start, limit):
"""Return available activities."""
def get_activities(self, start: int = 0, limit: int = 20):
"""
Return available activities.
:param start: Starting activity offset, where 0 means the most recent activity
:param limit: Number of activities to return
:return: List of activities from Garmin
"""

url = self.garmin_connect_activities
params = {"start": str(start), "limit": str(limit)}
Expand Down

0 comments on commit fc89f0d

Please sign in to comment.