<?php
require 'vendor/autoload.php';

$client = new Browshot(getenv('BROWSHOT_API_KEY'));
$file = $client->screenshot_thumbnail_file(1103982291, 'thumbnail.png', array('width' => 640));
if (!is_string($file) || $file === '') {
    throw new RuntimeException('Download failed');
}
echo $file, PHP_EOL;
