2017 © Pedro Peláez
 

library connect_sdk

Getty Images API SDK - PHP

image

gettyimages/connect_sdk

Getty Images API SDK - PHP

  • Tuesday, November 1, 2016
  • by smallperuvian
  • Repository
  • 14 Watchers
  • 7 Stars
  • 281 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Getty Images API SDK - PHP

Build Status, (*1)

Introduction

This SDK makes using the Getty Images API easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the Documentation., (*2)

  • Search for images and videos from our extensive creative and editorial catalogs.
  • Get image and video metadata.
  • Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).
  • Custom Request functionality that allows user to call any endpoint.

Help & Support

Getting started

Obtain an API Key

If you don't already have an API key, fill out and submit the contact form to be connected to our Sales team., (*3)

Installing the package

The SDK is available on Packagist., (*4)

Examples

See example.md for examples., (*5)

Building From Source Code

Source code is only needed if you would like to contribute to the project. Otherwise, use the package, (*6)

Initial Setup

Assumptions

  • You have PHP >=7.2 setup

PHP.ini settings to build the code

[Phar]
; http://php.net/phar.readonly
phar.readonly = Off

//Extensions needed for Windows OSs
extension=php_curl.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_sockets.dll
extension=php_openssl.dll

Install via Composer

Please refer to README_ComposerInstall.md, (*7)

Quick Build

If everything is setup on your machine where PHP will run, you can most likely run BuildSDK.bat or Build.sh to automatically build the phar. If something fails please read the error messages, PHP can have a finicky setup if you've never tried to use it to build a package before., (*8)

Windows

build.bat

Linux / OSX

Prerequisites

On Ubuntu, you may need to install a few additional packages, (*9)

sudo apt update
sudo apt install php-xml php-mbstring

Building

./build.sh

This will put GettyImagesApi.phar in a build folder. Then you can use the package as you would any other phar., (*10)

The build does a few things for you automatically, (*11)

  1. Determines if you have composer.phar and will retrieve it if you don't have it
  2. Runs composer install to get dependencies that are outlined in the composer.json file
  3. Then produces the phar file in ./build/GettyImagesApi.phar

Manually Installing PHP libraries

BuildSDK should get all the dependencies for you but if you want to do the update without a build From the root of the repository, (*12)

php composer.phar install

If you want the test dependencies

php composer.phar install --require-dev

This command should install PHPUnit and any other php dependency libraries, (*13)

Environment variables of interest

The sdk does support using a proxy directly as well as ignoring ssl validation errors. This can be configured through the existense environment variables, (*14)

GettyImagesApi_IgnoreSSLValidation
GettyImagesApi_UseProxy

*nix Shell Example:

export GettyImagesApi_IgnoreSSLValidation=TRUE
export GettyImagesApi_UseProxy=127.0.0.0:8888

Windows CMD Example:

set GettyImagesApi_IgnoreSSLValidation=TRUE
set GettyImagesApi_UseProxy=127.0.0.0:8888

Powershell Example

$env:GettyImagesApi_IgnoreSSLValidation=TRUE
$env:GettyImagesApi_UseProxy="127.0.0.0:8888"

Tests

Running unit tests

The test project contains unit tests written using the PHPUnit Framwork., (*15)

Execute the unit tests

Assumptions

  • You have PHPUnit installed

To execute all of the unit tests: ./vendor/bin/phpunit --bootstrap vendor/autoload.php unitTests/., (*16)

To execute one test class: ./vendor/bin/phpunit --bootstrap vendor/autoload.php unitTests/EXAMPLETEST, (*17)

Maintainers

To publish a new version to Packagist, create a new release with an updated tag. A webhook will notify Packagist to grab the latest version., (*18)

The Versions

01/11 2016

dev-master

9999999-dev http://developer.gettyimages.com

Getty Images API SDK - PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Getty Images, Inc.

search photo images photos embed getty gettyimages creative artist

10/05 2016

2.1.3

2.1.3.0 http://developer.gettyimages.com

Getty Images API SDK - PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Getty Images, Inc.

search photo images photos embed getty gettyimages creative artist

04/09 2015

2.1.2

2.1.2.0 http://developer.gettyimages.com

Getty Images API SDK - PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Getty Images, Inc.

search photo images photos embed getty gettyimages creative artist

12/05 2015

2.0.0

2.0.0.0 http://developer.gettyimages.com

Getty Images API SDK - PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson
by Mark Pitman
by Jeff Gustafson

search photo images photos embed getty gettyimages creative artist

18/01 2015

1.0.4-beta

1.0.4.0-beta http://api.gettyimages.com

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson
by Mark Pitman

search photo images photos embed getty gettyimages creative artist

14/11 2014

dev-video-beta

dev-video-beta http://api.gettyimages.com

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson

search photo images photos embed getty gettyimages creative artist

14/10 2014

1.0.3-beta

1.0.3.0-beta http://api.gettyimages.com

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson

search photo images photos embed getty gettyimages creative artist

07/10 2014

1.0.1-beta

1.0.1.0-beta http://api.gettyimages.com

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson

search photo images photos embed getty gettyimages creative artist

02/10 2014

1.0.0-beta

1.0.0.0-beta http://api.gettyimages.com

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Casey MacPherson

search photo images photos embed getty gettyimages creative artist

01/10 2014

1.0.0

1.0.0.0

Getty Images Connect PHP SDK

  Sources   Download

MIT

The Requires

 

by Casey MacPherson