WebService::Browshot
====================

Perl extension for Browshot http://www.browshot.com/, a web service to create website screenshots in real-time.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

API 1.32

New capture options are passed as named arguments to the existing screenshot,
multiple, batch, and crawl methods. No request format change is needed.

Download PDF and video output with:

   $browshot->screenshot_pdf(id => $id);
   $browshot->screenshot_pdf_file(id => $id, file => 'capture.pdf');
   $browshot->screenshot_video(id => $id);
   $browshot->screenshot_video_file(id => $id, file => 'capture.webm');

Video supports WebM (default), MP4, and animated GIF. Wait for status=finished
before downloading. See the module documentation for options and credit costs.

TESTS

Run the offline unit tests without an API key:

   prove -l t

Run the read-only API 1.32 tests against your account:

   BROWSHOT_REMOTE_TESTS=1 BROWSHOT_KEY=your_api_key prove -lv t/API-1.32-remote.t

To test successful downloads, also set BROWSHOT_PDF_ID, BROWSHOT_WEBM_ID,
BROWSHOT_MP4_ID, and/or BROWSHOT_GIF_ID to finished test captures belonging to
your account. BROWSHOT_SCREENSHOT_ID enables checks of an existing screenshot
and thumbnail. BROWSHOT_BASE can override the API base for a private test server.
The test creates no captures, shares, hosting jobs, batches, or crawls.

The original remote tests in t/WebService-Browshot.t assume the historical
zero-balance test account. Run the API 1.32 remote test separately for a regular
customer account.

DEPENDENCIES

This module requires these other modules and libraries:

  URI::Encode
  JSON
  LWP::UserAgent

SOURCE

The source code is available on github at https://github.com/juliensobrier/browshot-perl

CPAN

The library is available on CPAN at https://metacpan.org/pod/WebService::Browshot

COPYRIGHT AND LICENCE

Copyright (C) 2012-2013 by Julien Sobrier

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.


