use strict;
use warnings;
use WebService::Browshot;

my $client = WebService::Browshot->new(key => $ENV{BROWSHOT_API_KEY});
my $file = $client->screenshot_thumbnail_file(id => 1103982291, width => 640, file => 'thumbnail.png');
die "Download failed\n" unless $file;
print "$file\n";
