File Coverage

blib/lib/WebService/Shutterstock/SearchResult/Image.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package WebService::Shutterstock::SearchResult::Image;
2             {
3             $WebService::Shutterstock::SearchResult::Image::VERSION = '0.006';
4             }
5              
6             # ABSTRACT: Class representing a single image search result from the Shutterstock API
7              
8 9     9   50 use strict;
  9         19  
  9         278  
9 9     9   53 use warnings;
  9         14  
  9         219  
10 9     9   45 use Moo;
  9         17  
  9         50  
11              
12 9     9   3272 use WebService::Shutterstock::HasClient;
  9         35  
  9         661  
13 9     9   6669 use WebService::Shutterstock::SearchResult::Item;
  9         28  
  9         1181  
14              
15             with 'WebService::Shutterstock::HasClient', 'WebService::Shutterstock::SearchResult::Item';
16              
17              
18             has photo_id => ( is => 'ro' ); # sic, should be image_id to be consistant I think
19              
20             has thumb_small => ( is => 'ro' );
21             has thumb_large => ( is => 'ro' );
22             has preview => ( is => 'ro' );
23              
24              
25             sub image {
26 1     1 1 1653 my $self = shift;
27 1         10 return $self->new_with_client( 'WebService::Shutterstock::Image', image_id => $self->photo_id );
28             }
29              
30             1;
31              
32             __END__