Bing::Search::Result::Video - Video search results


Bing-Search documentation Contained in the Bing-Search distribution.

Index


Code Index:

NAME

Top

Bing::Search::Result::Video - Video search results

METHODS

Top

Title

The name of the video.

SourceTitle

The name of the video's source, ie, "Dailymotion" or "YouTube".

PlayUrl

A URI object representing a link to the original video file, if available.

RunTime

A DateTime::Duration object representing the video's play time.

ClickThroughPageUrl

A URI object representing a link to play the video via Bing's "Video" page.

StaticThumbnail

A Bing::Search::Result::Video::StaticThumbnail object, representing a static image thumbnail of the video.

AUTHOR

Top

Dave Houston, dhouston@cpan.org, 2010

LICENSE

Top

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.


Bing-Search documentation Contained in the Bing-Search distribution.

package Bing::Search::Result::Video;
use Moose;
use Bing::Search::Result::Video::StaticThumbnail;

extends 'Bing::Search::Result';

with 'Bing::Search::Role::Types::UrlType';
with 'Bing::Search::Role::Types::DurationType';

with qw(
   Bing::Search::Role::Result::Title
   Bing::Search::Role::Result::SourceTitle
   Bing::Search::Role::Result::PlayUrl
   Bing::Search::Role::Result::RunTime
   Bing::Search::Role::Result::ClickThroughPageUrl
);

has 'StaticThumbnail' => ( is => 'rw', isa => 'Bing::Search::Result::Video::StaticThumbnail' );

before '_populate' => sub { 
   my $self = shift;
   my $data = $self->data;
   my $t = Bing::Search::Result::Video::StaticThumbnail->new;
   my $thumb = delete $data->{StaticThumbnail};
   $t->data( $thumb );
   $t->_populate();
   $self->StaticThumbnail( $t );
};

__PACKAGE__->meta->make_immutable;