Skip to content

Get activity

To get a specific activity for a team, use the get_activity method:

from pyholdsport import Holdsport, HoldsportActivity

holdsport = Holdsport(
    holdsport_username="username",
    holdsport_password="password",
)
team_id = 123
activity_id = 12345

# (1)!
activity: HoldsportActivity | None = holdsport.get_activity(
    team_id=team_id,
    activity_id=activity_id,
)
print(activity)
  1. Note, that if the specified activity does not exist, the method will return None.

Learn more about the HoldsportActivity object.