2017 © Pedro PelĂĄez
 

library affilinet-php-sdk

affilinet PHP SDK, forked and extended from https://github.com/affilinet/productdata-php-sdk

image

gigabit/affilinet-php-sdk

affilinet PHP SDK, forked and extended from https://github.com/affilinet/productdata-php-sdk

  • Thursday, May 3, 2018
  • by develth
  • Repository
  • 1 Watchers
  • 0 Stars
  • 262 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 85 % Grown

The README.md

affilinet PHP SDK

Grab the PHP SDK and have access to our webservice within minutes., (*1)

This is a fork from Official affilinet Product SDK. It doesnÂŽt had any possiblities to access to other webservice endpoints., (*2)

//TODO: extend original documentation Refer to our documentation in order to get started: https://affilinet.github.io/productdata-php-sdk, (*3)

Installation

This SDK can be installed with composer, (*4)

composer require gigabit/affilinet-php-sdk

Please note: This packages requires PHP 5.6 or greater., (*5)

Examples

$config = [
    'publisher_id' => {PUBLISHER ID},
    'product_webservice_password' => {PRODUCT WEBSERVICE PASSWORD}
]

$affilinet = new \Affilinet\ProductData\AffilinetClient($config);

// simple search for t-shirts (using the product webservice)
try {
    $search = new \Affilinet\ProductData\Requests\ProductsRequest($affilinet);
    $query = new \Affilinet\ProductData\Requests\Helper\Query();

    $query->where($query->expr()->exactly('T-Shirt'));

    $search
        ->query( $query)
        ->onlyWithImage()
        ->minPrice(1)
        ->maxPrice(100)
        ->page(1)
        ->pageSize(20);

    $response = $search->send();
}
catch (\Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException $e) {
    // There is an error within your $search
    echo 'Error: ' . $e->getMessage();
}

echo 'Total results : ' . $response->totalRecords() ;

foreach ($response->getProducts() as $product) {
    echo $product->getProductName();
    echo $product->getPriceInformation()->getDisplayPrice();
}

Tests

All tests rely on composer. Please composer install before running the tests. phpunit tests include some integration tests. To run these tests you need to provide an publisherId and productWebservicePassword. Copy Tests/AffilinetTestCredentials.php.dist to Tests/AffilinetTestCredentials.php and enter your PUBLISHER_ID and PRODUCT_WEBSERVICE_PASSWORD, (*6)

To run only the unit tests use this command:, (*7)

phpunit --exclude-group integration

License

Please see the license file for more information., (*8)

The Versions

03/05 2018

dev-master

9999999-dev https://github.com/gigabit-gmbh/affilinet-php-sdk

affilinet PHP SDK, forked and extended from https://github.com/affilinet/productdata-php-sdk

  Sources   Download

MIT

The Requires

 

The Development Requires

sdk affilinet

08/08 2017
08/08 2017
08/08 2017

dev-separate_and_refactor

dev-separate_and_refactor https://github.com/gigabit-gmbh/affilinet-php-sdk

affilinet PHP SDK, forked and extended from https://github.com/affilinet/productdata-php-sdk

  Sources   Download

MIT

The Requires

 

The Development Requires

sdk affilinet