Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sport_type activity attribute and deprecate type activity attribute #279

Open
jsamoocha opened this issue Nov 30, 2022 · 2 comments

Comments

@jsamoocha
Copy link
Collaborator

jsamoocha commented Nov 30, 2022

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
Copy link
Collaborator Author

#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__())

@lwasser
Copy link
Collaborator

lwasser commented Feb 19, 2024

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. .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants