stravalib icon indicating copy to clipboard operation
stravalib copied to clipboard

Add support for sport_type activity attribute and deprecate type activity attribute

Open jsamoocha opened this issue 3 years ago • 2 comments

From the Strava API changelog:

June 15, 2022

Introduction of activity sport_type. This is the preferred field to use moving forward, as opposed to type, which is now considered deprecated. Please note: this change is backward compatible and type will still be supported. The SportType enumeration is distinct from ActivityType in that it includes new types (e.g. MountainBikeRide). In requests where both type and sport_type are present, type will be ignored.

There are several client methods that use type or activity_type arguments. These should be deprecated and replaced by the preferred sport_type.

jsamoocha avatar Nov 30 '22 07:11 jsamoocha

#362 Adds support for sport_type in the update_activity() method. Remaining TODO:

  • [ ] Support sport_type (and deprecate activity_type) in create_activity()
  • [ ] Add deprecation warnings when using the activity_type attribute in model module (see BackwardCompatibilityMixin.__getattribute__())

jsamoocha avatar Apr 22 '23 08:04 jsamoocha

i'm attempting the first part of this. it seems to be generally working in think but i don't fully understand how to adjust the tests to ensure things work with sport_type and variations of sport type vs "type" or activity_type in our code. .

lwasser avatar Feb 19 '24 00:02 lwasser