The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::GData::Feed - Abstract class wrapping json atom feed for google data API v2.

SYNOPSIS

    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 

DESCRIPTION

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.

CONSTRUCTOR

new

    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 - a json feed perlified
    auth:Object - an authorization object like WebService::GData::ClientLogin

    Returns

    WebService::GData::Feed

SET/GET METHODS

All the following methods work as both setter and getters.

title

    set/get the title of the feed.

updated

    get the last updated date of the feed.

category

    Get the categories of the feed in a array reference containing hash references with scheme/term keys.

etag

    Get the etag of the feed.

author

    Get the author of the feed.

total_items

    Get the total result of the feed.

total_results

    Get the total result of the feed. Alias for total_items

start_index

    Get the start number of the feed.

items_per_page

    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.

entry

    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.

BUGS AND LIMITATIONS

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)!

AUTHOR

shiriru <shirirulestheworld[arobas]gmail.com>

LICENSE AND COPYRIGHT

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:

Around line 204:

You forgot a '=back' before '=head3'

Around line 211:

You forgot a '=back' before '=head3'

Around line 217:

You forgot a '=back' before '=head3'

Around line 223:

You forgot a '=back' before '=head3'

Around line 229:

You forgot a '=back' before '=head3'

Around line 235:

You forgot a '=back' before '=head3'

Around line 241:

You forgot a '=back' before '=head3'

Around line 247:

You forgot a '=back' before '=head3'

Around line 253:

You forgot a '=back' before '=head3'

Around line 259:

You forgot a '=back' before '=head3'

Around line 273:

You forgot a '=back' before '=head3'

Around line 279:

You forgot a '=back' before '=head3'

Around line 287:

You forgot a '=back' before '=head3'

Around line 298:

You forgot a '=back' before '=head1'