GarminConnectr is a simple Ruby library for accessing data from Garmin Connect. As of 12/2009, Garmin’s own Connect API has yet to be released. Until then, this screen scraping lib does the job.
CHANGELOG:
0.0.8: Updated code to handle naming changing on Garmin's end (ex: max_elevation is now maxelevation); updated tests. 0.0.6: The Garmin Connect interface has been updated. I have rewritten most of garmin_connectr and added several cucumber tests. The API has changed. Please see the example usage below.
Install:
gem install garmin_connectr
Usage:
require 'garmin_connectr' gc = GarminConnectr.new # Load a specific activity activity = gc.load_activity( :id => ACTIVITY_ID ) puts "#{ g.activity } / #{ g.name } / #{ g.time } / #{ g.distance }" puts "Available fields for this activity: #{ g.fields.join(',') }" puts "Splits for this activity:" g.activity.splits.each do |split| puts "#{ split.split } / #{ split.distance } / #{ split.time }" end puts "Split summary:" puts "#{ activity.split_summary.time }" # Load a list of my activities list = gc.load_activities( :username => garmin_connect_username, :password => garmin_connect_password ) list.each do |activity| puts "#{ activity.name } / #{ activity.start_time }" end
See examples/*
Copyright © 2009-2012 Adam Roth. See LICENSE for details.