- PHP is setup and configured correctly
- Composer is setup on your machine (Either globally or locally). This readme won't go into the specifics. But Composer has a good writeup
Create composer.json with these contents
{
"require": {
"gettyimages/gettyimages-api": "dev-master"
}
}
Run the following command
composer install
Create your .php file
<?php
require 'vendor/autoload.php';
use GettyImages\Api\GettyImages_Client;
$apiKey = "myApiKey";
$apiSecret = "myApiSecret";
$client = new GettyImages_Client($apiKey,$apiSecret);
$response = $client->Search()->Images()->withPhrase("dog")->execute();
var_dump($response);
composer require gettyimages/gettyimages-api