NAME
Net::Google
SYNOPSIS
use Net::Google;
use constant LOCAL_GOOGLE_KEY => "********************************";
my $google = Net::Google->new(key=>LOCAL_GOOGLE_KEY);
my $search = $google->search();
$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()};
DESCRIPTION
Provides a simple OOP-ish interface to the Google SOAP API
Google methods
$google = Net::Google->new(%args)
Valid arguments are :
- key
-
String.
- debug
-
Boolean
$google->search(%args)
Valid arguments are :
- key
-
String. Google API key. If none is provided then the key passed to the parent Net::Google object will be used.
- starts_at
-
Int. First result number to display. Default is 0.
- max_results
-
Int. Number of results to return. Default is 10.
- lr
-
String or array reference. Language restrictions.
- ie
-
String or array reference. Input encoding.
- oe
-
String or array reference. Output encoding.
- safe
-
Boolean.
- filter
-
Boolean.
Returns a Net::Google::Search object. Returns undef if there was an error.
$pkg->spelling(%args)
- key
-
String. Google API key. If none is provided then the key passed to the parent Net::Google object will be used.
- phrase
-
String or array reference.
- debug
-
Int.If none is provided then the debug argument passed to the parent Net::Google object will be used.
Returns a Net::Google::Spelling object. Returns undef if there was an error.
$pkg->cache(%args)
Valid arguments are :
- key
-
String. Google API key. If none is provided then the key passed to the parent Net::Google object will be used.
- url
-
String.
- debug
-
Int.If none is provided then the debug argument passed to the parent Net::Google object will be used.
Returns a Net::Google::Cache object. Returns undef if there was an error.
Private Methods
$pkg->_soap($service,%args)
$pkg->_service($service)
VERSION
0.4
DATE
April 14, 2002
AUTHOR
Aaron Straup Cope
SEE ALSO
http://www.google.com/apis
TO DO
Add some sort of functionality for managing multiple keys. Sort of like what is describe here :
http://aaronland.net/weblog/archive/4204
LICENSE
Copyright (c) 2002, Aaron Straup Cope. All Rights Reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.