PHP code example of wiatrogon / php-allegro-webapi

1. Go to this page and download the library: Download wiatrogon/php-allegro-webapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wiatrogon / php-allegro-webapi example snippets


$client = new AllegroWebAPI($webapiKey, $login, $password);

$params = array(
    'countryId' => AllegroWebAPI::COUNTRY_PL,
    'webapiKey' => $client->webapiKey,
    'packageElement' => 29
);
$client->doGetCatsDataLimit($params);

$params = array(
    'sessionHandle' => $client->sessionHandle,
    'startingPoint' => 12345678910
);
$client->doGetSiteJournal($params);


$sandbox = new AllegroWebAPI($webapiKey, $login, $password,
                             AllegroWebAPI::COUNTRY_PL, TRUE);
                             
$params = array(
    'countryId' => AllegroWebApi::COUNTRY_PL,
    'webapiKey' => $sandbox->webapiKey,
    'packageElement' => 10
);

$sandbox->doGetCatsDataLimit($params);