Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gravityblast/mini-strava
A ruby client and CLI for the Strava API
https://github.com/gravityblast/mini-strava
Last synced: about 9 hours ago
JSON representation
A ruby client and CLI for the Strava API
- Host: GitHub
- URL: https://github.com/gravityblast/mini-strava
- Owner: gravityblast
- License: mit
- Created: 2016-01-07T01:57:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-01T03:29:41.000Z (almost 9 years ago)
- Last Synced: 2024-10-21T02:04:24.968Z (18 days ago)
- Language: Ruby
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MiniStrava
A simple Ruby client and CLI for the Strava API.
## Installation
Add this line to your application's Gemfile:
gem 'mini_strava'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mini_strava
## Usage
> client = MiniStrava::Client.new 'XYZ'
=> #> a = client.athlete
> a.firstname
=> "Andrea"> a.bikes.first.name
=> 'Giant TCR'> activities = client.activities
> activities.first.average_speed
=> 6.347> act = client.activity activities[0].id
> act.name
=> 'Evening ride'
> act.distance
=> 24727.3Check the Strava API documentation to know more about the available fields for each resource.
### CLI
An executable called `mini-strava` will be installed with the gem. To use it, set the `STRAVA_ACCESS_TOKEN` env variable:
export STRAVA_ACCESS_TOKEN="xyz"
and then use the CLI:
$ mini-strava
MiniStrava CLI > athlete.firstname
=> "Andrea"
MiniStrava CLI > activities.first.name
=> "Evening Ride"## Contributing
1. Fork it ( http://github.com//mini_strava/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request