node-strava / node-strava-v3

API wrapper for Strava's v3 API, in Node
MIT License
356 stars 109 forks source link

fix: remove prototype suffix from authenticated athlete endpoint #141

Closed tcoyze closed 1 year ago

tcoyze commented 1 year ago

Oddly the athlete.prototype endpoint works, but could break in the future so I opted to change it.

markstos commented 1 year ago

Did you check the blame history to see if there might be a reason where athlete.prototype was used here before?

tcoyze commented 1 year ago

Did you check the blame history to see if there might be a reason where athlete.prototype was used here before?

Thanks for the suggestion and following up with me! I did take a look at the commit that made the change from athlete to athlete.prototype. The change seemed to be made in error. If you look at the request that's sent over the wire it is going to https://www.strava.com/api/v3/athlete.prototype which is undocumented. If you replace athlete.prototype with athlete.umbrella, or athlete.theboz they both return the data of the authenticated athelete. My change is just to keep in line with the documentation in the event that Strava fixes / changes this behavior.