Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-source-strava

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-strava

Gatsby plugin to use Strava as a data source

  • 1.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-70%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-source-strava

npm package

Gatsby plugin to use Strava as a data source

Getting started

gatsby-source-strava

You can download gatsby-source-strava from the NPM registry via the npm or yarn commands

yarn add gatsby-source-strava
npm install gatsby-source-strava --save

Usage

Add the plugin in your gatsby-config.js file:

const STRAVA_TOKEN = "your-token"
module.exports = {
    plugins: [
        {
            resolve: "gatsby-source-strava",
            options: {
                //
                // Mandatory
                // --------
                //
                token: STRAVA_TOKEN,

                //
                // Optional
                // --------
                //
                debug: true,
                activitiesOptions: {
                    // Options for filtering activities
                    // --------------------------------
                    //
                    // Timestamp for filtering activities that have taken place BEFORE a certain time
                    before: "1539500400",
                    // Timestamp for filtering activities that have taken place AFTER a certain time
                    after: "1539500400",
                    //
                    // Options for enhance activities
                    // --------------------------------
                    //
                    // Add comments to every activity
                    withComments: true,
                    // Add kudos to every activity
                    withKudos: true,
                    // Add laps to every activity
                    withLaps: true,
                    // Add photos to every activity
                    withPhotos: true,
                    // Add related activities to every activity
                    withRelated: true,
                    // Add streams to every activity (see streamTypes)
                    withStreams: true,
                    // Add zones to every activity (need Strava Summit Analysis Pack)
                    withZones: true,
                    //
                    // Add analyzed data to every activity
                    // withStreams option must be true
                    // See https://developers.strava.com/docs/reference/#api-models-StreamSet
                    streamsTypes: [
                        "time",
                        "cadence",
                        "distance",
                        "latlng",
                        "heartrate",
                        "temp",
                        "moving",
                        "grade_smooth",
                        "watts",
                        "velocity_smooth",
                        "altitude",
                    ],
                    //
                    // Option to cache activities
                    // ------
                    cacheDir: `${__dirname}/.strava`,
                },
                athleteOptions: {
                    // Options computed by gatsby-source-strava
                    // ----------------------------------------
                    //
                    // Add `heartrateMax` data to `athlete`
                    computeHeartrateMax: true,
                    //
                    // Options for enhance athlete data
                    // --------------------------------
                    //
                    // Add athlete koms
                    withKoms: true,
                    // Add athlete routes
                    withRoutes: true,
                    // Add athlete stats
                    withStats: true,
                    // Add athlete zones
                    withZones: true,
                },
            },
        },
    ],
}

Contributing

  • ⇄ Pull/Merge requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.

See CONTRIBUTING guidelines

Changelog

See CHANGELOG

License

This project is licensed under the MIT License - see the LICENCE file for details

Keywords

FAQs

Package last updated on 24 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc