2017 © Pedro Peláez
 

library bigstock

PHP Bigstock API Client

image

bigstock/bigstock

PHP Bigstock API Client

  • Monday, November 6, 2017
  • by Bar_Code
  • Repository
  • 37 Watchers
  • 2 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DEPRECATED

This repo is no longer publicly supported., (*1)

bigstock-php-client

PHP Client for the Bigstock API. Full documentation is available at http://help.bigstockphoto.com/hc/en-us/articles/200303245-API-Documentation. Self-serve signup for API accounts are available in the Partners section of Bigstock., (*2)

Install

Install the Bigstock PHP Client with Composer., (*3)

"require": {
    "bigstock/bigstock": "0.1"
},

Usage

Create an instance of the Bigstock API Client by passing in your API ID and API Secret as parameters. The client will then handle any authentication when required., (*4)

$bigstock = new Bigstock\Bigstock('API ID', 'API Secret');

Perform a search and check for a successful result

$search_params = array('q'=>'dog');
$result = $bigstock->search( $search_params );
if ($result->message == 'success') {
    $pages = $result->data->paging;
    $images = $result->data->images;
}

Loop through search results and create HTML to display images

$html = '';
foreach( $images as $image ) {
    $html .= "<img src='{$image->small_thumb->url}' title='{$image->title}' height='{$image->small_thumb->height}' width='{$image->small_thumb->width}'>";
}
echo $html;

Get detailed information about an image

$result = $bigstock->getImage(22411445);
if ($result->message == 'success') {
    $formats = $result->data->image->formats;
    $preview_url = $result->data->image->preview->url;
}

Purchase and download an image

$result = $bigstock->getPurchase(22411445, 'l');
if ($result->message == 'success') {
    // Get the URL to the file to download separately
    $file_url = $bigstock->getDownloadUrl($result->data->download_id);
    // Or download the file directly
    $file = $bigstock->download($result->data->download_id);
}

License

MIT © 2014-2017 Brent Baisley, (*5)

The Versions

06/11 2017

dev-master

9999999-dev

PHP Bigstock API Client

  Sources   Download

MIT

The Requires

 

api php library module client bigstock shutterstock stock photo

05/09 2017

dev-feat/update-license

dev-feat/update-license

PHP Bigstock API Client

  Sources   Download

MIT

The Requires

 

api php library module client bigstock shutterstock stock photo

12/12 2014

0.1

0.1.0.0

PHP Bigstock API Client

  Sources   Download

The Requires

 

api php library module client bigstock shutterstock stock photo