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

Support creating/updating sport type of activity #132

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

pro-sumer
Copy link
Contributor

@pro-sumer pro-sumer commented Aug 2, 2022

Strava recently introduced a new activity property sport_type of type SportType that can be used to indicate the sport type when creating or updating activities:

An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)

May be one of the following values: AlpineSki, BackcountrySki, Canoeing, Crossfit, EBikeRide, Elliptical, EMountainBikeRide, Golf, GravelRide, Handcycle, Hike, IceSkate, InlineSkate, Kayaking, Kitesurf, MountainBikeRide, NordicSki, Ride, RockClimbing, RollerSki, Rowing, Run, Sail, Skateboard, Snowboard, Snowshoe, Soccer, StairStepper, StandUpPaddling, Surfing, Swim, TrailRun, Velomobile, VirtualRide, VirtualRun, Walk, WeightTraining, Wheelchair, Windsurf, Workout, Yoga

Test note: I have added a test case for testing updating a sport type, but I have not executed the test suite... (I don't want to risk the data in my Strava account nor the account itself). However, I did successfully update all (several hundreds) previously recorded rides on my MTB bikes to have the new sport type MountainBikeRide. I verified random samples (checked that its icon is now a bike with a mountain on top and that the ride is listed as a "Mountain Bike Ride").

Fixes #130

Copy link
Collaborator

@markstos markstos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@markstos markstos merged commit ea59006 into node-strava:main Nov 22, 2022
@markstos
Copy link
Collaborator

Thanks. Release today in v2.2.0.

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

Successfully merging this pull request may close these issues.

Allow property SportType in strava.activities.update
2 participants