Brian Phillips > WebService-Shutterstock-0.005 > WebService::Shutterstock::LicensedVideo

Download:
WebService-Shutterstock-0.005.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.005   Source   Latest Release: WebService-Shutterstock-0.006

NAME ^

WebService::Shutterstock::LicensedVideo - Allows for interogating and saving a licensed video from the Shutterstock API

VERSION ^

version 0.005

SYNOPSIS ^

        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');

ATTRIBUTES ^

video_id

thumb_large_url

allotment_charge

download_url

METHODS ^

download

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.

WARNING: files will be silently overwritten if an existing file of the same name already exists.

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.

syntax highlighting: