NAME

WebService::GData::Feed::Entry::Content - Represent an xml Entry Content tag.

SYNOPSIS

 use WebService::GData::Feed::Entry;
 
 my $feed = new WebService::GData::Feed::Entry($jsonentry);
 
my $content=  $feed->content();
$content->type();#"application/x-shockwave-flash"
$content->src();#http://www.youtube.com/v/qW...YvHqLE

DESCRIPTION

inherits from WebService::GData

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

CONSTRUCTOR

new

    Accept the data of the content tag found in a entry tag of a feed that has been perlified (from_json($json_string)).

    Parameters

    content_info:HashRef - content data coming from a json feed entry tag.

    Returns

    WebService::GData::Feed::Entry::Content

    Throws

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

    Example:

    use WebService::GData::Feed::Entry::Content;
    
    my $link = new WebService::GData::Feed::Entry::Content($jsonentry->{content});
    
    #or
    my $content = new WebService::GData::Feed::Entry::Content({
        src =>"http://www.youtube.com",
        type => "text/html",
    });    
    
    $content->src();#"http://www.youtube.com"

GET/SET METHODS

src

    get/set the src of the content.

    Parameters

    none - as a getter
    src:Scalar as a setter

    Returns

    none - as a setter
    src:Scalar as a getter

    Example:

    use WebService::GData::Feed::Entry::Content;
    
    my $link = new WebService::GData::Feed::Entry::Content($jsonentry->{content});
    
    $link->src("http://www.youtube.com/v/qWAY3...vHqLE");
    
    $link->src();#http://www.youtube.com/v/qWAY3...vHqLE

type

    get/set the type of the content.

    Parameters

    none - as a getter
    type:Scalar as a setter

    Returns

    none - as a setter
    type:Scalar as a getter

    Example:

    use WebService::GData::Feed::Entry::Content;
    
    my $link = new WebService::GData::Feed::Entry::Content($jsonentry->{content});
    
    $link->type("text/html");
    
    $link->type();#text/html

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.