NAME

REST::Google::Feeds - OO interface to Google Feeds API

SYNOPSIS

use REST::Google::Feeds;

REST::Google::Feeds->http_referer('http://example.com');

my $res = REST::Google::Feeds->new('http://digg.com/rss/index.xml');

die "response status failure" if $res->responseStatus != 200;

my $feed = $res->responseData->feed;

printf "title: %s\n", $feed->title;
printf "link: %s\n", $feed->link;
printf "description: %s\n", $feed->description;

foreach my $e ( $feed->entries ) {
	printf "\n";
	printf "title: %s\n", $e->title;
	printf "link: %s\n", $e->link;
	printf "date published: %s\n", $e->publishedDate;
}

DESCRIPTION

REST::Google::Feeds provides OO interface to Google REST (aka AJAX) API for feeds.

METHODS

__PACKAGE__->http_referer()

Get/set HTTP Referer header.

__PACKAGE__->new()

The constructor use it's arguments to build a valid HTTP GET request to Google Feeds service, so it takes the same arguments as the web service takes. Please refer to 'Google Feeds AJAX API' documentation for complete list of arguments for Google Feeds service. E.g.:

my $res = REST::Google::Feeds->new(
	q => 'http://digg.com/rss/index.xml',
);

The code above will perform a following HTTP GET request:

http://ajax.googleapis.com/ajax/services/feed/load?q=http%3A%2F%2Fdigg.com%2Frss%2Findex.xml&v=1.0

Note: You can left protocol version number unspecified while making your searches since v=1.0 is passed by default.

SEE ALSO

REST::Google - the base class for this module

http://code.google.com/p/rest-google/ - this project on Google code;

http://code.google.com/apis/ajaxfeeds/documentation/#fonje - Google Feeds AJAX API

LICENSE AND COPYRIGHT

Copyright 2008, Eugen Sobchenko <ejs@cpan.org> and Sergey Sinkovskiy <glorybox@cpan.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.