GPS::Garmin::Connect - Allows simple fetching of


GPS-Garmin-Connect documentation  | view source Contained in the GPS-Garmin-Connect distribution.

Index


NAME

Top

GPS::Garmin::Connect - Allows simple fetching of activities from http://connect.garmin.com

VERSION

Top

Version 0.01

SYNOPSIS

Top

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";
    }




FUNCTIONS

Top

new

fetchdata

    $connect->fetchdata( $username, $password );

Logins into connect.garmin.com and fetches all activities and returns a JSON string which can be parsed using parse.

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'
          },




AUTHOR

Top

Herbert Poul, <hpoul at cpan.org>

BUGS

Top

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.

SUPPORT

Top

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

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


GPS-Garmin-Connect documentation  | view source Contained in the GPS-Garmin-Connect distribution.