Guest User

Untitled

a guest
Jul 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. require __DIR__.'/vendor/autoload.php'; // <--- Notice this line, it's missing in example file
  3. // include __DIR__.'/build/GettyImagesApi.phar'; // <--- Uncaught DI\Definition\Exception\DefinitionException: Entry "ICurler" cannot be resolved
  4. include __DIR__.'/src/GettyImages_Client.php';
  5.  
  6. use GettyImages\Api\GettyImages_Client;
  7.  
  8. $apiKey = "superSecretApiKey";
  9. $apiSecret = "superSecretApiSecret";
  10.  
  11. //Example of built in search images endpoint
  12. $types = array("easyaccess", "editorialsubscription");
  13. $client = GettyImages_Client::getClientWithClientCredentials("$apiKey", "$apiSecret");
  14. $response = $client->SearchImages()->withPhrase("cat")->withProductTypes($types)->execute();
  15.  
  16. var_dump($response);
Add Comment
Please, Sign In to add comment