wienkit / beslist-shopitem-api-php-client
Beslist.nl Shopitem API client PHP
Installs: 39 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.9
- ext-curl: *
- ext-json: *
- tcdent/php-restclient: ^0.1.5
Requires (Dev)
- phpunit/phpunit: ^5.4
README
This is an open source PHP client for the Beslist.nl Shopitem API.
Installation
Get it with composer
Run the command:
composer require wienkit/beslist-shopitem-api-php-client
Examples
<?php require __DIR__ . '/vendor/autoload.php'; $apiKey = '-- ENTER YOUR SHOPITEM API KEY --'; $this->client = new Wienkit\BeslistShopitemClient\BeslistShopitemClient($apiKey); $this->client->setTestMode(TRUE); // Authenticate with the API $shops = $this->client->authenticate(); var_dump($shops); // Get a shopitem $shopId = 12345; $itemId = '12abcd13'; $shopItem = $this->client->getShopItem($shopId, $itemId); var_dump($shopItem); // Update a shopitem $shopId = 12345; $itemId = '12abcd13'; $update = [ 'price' => 12.00, 'discount_price' => 10.00, 'delivery_cost_nl' => 5.00, 'delivery_cost_be' => 6.00, 'delivery_time_nl' => '24 uur', 'delivery_time_be' => '48 uur', 'stock' => 5 ]; $this->client->updateShopItem($shopId, $itemId, $update);
See the tests folder for more information and examples.