Michael Aquilina > WWW-InstaMapper > WWW::InstaMapper

Download:
WWW-InstaMapper-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

WWW::InstaMapper - Interface to the InstaMapper.com API

SYNOPSIS ^

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

DESCRIPTION ^

This module provides an object-oriented Perl interface to the InstaMapper.com API.

METHODS ^

new

Returns a new instance of WWW::InstaMapper.

Accepts a hash, containing the following parameters:

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.

get_positions

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:

The hash references contain the following data:

get_last_position

Returns a hash reference containing data on the last position logged for the devices whose API keys are associated with this object.

DEPENDENCIES ^

DateTime, Date::Parse, LWP::UserAgent, JSON

DISCLAIMER ^

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 AND LICENSE ^

Copyright (C) 2011 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.

AUTHOR ^

Michael Aquilina, aquilina@cpan.org

syntax highlighting: