WebService::Shutterstock::LicensedVideo - Allows for interogating and saving a licensed video from the Shutterstock API
version 0.006
my $licensed_video = $subscription->license_video(video_id => 11234, size => 'lowres'); # retrieve the bytes of the file my $jpg_bytes = $licensed_video->download; # or, save the file to a valid filename $licensed_video->download(file => '/my/videos/my-video.mpg'); # or, specify the directory and the filename will reflect what the server specifies # (typically as something like shutterstock_11234.mpg) my $path_to_file = $licensed_video->download(directory => '/my/videos');
Downloads a licensed video. If no arguments are specified, the raw bytes of the file are returned. You can also specify a file OR a directory (one or the other) to save the file instead of returning the raw bytes (as demonstrated in the SYNOPSIS).
If a directory or file option is given, the path to the saved file is returned.
directory
file
WARNING: files will be silently overwritten if an existing file of the same name already exists.
Brian Phillips <bphillips@cpan.org>
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.
To install WebService::Shutterstock, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Shutterstock
CPAN shell
perl -MCPAN -e shell install WebService::Shutterstock
For more information on module installation, please visit the detailed CPAN module installation guide.