Download the PHP package debuss-a/lapostesuivi without Composer
On this page you can find all versions of the php package debuss-a/lapostesuivi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package lapostesuivi
La Poste Suivi API
The best way to track your La Poste, Colissimo and Chronopost packages.
## What does it do ? This framework-agnostic package is an implementation of the tracking API version 2 from La Poste. This API allows you to track your shipments in real time. "Suivi v2" allows you to harmonize the delivery status of tracked parcels, Colissimo parcels and Chronopost shipments. More information on the [developer page](https://developer.laposte.fr/products/suivi/2). ## Installation It is recommended to use [composer](https://getcomposer.org/) to install the package : PHP 5.6 or newer is required. ## Usage First of all you need an X-Okapi-Key to use the API. Subscribe to a new Tracking API to get one **(it is free)**, [here](https://developer.laposte.fr/products/suivi/2), then you can instantiate the app : You need to create an object `Request` for every tracking number : You can pass 2 more parameters to define the `lang` and `ip_address` you wish to set up. By default, `lang` is set to `fr_FR` and `ip_address` to `$_SERVER['REMOTE_ADDR']` (or `123.123.123.123` if `REMOTE_ADDR` is not defined). To track only 1 parcel, you can use the `LaPoste\Suivi\App::call` method : To track more than 1 parcel, use the `LaPoste\Suivi\App::callMultiple` method : `LaPoste\Suivi\App::call` and `LaPoste\Suivi\App::callMultiple` return instances of [`LaPoste\Suivi\Response`](https://github.com/debuss/lapostesuivi/blob/master/src/Suivi/Response.php). Note: in the case of `LaPoste\Suivi\App::callMultiple`, this package uses `curl_multi*` functions therefore all tracking numbers are tracked asynchronously. This means the tracking of multiple packages is done at the same time instead of one by one, and it is much **MUCH!** faster. ## Decorator The package is included with an `AppV1Decorator` decorator class that you can use to format the output of the v2 API to the v1 API. Result of `call` : Result of `callMultiple` : Useful if you do not want to refactor all your code to the different v2 API ! ## License The package is licensed under the MIT license. See [License File](https://github.com/debuss/lapostesuivi/blob/master/LICENSE.md) for more information.
All versions of lapostesuivi with dependencies
PHP Build Version
Package Version
Requires
ext-curl Version
*
ext-json Version *
ext-json Version *
The package debuss-a/lapostesuivi contains the following files
Loading the files please wait ....