{"id":24472917,"url":"https://github.com/shutterstock/php-shutterstock-api","last_synced_at":"2025-06-18T03:02:30.241Z","repository":{"id":37547343,"uuid":"53154494","full_name":"shutterstock/php-shutterstock-api","owner":"shutterstock","description":"PHP Client to interact with the Shutterstock API","archived":false,"fork":false,"pushed_at":"2023-04-19T18:27:58.000Z","size":52,"stargazers_count":7,"open_issues_count":6,"forks_count":5,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-13T11:49:55.361Z","etag":null,"topics":["guzzle","php","php-client","shutterstock-api"],"latest_commit_sha":null,"homepage":"https://developers.shutterstock.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shutterstock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-04T17:48:06.000Z","updated_at":"2021-11-16T13:57:49.000Z","dependencies_parsed_at":"2024-11-19T01:44:24.729Z","dependency_job_id":null,"html_url":"https://github.com/shutterstock/php-shutterstock-api","commit_stats":{"total_commits":6,"total_committers":4,"mean_commits":1.5,"dds":0.6666666666666667,"last_synced_commit":"54a50c9a4e1660c255b6578fdeb13bf69624e160"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shutterstock/php-shutterstock-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutterstock%2Fphp-shutterstock-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutterstock%2Fphp-shutterstock-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutterstock%2Fphp-shutterstock-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutterstock%2Fphp-shutterstock-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shutterstock","download_url":"https://codeload.github.com/shutterstock/php-shutterstock-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutterstock%2Fphp-shutterstock-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260477735,"owners_count":23015060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["guzzle","php","php-client","shutterstock-api"],"created_at":"2025-01-21T08:14:08.201Z","updated_at":"2025-06-18T03:02:25.124Z","avatar_url":"https://github.com/shutterstock.png","language":"PHP","readme":"# Demo Client for Shutterstock API\n\nPHP client that utilizes Guzzle to interact with the [Shutterstock API](https://developers.shutterstock.com/).\n\n[![Build Status](https://travis-ci.org/jacobemerick/php-shutterstock-api.svg)](https://travis-ci.org/jacobemerick/php-shutterstock-api)\n[![Code Climate](https://codeclimate.com/github/jacobemerick/php-shutterstock-api/badges/gpa.svg)](https://codeclimate.com/github/jacobemerick/php-shutterstock-api)\n[![Test Coverage](https://codeclimate.com/github/jacobemerick/php-shutterstock-api/badges/coverage.svg)](https://codeclimate.com/github/jacobemerick/php-shutterstock-api/coverage)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jacobemerick/php-shutterstock-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jacobemerick/php-shutterstock-api/?branch=master)\n\n## Installation\n\nUse [Composer](https://getcomposer.org/) to install the dependencies.\n\n```bash\n$ composer require shutterstock/api\n```\n\n## Usage\n\nInstantiating the client requires passing in your client id and secret, which you can register for on the [Shutterstock Developers site](https://developers.shutterstock.com/).\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$client = new Shutterstock\\Api\\Client($clientId, $clientSecret);\n```\n\nInteracting with the different endpoints is as simple as reading the [API documentation](https://developers.shutterstock.com/api/v2). There are two main methods of the client to deal with - `Client::get` and `Client::post` - which take an endpoint as their first argument and the client parameters as the second.\n\n```php\n// perform an image search for puppies\n$client-\u003eget('images/search', array('query' =\u003e 'puppies'));\n\n// retrieve details for a handful of image ids\n$client-\u003eget('images', array('id' =\u003e array(1, 2, 3)));\n\n// create a lightbox\n$client-\u003epost('images/collections', array('name' =\u003e 'Lightbox Name Here'));\n```\n\nEach request will return a PSR-7 response object, which you can read about on the [Guzzle/PSR7 repo](https://github.com/guzzle/psr7). The response object bodies have been decorated with a JsonSerializable interface to allow easier handling of the default API responses.\n\n```php\n$imageResponse = $client-\u003eget('images', array('id' =\u003e array(1, 2, 3)));\nif ($imageResponse-\u003egetStatusCode() != 200) {\n    // error handler\n}\n$images = $imageResponse-\u003egetBody()-\u003ejsonSerialize()['data'];\n// etc\n```\n\nIf your application is setup to handle async CURL requests, you can also make `Client::getAsync` and `Client::postAsync` calls, which return [Guzzle Promises](https://github.com/guzzle/promises).\n\nFor more examples and a demo application using this client, see [LINK HERE].\n\n## License\n\n[Apache 2.0](LICENSE) © 2016-2017 Shutterstock Images, LLC\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshutterstock%2Fphp-shutterstock-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshutterstock%2Fphp-shutterstock-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshutterstock%2Fphp-shutterstock-api/lists"}