Getty Images APIs enable seamless integration of Getty Images expansive content, powerful search and rich metadata directly into your internal workflows, products and services. With Connect’s API solutions, you can fully control, customize and scale as you grow. The Connect API uses JSON over HTTP POST to allow you to build applications capable of search and download on Getty Images using an active download agreement.
Register Getty images api and get api key for use to generate session. You can download Getty Images api code sample from https://github.com/gettyimages/connect/tree/master/code-samples.
First of all download zend library files from https://github.com/zendframework/zf1 and extract the folder where you can setup Getty Images API as /var/www/gt/ and follow the steps:
1. Include the Zend client file in generate session file.
$createSessionArray = array(
“RequestHeader” => array(
“Token” => “”,
“CoordinationId” => “”
),
“CreateSessionRequestBody” => array(
“SystemId” => $systemId,
“SystemPassword” => $systemPassword,
“UserName” => $userName,
“UserPassword” => $userPassword,
“RememberedUser” => “false”
)
); 4. Encode data to json (requires PHP 5.2 or greater, if using earlier use PEAR’s Service_JSON)
$json = json_encode($createSessionArray);
5. Create Zend_Http_Client, set JSON data and type, set method to POST
$httpClient = new Zend_Http_Client($endpoint);
$httpClient->setRawData($json, ‘application/json’);
$httpClient->setMethod(Zend_Http_Client::POST); // all getty api requests are POST
// create client and set json data and datatype
$httpClient = new Zend_Http_Client($endpoint);
$httpClient->setRawData($json, ‘application/json’);
$httpClient->setMethod(Zend_Http_Client::POST); // all getty api requests are POST
For years, creating digital content was all about one thing: pleasing search engines. If you ranked on Google, you won. Everything else—social shares, referrals, even conversions—usually flowed from that visibility. […]
Grocery supply chains form the backbone of food distribution, ensuring products move from farms and manufacturers to store shelves and, increasingly, to customers’ doorsteps. Traditionally, these supply chains struggled with […]
If you write code, you already know how important it is to keep it readable and organised. One simple yet powerful habit is commenting. It helps you explain sections of […]