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

use Intellex\Pixabay\ImagesAPI;

\Intellex\Debugger\Debugger::initHandlers();
function debug($data) { \Intellex\Debugger\Debugger::dump($data, 1); }


define('API_KEY', '6316849-782962b5b451c1754a12aa720');

$api = new ImagesAPI(API_KEY);
$d = $api->fetch(['category' => 'travel', 'per_page' => 200]);

foreach($d->hits as $image) {
	$src = $image->getURLForSize180();
	echo "<p><img src=\"{$src}\" /></p>";
}
