Add route to map directly from strava#487
Open
hansonwj wants to merge 2 commits intoMaprunner:masterfrom
Open
Conversation
Owner
|
This is a really nice idea but I'm afraid I am not willing to merge it into the master branch. Strava has a set of brand guidelines that you need to comply with when using their API. This implementation does not meet any of the mandatory requirements. Even if it did, the Strava API Agreement looks much too restrictive and would potentially require a lot of extra work that I am not willing to do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds the functionality to allow an admin to configure rg2 to allow users to upload a recent activity directly from Strava and use them as route drawings. It makes it easier for users as they do not need to download the gpx file then reupload the file to rg2.
The configuration for admins is simple. Simply create a Strava API application and retrieve the application oAuth2 client and secret. Define STRAVA_CLIENT and STRAVA_SECRET in rg2-config.
If the oauth values are undefined, the user will not see the 'Get 10 most recent strava activities' button.
If defined, the user will see a button in the Draw tab which will allow them to sign in to strava via an oauth popup window, and the application will list their 10 most recent activities. They can then select one to add it to the map.
I did have to bodge the existing GET listener to accept the oauth code parameter. Can't see any way around this.