RunKeeperActivities gem

The runkeeper-activities gem is a unoffical client for the RunKeeper activity feed, it is not endorsed by or affiliated with FitnessKeeper Inc. It basically do a bit of scraping of RunKeeper’s public profile pages and js-support files.

Background

I have been using RunKeeper to track my running for about two years and really like the service. However there is no official API or RSS-feed for your data yet, from their support forum it looks like it’s planned for the future. I started to feel the urge to be able to access my recent activites on RunKeeper via Ruby so I made this gem.

Update 7 June - A ”graph” API is on the way

Installation

If your using Bundler add the gem to your Gemfile

gem 'runkeeper-activities'

and do a

bundle install

Not using bundler? Just do a

gem install runkeeper-activities

and require the gem with

require 'runkeeper-activities'

Example

require 'runkeeper-activities'
user = RunKeeperActivities::User.find_by_username(YOUR_RUNKEEPER_USERNAME)
activity = user.activities.first
puts "On #{activity.start_time} #{user.name} completed a #{activity.distance} #{user.distance_unit} #{activity.type.downcase} activity"

Available data

On a User instance you have access to username, name, profile_url, profile_image_url, distance_unit, duration_unit, pace_unit, speed_unit, calories_unit, elevation_unit and activities. On a Activity instance you can access start_time, end_time, distance, duration, pace, speed, calories, elevation message and summery.

There is a bunch of more data available on RunKeeper that should be pretty easy to add support for.

Contribute

Found something that doens’t work or want to add a feature? Add an issue or do a fork and send a pull request.