| 1 | package WebService::Shutterstock::SearchResult::Video; | ||||||||||||||||||||
| 2 | { | ||||||||||||||||||||
| 3 | 2 | $WebService::Shutterstock::SearchResult::Video::VERSION = '0.006'; | |||||||||||||||||||
| 4 | } | ||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | # ABSTRACT: Class representing a single video search result from the Shutterstock API | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 2 | ▶ | use Moo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 2 | ▶ | use WebService::Shutterstock::HasClient; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 2 | ▶ | use WebService::Shutterstock::SearchResult::Item; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 2 | with 'WebService::Shutterstock::HasClient', 'WebService::Shutterstock::SearchResult::Item'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 0 | ▶ | sub BUILDARGS { | ||||||||||||||||||
|
Subroutine
BUILDARGS: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 20 | 0 | my $class = shift; | |||||||||||||||||||
| 21 | 0 | my $args = $class->SUPER::BUILDARGS(@_); | |||||||||||||||||||
| 22 | 0 | ▶ | $args->{thumb_video} ||= $args->{sizes}->{thumb_video}; | ||||||||||||||||||
|
Condition0%0/3
$args->{"thumb_video"} ||= $args->{"sizes"}{"thumb_video"}
MC/DC0%0/2
$args->{"thumb_video"} ||= $args->{"sizes"}{"thumb_video"}
$args->{"thumb_video"}
$args->{"sizes"}{"thumb_video"}
Truth table0%0/3
A ||= B
A= $args->{"thumb_video"}B= $args->{"sizes"}{"thumb_video"}
| |||||||||||||||||||||
| 23 | 0 | ▶ | $args->{preview_video} ||= $args->{sizes}->{preview_video}; | ||||||||||||||||||
|
Condition0%0/3
$args->{"preview_video"} ||= $args->{"sizes"}{"preview_video"}
MC/DC0%0/2
$args->{"preview_video"} ||= $args->{"sizes"}{"preview_video"}
$args->{"preview_video"}
$args->{"sizes"}{"preview_video"}
Truth table0%0/3
A ||= B
A= $args->{"preview_video"}B= $args->{"sizes"}{"preview_video"}
| |||||||||||||||||||||
| 24 | 0 | ▶ | $args->{preview_image_url} ||= $args->{sizes}->{preview_image}->{url}; | ||||||||||||||||||
|
Condition0%0/3
$args->{"preview_image_url"} ||= $args->{"sizes"}{"preview_image"}{"url"}
MC/DC0%0/2
$args->{"preview_image_url"} ||= $args->{"sizes"}{"preview_image"}{"url"}
$args->{"preview_image_url"}
$args->{"sizes"}{"preview_image"}{"url"}
Truth table0%0/3
A ||= B
A= $args->{"preview_image_url"}B= $args->{"sizes"}{"preview_image"}{"url"}
| |||||||||||||||||||||
| 25 | 0 | return $args; | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 2 | has video_id => ( is => 'ro' ); # sic, should be image_id to be consistant I think | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 2 | has thumb_video => ( is => 'ro' ); | |||||||||||||||||||
| 31 | 2 | has preview_video => ( is => 'ro' ); | |||||||||||||||||||
| 32 | 2 | has preview_image_url => ( is => 'ro' ); | |||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 2 | has submitter_id => ( is => 'ro' ); | |||||||||||||||||||
| 35 | 2 | has duration => ( is => 'ro' ); | |||||||||||||||||||
| 36 | 2 | has aspect_ratio_common => ( is => 'ro' ); | |||||||||||||||||||
| 37 | 2 | has aspect => ( is => 'ro' ); | |||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 0 | ▶ | sub video { | ||||||||||||||||||
|
Subroutine
video: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 41 | 0 | my $self = shift; | |||||||||||||||||||
| 42 | 0 | return $self->new_with_client( 'WebService::Shutterstock::Video', %$self ); | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 2 | 1; | |||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | __END__ | ||||||||||||||||||||