1. Go to this page and download the library: Download debuss-a/lapostesuivi 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/ */
debuss-a / lapostesuivi example snippets
$app = new LaPoste\Suivi\App('YOUR_X-OKAPI-KEY_HERE');
$request = new \LaPoste\Suivi\Request('6M17554710224');
$app = new LaPoste\Suivi\App('YOUR_X-OKAPI-KEY_HERE');
$request = new \LaPoste\Suivi\Request('6M17554710224');
$response = $app->call($request);
$app = new LaPoste\Suivi\App('YOUR_X-OKAPI-KEY_HERE');
$requests = [
new \LaPoste\Suivi\Request('6M17554710224'),
new \LaPoste\Suivi\Request('EY604176344FR', LaPoste\Suivi\App::LANG_EN),
new \LaPoste\Suivi\Request('6M17554710224'),
];
$responses = $app->callMultiple($requests);
$app = new \LaPoste\Suivi\AppV1Decorator(
new LaPoste\Suivi\App('YOUR_X-OKAPI-KEY_HERE')
);
$single_response = $app->call(new \LaPoste\Suivi\Request('6A18987970674'));
$multiple_response = $app->callMultiple([
new \LaPoste\Suivi\Request('6A18987970674'),
new \LaPoste\Suivi\Request('6A18987970674'),
new \LaPoste\Suivi\Request('6A18987970674')
]);