Skip to content

Strava-Viewer for viewing simple summaries of your Strava activities using Dash framework and Strava API.

Notifications You must be signed in to change notification settings

MWKSolution/strava-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strava-Viewer

...for viewing simple summaries of your Strava activities using Dash framework and Strava API
Working example could be seen at Render


Before you start your application...

  1. You have to:
    • have Strava account and some activities on it
    • set up your API app in Strava
    • and then get client_id and client_secret
  2. Then use browser and following links to get access and refresh tokens:
    Manually in browser (put appropriate data when in CAPITALS):
  3. from response get: refresh_token and access_token

Put your client_id, client_secret and obtained in previous steps access_token and refresh_token in token.yaml file. It should look like this:

client_id: 'xxxxx'
client_secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
refresh_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
access_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
grant_type: 'refresh_token'
f: 'json'

Now you can get your activities from Strava.
getLoggedInAthleteActivities

access_token could be used directly by it expires so refresh_token is used to get new access token.
Refreshing Expired Access Tokens


Strava-Viewer app

Some simple summaries of activities data are presented using Dash framework.
When first used, app has empty dashboard. Click Refresh data or Reload all data, this will create activities.json file or will connect to redis database.
You should have redis.yaml file with valid data to connect to redis database:

host: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
port: xxxxx
username: 'xxxxxxxx'
password: 'xxxxxxxx'

After adding new activities to Strava clicking Refresh data, this will update activities.json file or redis database and than barchart.


Deployment

Since Heroku is no longer offering free dynos deployment was moved to Render.
But files necessary for Heroku deployment haven't been removed (Procfile, runtime.txt).
!!! All necessary files for deployment are included but don't forget to remove token.yaml and redis.yaml from .gitignore!!!

About

Strava-Viewer for viewing simple summaries of your Strava activities using Dash framework and Strava API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published