GPS::Garmin::Connect - Allows simple fetching of activities from http://connect.garmin.com
Version 0.01
This module is a simple helper to fetch and parse activities from http://connect.garmin.com
use GPS::Garmin::Connect; my $connect = GPS::Garmin::Connect->new(); my $json = $connect->fetchdata( $username, $password ); my $activities = $connect->parse( $json ); foreach my $activity (@$activities) { print "My activity $activity->{activity} - HR: $activity->{heartrate}\n"; }
$connect->fetchdata( $username, $password );
Logins into connect.garmin.com and fetches all activities and returns a JSON string which can be parsed using parse.
method responsible for parsing the json data and returning a simplified array ref of hash refs:
$VAR1 = [ { 'begindate' => '2009-02-17', 'distance' => 3156, 'name' => 'Untitled', 'heartrate' => 162, 'duration' => 1980, 'activity' => 'Untitled', 'activityid' => '2194739', 'id' => '2194739', 'type' => 'Uncategorized', 'begin' => 'Tue, Feb 17 \'09 08:27 AM' }, { 'begindate' => '2009-02-17', 'distance' => 2200, 'name' => 'Untitled', 'heartrate' => 157, 'duration' => 1500, 'activity' => 'Untitled', 'activityid' => '2194738', 'id' => '2194738', 'type' => 'Uncategorized', 'begin' => 'Tue, Feb 17 \'09 08:02 AM' },
Herbert Poul, <hpoul at cpan.org>
<hpoul at cpan.org>
Please report any bugs or feature requests to bug-gps-garmin-connect at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GPS-Garmin-Connect. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-gps-garmin-connect at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc GPS::Garmin::Connect
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=GPS-Garmin-Connect
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/GPS-Garmin-Connect
CPAN Ratings
http://cpanratings.perl.org/d/GPS-Garmin-Connect
Search CPAN
http://search.cpan.org/dist/GPS-Garmin-Connect
Copyright 2009 Herbert Poul, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install GPS::Garmin::Connect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GPS::Garmin::Connect
CPAN shell
perl -MCPAN -e shell install GPS::Garmin::Connect
For more information on module installation, please visit the detailed CPAN module installation guide.