NAME
WebService::Shutterstock::Video - Represent the set of information about a Shutterstock video as returned by the API
VERSION
version 0.006
SYNOPSIS
my $video = $shutterstock->video(12345);
printf(
"Video %d (%dx%d) - %s\n",
$video->id,
$video->size('sd_original')->{width},
$video->size('sd_original')->{height},
$video->description
);
print "Categories:\n";
foreach my $category ( @{ $video->categories } ) {
printf( " - %s (%d)\n", $category->{category}, $category->{category_id} );
}
DESCRIPTION
This module serves as a proxy class for the data returned from a URL like http://api.shutterstock.com/videos/12345.json. Please look at that data structure for a better idea of exactly what each of the attributes in this class contains.
ATTRIBUTES
id
The ID of this video on the Shutterstock system
categories
ArrayRef of category names and IDs.
description
keywords
ArrayRef of keywords describing this video
aspect_ratio_common
The aspect ratio in string form (i.e "4:3")
aspect
The aspect ratio of this video in decimal form (i.e. 1.3333)
duration
Length of the video in seconds
r_rated
Boolean
sizes
Returns a HashRef of information about the various sizes for the image.
model_release
submitter_id
ID of the submitter who uploaded the video to Shutterstock.
web_url
A URL for the main page on Shutterstock's site for this video.
METHODS
is_available
Boolean
size
Returns details for a specific size. Some sizes provide dimensions, format, FPS and file size (lowres_mpeg, sd_mpeg, sd_original). Other sizes provide a URL for a video or still preview (thumb_video, preview_video, preview_image).
AUTHOR
Brian Phillips <bphillips@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Brian Phillips and Shutterstock, Inc. (http://shutterstock.com).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.