TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'g_connect'
And then execute:
$ bundle
Or install it yourself as:
$ gem install g_connect
Initialize connection
g_connect=GConnect::Connexion.new(login,password)
get latest activities
g_connect.latest_activities(start, limit)
where 'start' is the first activity to get (0 being the most recent), 'limit' is the number of activities. Default are 0 and 1 (the most recent activity)
Note: result is a json format, use your preferred parser to read it
get an activity
g_connect.activity(activity_id, format)
where 'activity_id' is the Garmin activity id and 'format', the format in which you want the result available format are
*'json' (Note: you don't get the track points with this format)
*'tcx' (default)
*'gpx'
To read the tcx or gpx result, you can use my gpx reader gem and tcx reader gem
- Fork it ( https://github.com/[my-github-username]/g_connect/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request