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

NAME

WebService::GData::Feed::Author - Represent an xml author tag.

SYNOPSIS

    use WebService::GData::Feed;
    
    my $feed = new WebService::GData::Feed($jsonfeed);
    
   my $authors=  $feed->author();
   
   foreach my $author (@$authors){
       #print $author->name,$author->uri;
   }

DESCRIPTION

inherits from WebService::GData

This package wraps the author data found in a feed using the json format of the Google Data API v2 (no other format is supported!).

CONSTRUCTOR

new

    Accept the content of the author tag from a feed that has been perlified (from_json($json_string)).

    Parameters

    author_info:HashRef - author data coming from a json feed.

    Returns

    WebService::GData::Feed::Author

    Throws

    WebService::GData::Error - invalid_parameter_type if it is not an hash reference.

    Example:

        use WebService::GData::Feed::Author;
        
        my $author = new WebService::GData::Feed::Author($jsonfeed->{author}->[0]);
        
        #or
        my $author = new WebService::GData::Feed::Author({
            name => {
                '$t'=>'john'
            },
            uri => {
                '$t'=>'http://www.google.com/'
            }
        });    
        $author->name("john");
        
        $author->name();#john

GET/SET METHODS

name

    get/set the name of the author.

    Parameters

    none - as a getter
    name:Scalar as a setter

    Returns

    none - as a setter
    name:Scalar as a getter

    Example:

        use WebService::GData::Feed::Author;
        
        my $author = new WebService::GData::Feed::Author($jsonfeed->{author}->[0]);
        
        $author->name("john");
        
        $author->name();#john

uri

    get/set the uri of the author.

    Parameters

    none - as a getter
    uri:Scalar as a setter

    Returns

    none - as a setter
    uri:Scalar as a getter

    Example:

        use WebService::GData::Feed::Author;
        
        my $author = new WebService::GData::Feed::Author($jsonfeed->{author}->[0]);
        
        $author->uri("http://www.youtube.com/john");
        
        $author->uri();#"http://www.youtube.com/john"

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.