Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
310 stars 76 forks source link

Add support for uploading files to Strava #173

Closed mscansian closed 6 years ago

mscansian commented 6 years ago

This PR enables an user to upload files directly to Strava. It uses stravalib to handle the API calls.

Since Strava uses 3-legged OAuth protocol for authentication, I've had to create an app in Strava and an API to sit in the middle of the authentication. This API is open-source and available here.

I've also took the liberty of deploying the API to Amazon Web Services using AWS API Gateway and Lambda. This configuration is serverless and requires no maintenance on my part, this means that will stay up for the foreseeable future. My API endpoint and Strava's app id are hardcoded into the script.

Additional details

I made a decision to create a third party API in the middle of the authentication to ease the setup for the user. Had I not done so, it would mean that every user need to create an app in Strava and configure the client id and client secret. I've used software that works this way and have not enjoyed it.

If for some reason a user don't trust/want to use my API, he can also use the code published to deploy his own.

IMPORTANT: This script requires Python 3. For some reason my dependencies are not working on Python 2.7. I've configured the script to run using python3 for the time being. As soon as the problems are fixed (here and here), it can be changed back to system python.

Related issues

171

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 6.272% when pulling 9eebc29833aaca76d7652e84377480d20dd24a6c on mscansian:upload-strava into 06e746cd4b517ff5138975a990ebb85573f0bc3c on Tigge:master.