stravalib.client.Client._validate_activity_type#
- Client._validate_activity_type(params: dict[str, Any], activity_type: str | None, sport_type: str | None) dict[str, Any] [source]#
Validate activity type and sport type values.
- Parameters:
params (dict) – A dictionary of activity values used to update or create an 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 (case-sensitive) see:
stravalib.model.Activity.SPORT_TYPES
- Returns:
Dictionary containing overlapping parameter values between the two methods
- Return type:
dict
- Raises:
ValueError – If the activity_type or sport_type is invalid.