WebService::GData::Feed - Abstract class wrapping json atom feed for google data API v2.
use WebService::GData::Feed; my $feed = new WebService::GData::Feed($jsonfeed); $feed->title; $feed->author; my @entries = $feed->entry();#send back WebService::GData::Feed::Entry or a service related Entry object
inherits from WebService::GData
This package wraps the result from a query to a feed using the json format of the Google Data API v2 (no other format is supported!). It gives you access to some of the data via wrapper methods and works as a factory to get access to the entries for each service. If you use a YouTube service, calling the entry() method will send you back YouTube::Feed::Entry's. If you use a Calendar service, calling the entry() method will send you back a Calendar::Feed::Entry. By default, it returns a WebService::GData::Feed::Entry which gives you only a read access to the data. Unless you implement a service, you should never instantiate this class directly.
Create a WebService::GData::Feed instance.
Accept a json feed entry that has been perlified (from_json($json_string)) and an optional auth object. The auth object is passed along each entries classes but the Feed class itself does not use it.
Parameters
json_feed:Object
auth:Object
Returns
WebService::GData::Feed
All the following methods work as both setter and getters.
set/get the title of the feed.
get the last updated date of the feed.
Get the categories of the feed in a array reference containing hash references with scheme/term keys.
Get the etag of the feed.
Get the author of the feed.
Get the total result of the feed.
Get the total result of the feed. Alias for total_items
Get the start number of the feed.
Get the the link of items per page.
Get the links of the feed in a array reference containing hash references with rel/type/href keys.
Get a specific link entry by looking in the rel attribute of the link tag.
Example:
my $previous_url= my $feed->get_link('previous'); #create a new entry with application/x-www-form-urlencoded content-type my $batch_url= my $feed->get_link('batch');
Get a the previous link if set or undef.
Get a the next link if set or undef.
This method return an array reference of Feed::* objects.
It works as a factory by instantiating the proper Feed::* class.
ie,if you read a Video feed from a youtube service, it will instantiate the WebService::GData::Youtube::Feed::Video class and feed it the result.
If you do me the favor to _use_ this module and find a bug, please email me i will try to do my best to fix it (patches welcome)!
shiriru <shirirulestheworld[arobas]gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
14 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head3'
You forgot a '=back' before '=head1'
To install WebService::GData, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::GData
CPAN shell
perl -MCPAN -e shell install WebService::GData
For more information on module installation, please visit the detailed CPAN module installation guide.