The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

Version 0.01

SYNOPSIS

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

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

Herbert Poul, <hpoul at cpan.org>

BUGS

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

You can find documentation for this module with the perldoc command.

perldoc GPS::Garmin::Connect

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.