stravalib.client.Client.update_activity#

Client.update_activity(activity_id: int, name: str | None = None, activity_type: str | None = None, sport_type: str | None = None, description: str | None = None, private: bool | None = None, commute: bool | None = None, trainer: bool | None = None, gear_id: int | None = None, device_name: str | None = None, hide_from_home: bool | None = None) Activity[source]#

Updates the properties of a specific activity.

https://developers.strava.com/docs/reference/#api-Activities-updateActivityById

Parameters:
  • activity_id (int) – The ID of the activity to update.

  • name (str, default=None) – The name of the activity.

  • activity_type (str, default=None) – The activity type (case-insensitive). Deprecated. Prefer to use sport_type. In a request where both type and sport_type are present, this field will be ignored. See https://developers.strava.com/docs/reference/#api-models-UpdatableActivity. For possible values see: stravalib.model.Activity.TYPES

  • sport_type (str, default=None) – For possible values see: stravalib.model.Activity.SPORT_TYPES

  • private (bool, default=None) – Whether the activity is private. .. deprecated:: 1.0 This param is not supported by the Strava API and may be removed in the future.

  • commute (bool, default=None) – Whether the activity is a commute.

  • trainer (bool, default=None) – Whether this is a trainer activity.

  • gear_id (int, default=None) – Alphanumeric ID of gear (bike, shoes) used on this activity.

  • description (str, default=None) – Description for the activity.

  • device_name (str, default=None) – Device name for the activity .. deprecated:: 1.0 This param is not supported by the Strava API and may be removed in the future.

  • hide_from_home (bool, default=None) – Whether the activity is muted (hidden from Home and Club feeds).

Return type:

Updates the activity in the selected Strava account