项目作者: mgryszko

项目描述 :
Generate Strava API OAuth2 access token for testing
高级语言: Ruby
项目地址: git://github.com/mgryszko/strava-access-token.git
创建时间: 2018-10-10T17:53:29Z
项目社区:https://github.com/mgryszko/strava-access-token

开源协议:

下载


Strava access token generator

Generate Strava API OAuth2 access token for testing purposes.

Used in pet projects:

  • stra-bash - Strava batch CLI tool written in bash language
  • kstrava - Strava batch CLI tool written in functional Kotlin using Arrow

Installation

Prerequisites

Ruby executable. Tested on macOS with Homebrew Ruby environment managed by rbenv.

Homebrew

```shell script
brew tap mgryszko/strava
brew install strava-access-token

  1. ## Usage
  2. ```shell script
  3. strava-access-token <client_id> <client_secret>

If you don’t have a client id/secret, register your app following the official Strava documentation.

The script starts a local server (acting as an OAuth2 client) listening on port 8080.

Open your http://localhost:8080/ in your browser and authenticate against Strava. Access token will be displayed in the browser and downloaded to the current working directory as .access-token .

Developer setup

Pre-requisite: install rbenv (Ruby environment), then:

```shell script

Replace ‘‘ with latest 2.7 Ruby release.

rbenv install
rbenv local

  1. ### Run
  2. ```shell script
  3. rbenv exec ruby strava-access-token <client_id> <client_secret>