StravaSwift icon indicating copy to clipboard operation
StravaSwift copied to clipboard

Change ID from Int to String to support gear_id

Open FleetPhil opened this issue 4 years ago • 2 comments

Currently the ID parameter for Strava objects is a typealias to Int in Router.swift. However ID for Strava Gear (aka Equipment) is a String, so the gear API call does not work. ID is not used in any arithmetic and is simply passed around and interpolated into a string for the Strava API calls so the library operation is not impacted by this change. This change also adds a gear_id (String) attribute to the Activity class which was missing before

This is a breaking change for programs calling the request API function with an embedded route parameter as the id parameter to Router has changed from Int to String. However the fix is a simple interpolation (id: id becomes id: "(id)"

FleetPhil avatar Jul 07 '20 17:07 FleetPhil

Thanks for doing this, any chance this can be rebased on the main branch?

lludo avatar Apr 01 '22 20:04 lludo

I don't use this library any more as it looks like the original author is not maintaining it so I've reworked my program to use native URL requests and json decoding. As this is also a breaking change I don't want to make any changes that might impact existing users.

FleetPhil avatar Apr 04 '22 09:04 FleetPhil