Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
WWW::YoutubeViewer::ViUser(Contributed Perl DocumWWW::YoutubeViewer::Videos(3)

NAME
       WWW::YoutubeViewer::Videos - videos handler.

SYNOPSIS
	   use WWW::YoutubeViewer;
	   my $obj = WWW::YoutubeViewer->new(%opts);
	   my $info = $obj->video_details($videoID);

SUBROUTINES/METHODS
   videos_from_category($catID)
       Get videos from a category ID.

   my_likes()
       Get the videos liked by the authenticated user.

   my_dislikes()
       Get the videos disliked by the authenticated user.

   send_rating_to_video($videoID, $rating)
       Send rating to a	video. $rating can be either 'like' or 'dislike'.

   like_video($videoID)
       Like a video. Returns true on success.

   dislike_video($videoID)
       Dislike a video.	Returns	true on	success.

   videos_details($id, $part)
       Get info	about a	videoID, such as: channelId, title, description, tags,
       and categoryId.

       Available values	for part are: id, snippet, contentDetails player,
       statistics, status and topicDetails.

       $part string can	contain	more values, comma-separated.

       Example:

	   part	=> 'snippet,contentDetails,statistics'

       When $part is "undef", it defaults to snippet.

   Return details
       Each function returns a HASH ref, with a	key called 'results', and
       another key, called 'url'.

       The 'url' key contains a	string,	which is the URL for the retrieved
       content.

       The 'results' key contains another HASH ref with	the keys 'etag',
       'items' and 'kind'.  From the 'results' key, only the 'items' are
       relevant	to us. This key	contains an ARRAY ref, with a HASH ref for
       each result. An example of the item array's content are shown below.

       video_contentDetails($videoID)
	       items =>	[
			  {
			    contentDetails => {
			      caption	      => "false",
			      definition      => "sd",
			      dimension	      => "2d",
			      duration	      => "PT1H20M10S",
			      licensedContent => bless(do{\(my $o = 0)}, "JSON::XS::Boolean"),
			    },
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/KU_bqVk91zBQGXrMtEDZgkQMkhU\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			  },
		       ]

       video_id($videoID)
	       items =>	[
			  {
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/bvAWXfDY4QPsx_UgtmMPFcxPLQc\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			  },
			],

       video_player($videoID)
	       items =>	[
			  {
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/nr03GopgH8bb755ppx5BA_1VsF8\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			    player => {
			      embedHtml	=> "<iframe type='text/html' src='http://www.youtube.com/embed/f6df3s3x3zo' width='640'	height='360' frameborder='0' allowfullscreen='true'/>",
			    },
			  },
			],

       video_statistics($videoID)
	       items =>	[
			  {
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/j01_qxKqxc3BMrFBbX2eiPWkAmo\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			    statistics => {
			      commentCount  => 2,
			      dislikeCount  => 1,
			      favoriteCount => 0,
			      likeCount	    => 5,
			      viewCount	    => 174,
			    },
			  },
			],

       video_status($videoID)
	       items =>	[
			  {
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/jaa690eVtSvHTYRSSPD3mc1mlIY\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			    status => {
			      embeddable    => bless(do{\(my $o	= 1)}, "JSON::XS::Boolean"),
			      license	    => "youtube",
			      privacyStatus => "public",
			      uploadStatus  => "processed",
			    },
			  },
			],

       video_topicDetails($videoID)
	       items =>	[
			  {
			    etag => "\"5cYuq_ImPkYn_h2RKDdX8DHvM2g/XnxCuOGwiR8MNhH-iHNxHB-ROWM\"",
			    id => "f6df3s3x3zo",
			    kind => "youtube#video",
			    topicDetails => { topicIds => ["/m/0126n", "/m/0jpv", "/m/07h44"] },
			  },
			],

AUTHOR
       Trizen, "<trizenx at gmail.com>"

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc WWW::YoutubeViewer::Videos

LICENSE	AND COPYRIGHT
       Copyright 2013-2015 Trizen.

       This program is free software; you can redistribute it and/or modify it
       under the terms of either: the GNU General Public License as published
       by the Free Software Foundation;	or the Artistic	License.

       See <http://dev.perl.org/licenses/> for more information.

perl v5.24.1			  2017-07-08	 WWW::YoutubeViewer::Videos(3)

NAME | SYNOPSIS | SUBROUTINES/METHODS | AUTHOR | SUPPORT | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=WWW::YoutubeViewer::Videos&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help