2017 © Pedro Peláez
 

library bol-openapi-php-sdk

The Bol OpenApi SDK for PHP developers enables you to easily develop products over the Bol OpenApi.

image

netvlies/bol-openapi-php-sdk

The Bol OpenApi SDK for PHP developers enables you to easily develop products over the Bol OpenApi.

  • Friday, August 9, 2013
  • by krizon
  • Repository
  • 9 Watchers
  • 1 Stars
  • 1,235 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Bol.com OpenApi PHP SDK

Build Status, (*1)

The Bol.com Open Api is an RESTfull API wich you can use to communicate with the Bol.com webshop catalogue. This library makes it very easy to use this API as a service within your PHP application., (*2)

You need to have a developer key to use this API. You can get one by registering at the Bol.com developer center., (*3)

License

This library is released under the MIT license. See the complete license in the LICENSE file., (*4)

Installation

First install composer and after that install the dependencies., (*5)

Requirements

PHP >=5.3.0, (*6)

Using it

// ..
$httpBrowser = new \Buzz\Browser();
$accessKey = 'ABC';
$secretAccessKey = 'DEF';
$apiClient = new Client($accessKey, $secretAccessKey, $httpBrowser);
// ..

Search for products / categories

The searchresults operation returns product information by supplying keywords or ISBN/EAN. The operation has filtering and paging options., (*7)

// ..
$term = 'PHP';
$options = array(
    'categoryIdAndRefinements'  => null,
    'offset'                    => 0,
    'nrProducts'                => 10,
    'sortingMethod'             => SortingMethod::PRICE,
    'sortingAscending'          => true,
    'includeProducts'           => true,
    'includeCategories'         => true,
    'includeRefinements'        => true
);
$searchResult = $apiClient->searchResults($term, $options);
// ..

List products / categories

The listresults operation returns various product lists, based on list type and category. The category is based on the id, which can be obtained by the category list request., (*8)

For available list types see the documentation., (*9)

// ..
$type = ProductListType::TOPLIST_DEFAULT;
$categoryIdAndRefinements = '87';
$options = array(
    'offset'                => null,
    'nrProducts'            => 10,
    'sortingMethod'         => SortingMethod::TITLE,
    'sortingAscending'      => true,
    'includeProducts'       => false,
    'includeCategories'     => true,
    'includeRefinements'    => true
);
$listResult = $apiClient->listResults($type, $categoryIdAndRefinements, $options);
// ..

Get product information

The products operation gets detailed information for products., (*10)

// ...
$productId = '1002004011800815';
$productResponse = $apiClient->products($productId);
// ...

Enumerations

For a list of the possible enumerations options (for example sorting methods) take a look at the classes within the Enum namespace., (*11)

Documentation

Further documentation about the API can be found at the Bol.com developer center., (*12)

Testing

Be sure to install the dependencies first and after that just run phpunit in the lib root:, (*13)

phpunit

The Versions

09/08 2013

dev-master

9999999-dev

The Bol OpenApi SDK for PHP developers enables you to easily develop products over the Bol OpenApi.

  Sources   Download

MIT

The Requires

 

by Kristian Zondervan

06/06 2012

v1.0.0

1.0.0.0

The Bol OpenApi SDK for PHP developers enables you to easily develop products over the Bol OpenApi.

  Sources   Download

MIT

The Requires

 

by Kristian Zondervan