Aaron Straup Cope > Net-Google-0.53 > Net::Google

Download:
Net-Google-0.53.tar.gz

Dependencies

Annotate this POD

Related Modules

WWW::Mechanize
DBD::Google
LWP::UserAgent
Data::Dumper
XML::RSS
LWP::Simple
HTTP::Request
HTML::Entities
more...
By perlmonks.org

CPAN RT

New  6
Open  1
Stalled  1
View Bugs
Report a bug
Module Version: 0.53   Source   Latest Release: Net-Google-1.0.1

NAME ^

Net::Google - simple OOP-ish interface to the Google SOAP API

SYNOPSIS ^

 use Net::Google;
 use constant LOCAL_GOOGLE_KEY => "********************************";

 my $google = Net::Google->new(key=>LOCAL_GOOGLE_KEY);
 my $search = $google->search();

 # Search interface

 $search->query(qw(aaron straup cope));
 $search->lr(qw(en fr));
 $search->ie("utf8");
 $search->oe("utf8");
 $search->starts_at(5);
 $search->max_results(15);

 map { print $_->title()."\n"; } @{$search->results()};

 # or...

 foreach my $r (@{$search->response()}) {
   print "Search time :".$r->searchTime()."\n";

   # returns an array ref of Result objects
   # the same as the $search->results() method
   map { print $_->URL()."\n"; } @{$r->resultElements()};
 }

 # Spelling interface

 print $google->spelling(phrase=>"muntreal qwebec")->suggest(),"\n";

 # Cache interface

 my $cache = $google->cache(url=>"http://search.cpan.org/recent");
 print $cache->get();

DESCRIPTION ^

Provides a simple OOP-ish interface to the Google SOAP API

Google methods ^

$google = Net::Google->new(%args)

Valid arguments are :

$google->search(%args)

Valid arguments are :

Returns a Net::Google::Search object. Returns undef if there was an error.

$pkg->spelling(%args)

Returns a Net::Google::Spelling object. Returns undef if there was an error.

$pkg->cache(%args)

Valid arguments are :

Returns a Net::Google::Cache object. Returns undef if there was an error.

VERSION ^

0.53

DATE ^

$Date: 2003/02/22 16:48:52 $

AUTHOR ^

Aaron Straup Cope

CONTRIBUTORS ^

Marc Hedlund <marc@precipice.org>

SEE ALSO ^

http://www.google.com/apis

Net::Google::Search

Net::Google::Spelling

Net::Google::Cache

Net::Google::Response

Net::Google::Service

http://aaronland.info/weblog/archive/4231

TO DO ^

BUGS ^

Please report all bugs via http://rt.cpan.org

LICENSE ^

Copyright (c) 2002-2003, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.