WebService::YouTube - Perl interfece to YouTube


WebService-YouTube documentation Contained in the WebService-YouTube distribution.

Index


Code Index:

NAME

Top

WebService::YouTube - Perl interfece to YouTube

VERSION

Top

This document describes WebService::YouTube version 1.0.3

SYNOPSIS

Top

    use WebService::YouTube;

    my $youtube = WebService::YouTube->new( { dev_id => 'YOUR_DEV_ID' } );

    # Get videos via REST API
    my @videos = $youtube->videos->list_featured;

    # Get videos via RSS Feed
    my @videos = $youtube->feeds->recently_added;

DESCRIPTION

Top

This is a Perl interface to YouTube API and RSS. See Developers Page http://youtube.com/dev and About RSS http://www.youtube.com/rssls for details.

This module support only Legacy API, does not support YouTube Data API based on Google data protocol. See YouTube Data API Overview http://code.google.com/apis/youtube/overview.html for details.

SUBROUTINES/METHODS

Top

new(\%fields)

Creates and returns a new WebService::YouTube object. %fields can contain parameters enumerated in ACCESSORS section.

videos( )

Returns a WebService::YouTube::Videos object.

feeds( )

Returns a WebService::YouTube::Feeds object.

ACCESSORS

dev_id

Developer ID

ua

LWP::UserAgent object

DIAGNOSTICS

Top

None.

CONFIGURATION AND ENVIRONMENT

Top

WebService::YouTube requires no configuration files or environment variables.

DEPENDENCIES

Top

Class::Accessor::Fast, WebService::YouTube::Videos, WebService::YouTube::Feeds

INCOMPATIBILITIES

Top

WWW::YouTube

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests to bug-webservice-youtube@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-YouTube. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR

Top

Hironori Yoshida <yoshida@cpan.org>

LICENSE AND COPYRIGHT

Top


WebService-YouTube documentation Contained in the WebService-YouTube distribution.

#
# $Id: YouTube.pm 11 2007-04-09 04:34:01Z hironori.yoshida $
#
package WebService::YouTube;
use strict;
use warnings;
use version; our $VERSION = qv('1.0.3');

use base qw(Class::Accessor::Fast);

__PACKAGE__->mk_accessors(qw(dev_id ua));

use Carp;
use WebService::YouTube::Feeds;
use WebService::YouTube::Videos;

sub videos {
    my $self = shift;

    $self->{_videos} ||= WebService::YouTube::Videos->new($self);
    return $self->{_videos};
}

sub feeds {
    my $self = shift;

    $self->{_feeds} ||= WebService::YouTube::Feeds->new($self);
    return $self->{_feeds};
}

1;

__END__