PHP7 Client for skroutz API
composer require ilazaridis/skroutz
Once you have an
Identifier and a
Secret you are ready to generate an access token:
<?php require_once 'vendor/autoload.php'; use ilazaridis\skroutz\Client as Client; $client = new Client('identifier', 'secret');
and consume it:
print_r($client->category('40')->fetch()); // get category with id=40
fetch(bool $decode = true, string $apiVersion = '3.1') will return an associative array using latest version of api by default. You can pass a boolean and a string if you want to change these values.
- List the children categories of a category
- Retrieve a single shop location
- Retrieve manufacturer's categories order by name
$client->category('25')->manufacturers()->params(['order_by' => 'name', 'order_dir' => 'asc'])->fetch()
The query string is passd as associative array using the params() method.
In case we have multiple values of the same parameter (i.e.
filter_ids), we are passing them as comma seperated values:
- Filter SKUs of specific category using multiple filter ids
$client->category('40')->skus()->params(['filter_ids' => '355559,6282'])->fetch()
Some of the API methods have not been implemented due to access restriction. Currently,
the acquired permission level is
public and everything on that level was implemented.