WWW::Twittervision - Perl extension to the Twittervision API


WWW-Twittervision documentation  | view source Contained in the WWW-Twittervision distribution.

Index


NAME

Top

WWW::Twittervision - Perl extension to the Twittervision API

SYNOPSIS

Top

  use WWW::Twittervision;

  my $tv = new WWW::Twittervision();

  my $result = $tv->current_status(screen_name =>'screen name');

  $result = $tv->update_status(screen_name =>'screen name',
                               password => 'somepassword',
                               location => 'some place in the world');

  my @locations = $tv->parse_location(message => $message);

DESCRIPTION

Top

This module is a simple perl wrapper for the API provided by twittervision.com.

METHODS

Top

new
  $tv = WWW::Twittervision->new()
  $tv = WWW::Twittervision(url => $url)

Constructor for WWW::Twittervision. It returns a reference to a WWW::Twittervision object. You may also pass the url of the webservice to use. The default value is http://api.twittervision.com and is the only url, to my knowledge, that provides the services needed by this module.

current_status

This function returns the current location and the last twitter message for a given screen name (twitter handle). The returned data structure is a HASHREF. Use Data::Dumper to inspect it or look at the module tests (found in t/*) for examples.

update_status

This function update the location for a twitter screen name. It returns a HASHREF which contains the new location along with the last twitter information. Use Data::Dumper to inspect the HASHREF or look at the module tests (found in t/*) for examples.

parse_location

This function inspects a string for location patterns on the form l:<location>[:] (see also http://twittervision.com/maps/location_examples.html) The found locations are returned in an array. If none is found, the array is empty.

strip_location

This function removes location patterns from the message string and returns the result.

BUGS

Top

Please report any bugs found or feature requests to http://code.google.com/p/www-twittervision/issues/list

SEE ALSO

Top

Net::Twitter http://twittervision.com/maps/location_examples.html http://twittervision.com/api

SOURCE AVAILABILITY

Top

The source code for this module is available from SVN at http://code.google.com/p/www-twittervision

AUTHOR

Top

Per Henrik Johansen, <per.henrik.johansen@gmail.com>

COPYRIGHT AND LICENSE

Top


WWW-Twittervision documentation  | view source Contained in the WWW-Twittervision distribution.