Returns a new instance of WWW::InstaMapper.
Accepts a hash, containing the following parameters:
api_key (required): The InstaMapper API key (as a string) or multiple keys (as an array reference of strings) that you would like to retrieve positions for.
ssl (optional): Boolean indication of whether or not to make API calls via HTTPS.
Please note that in accordance with the InstaMapper API terms, a delay of 10 seconds (or 30 seconds if using SSL) will be enforced between requests via this module.
Returns an array of hash references representing position data for the devices whose API keys are associated with this object.
Accepts the following optional parameters:
num - The number of positions to return (maximum of 1000) from_timestamp - Timestamp of the earliest time you would like positions from from_unixtime - Epoch timestamp (UTC) of the earliest time you would like positions from
The hash references contain the following data:
device_key: InstaMapper device key device_label: InstaMapper device label timestamp: DateTime object representing the time the position was logged, in UTC latitude: Latitude longitude: Longitude altitude: Altitude (in meters) speed: Speed (in meters/second) heading: Heading (in degrees)
Returns a hash reference containing data on the last position logged for the devices whose API keys are associated with this object.
WWW::InstaMapper - Perl interface to the InstaMapper.com API
use WWW::InstaMapper; my $instamapper = WWW::InstaMapper->new( api_key => '1234567890', ssl => 1, ); my $position = $instamapper->get_last_position; print "Last position logged at $position->{timestamp}"; my @positions = $instamapper->get_positions( num => 500, from_timestamp => '2009-01-01', ); for my $position (@positions) { print "$position->{device_label} was at lat " . "$position->{latitude}/long $position->{longitude} " . "at $position->{timestamp}"; }
This module provides an object-oriented Perl interface to the InstaMapper.com API.
DateTime, Date::Parse, LWP::UserAgent, JSON
The author of this module is not affiliated in any way with InstaMapper.com.
Users of this module must be sure to follow the InstaMapper.com API terms of service.
Copyright (C) 2008 Michael Aquilina. All rights reserved.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Michael Aquilina, aquilina@cpan.org
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
To install WWW::InstaMapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::InstaMapper
CPAN shell
perl -MCPAN -e shell install WWW::InstaMapper
For more information on module installation, please visit the detailed CPAN module installation guide.