WebService::GData::YouTube::Feed::Video - a Video YouTube contents(read/write) for data API v2.
use WebService::GData::YouTube; #create an object that only has read access my $yt = new WebService::GData::YouTube(); #get a feed response from YouTube; my $videos = $yt->get_top_rated; #more specific: my $videos = $yt->get_top_rated('JP','Comedy'); foreach my $video (@$videos) { $video->video_id; $video->title; $video->content; $video->view_count; $video->favorite_count; $video->duration; #...etc } #connect to a YouTube account my $auth = new WebService::GData::ClientLogin( email=>'...' password=>'...', key =>'...' ); #give write access with a $auth object that you created my $yt = new WebService::GData::YouTube($auth); my $videos = $yt->get_user_videos();#returns videos from the loggedin user even if private #update the playlist by adding the playlist title as a keyword foreach my $video (@$videos) { if($video->video_id eq $myid) { $video->delete(); }else { if($video->is_listing_allowed){ $video->kewords($playlist->title.','.$video->keywords); $video->save(); } } }
!WARNING! Documentation in progress.
!DEVELOPER RELEASE! API may change, program may break or be under optimized.
inherits from WebService::GData::Feed::Entry.
This package represents a Youtube Video. If you are logged in you can edit existing video metadata,create new metadata, upload videos.
Most of the time you will not instantiate this class directly but use some of the helpers in the WebService::GData::YouTube class.
See also:
WebService::GData::YouTube::Doc::BrowserBasedUpload - overview of the browser based upload mechanism
Create a WebService::GData::YouTube::Feed::Video instance.
Parameters:
jsonc_video_entry_feed:Object
authorization:Object
or
If an authorization object is set (WebService::GData::ClientLogin),
it will allow you to access private contents and insert/edit/delete/upload videos.
All the following read only methods give access to the information contained in a video feed.
All these methods represents information about the video but as these information can be updated,
you have read/write access on them.
It is therefore necessary to be logged in programmaticly to be able to use them.
These methods allow to grant access to certain activity.
You can decide to unlist the video from the search, make it private or forbid comments,etc.
These methods actually query the service to save your edits.
You must be logged in programmaticly to be able to use them.
The save method will do an insert if there is no video_id or an update if there is one.
none
JSON
LWP
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.
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.