NAME

WWW::Google::CustomSearch::Item - Placeholder for Google JSON/Atom Custom Search Item.

VERSION

Version 0.11

DESCRIPTION

METHODS

kind()

Returns the 'kind' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Kind: ", $item->kind, "\n" if defined $item->kind;
}

link()

Returns the 'link' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Link: ", $item->link, "\n" if defined $item->link;
}

displayLink()

Returns the 'displayLink' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Display Link: ", $item->displayLink, "\n" if defined $item->displayLink;
}

snippet()

Returns the 'snippet' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Snippet: ", $item->snippet, "\n" if defined $item->snippet;
}

htmlSnippet()

Returns the 'htmlSnippet' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item HTML Snippet: ", $item->htmlSnippet, "\n" if defined $item->htmlSnippet;
}

cacheId()

Returns the 'cacheId' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Cache Id: ", $item->cacheId, "\n" if defined $item->cacheId;
}

formattedUrl()

Returns the 'formattedUrl' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Formatted URL: ", $item->formattedUrl, "\n" if defined $item->formattedUrl;
}

htmlFormattedUrl()

Returns the 'htmlFormattedUrl' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item HTML Formatted URL: ", $item->htmlFormattedUrl, "\n" if defined $item->htmlFormattedUrl;
}

title()

Returns the 'title' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item Title: ", $item->title, "\n" if defined $item->title;
}

htmlTitle()

Returns the 'htmlTitle' attribute of the search.

use strict; use warnings;
use WWW::Google::CustomSearch;

my $api_key = 'Your_API_Key';
my $cx      = 'Search_Engine_Identifier';
my $engine  = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
my $result  = $engine->search("Google");
foreach my $item ($result->items) {
    print "Item HTML Title: ", $item->htmlTitle, "\n" if defined $item->htmlTitle;
}

AUTHOR

Mohammad S Anwar, <mohammad.anwar at yahoo.com>

BUGS

Please report any bugs or feature requests to bug-www-google-customsearch at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Google-CustomSearch. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WWW::Google::CustomSearch::Item

You can also look for information at:

LICENSE AND COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DISCLAIMER

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.