Strava V3 deprecates attribute `type` for Activities
The replacing attribute will be sport_type.
https://developers.strava.com/docs/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.
Thanks, care to PR an update?
I'll start a draft :v:
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
Details taken from the Strava Support Page: https://support.strava.com/hc/en-us/articles/216919407-Supported-Sport-Types-on-Strava (2022-07-31 at 09-40-45)

I made some good progress and the new attribute comes in for older activities as expected.
Here's a shortened JSON response for an activity.
{
"resource_state": 3,
"athlete": { "id": 24776507, "resource_state": 1 },
"name": "Pimmel Party Buddytag der Tarmac Boys",
"distance": 92137.5,
"moving_time": 13297,
"elapsed_time": 15395,
"total_elevation_gain": 138.0,
"type": "Ride",
"sport_type": "Ride",
"workout_type": 10,
// ...
}
If you so wish I would put in the effort and write all cassette based checks from scratch 🥵
or you let me add the sport_type next to type for Activity cassettes 💪
please, check the little work (link below), before I open a PR and let me know what your expectations for the vcr_cassettes are @dblock
https://github.com/dblock/strava-ruby-client/compare/master...simonneutert:strava-ruby-client:62-adds-sport_type-for-v3-specs
I think we definitely need at least some new K7s that show a complete new response, but I don't think you need to try and update all of them from scratch unless you feel super motivated.
Cheers, sometimes work needs to be done, whether it's fun or not.
I will put the elbow grease in 🤝
@simonneutert Anything else needed here after https://github.com/dblock/strava-ruby-client/pull/63?
@dblock we could as a next step:
- [x] remove
typeas an attribute from the code base - [x] add an entry to
Upgrading.md - [x] update
Readme.mdwhere needed
That works! Please?
Closed via https://github.com/dblock/strava-ruby-client/pull/68