https://github.com/dansmaculotte/laposte-php
PHP SDK for La Poste API
https://github.com/dansmaculotte/laposte-php
laposte php
Last synced: about 1 year ago
JSON representation
PHP SDK for La Poste API
- Host: GitHub
- URL: https://github.com/dansmaculotte/laposte-php
- Owner: dansmaculotte
- License: mit
- Created: 2018-12-16T11:14:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T17:54:28.000Z (over 6 years ago)
- Last Synced: 2024-04-25T11:02:37.131Z (about 2 years ago)
- Topics: laposte, php
- Language: PHP
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# La Poste API PHP SDK
[](https://packagist.org/packages/dansmaculotte/laposte-php)
[](https://packagist.org/packages/dansmaculotte/laposte-php)
[](https://travis-ci.org/dansmaculotte/laposte-php)
[](https://scrutinizer-ci.com/g/dansmaculotte/laposte-php)
[](https://coveralls.io/github/dansmaculotte/laposte-php)
> This library aims to facilitate the usage of La Poste API Services
## Installation
### Requirements
- PHP 7.2
- Json Extension
You can install the package via composer:
``` bash
composer require dansmaculotte/laposte-php
```
## Usage
[La Poste Developer Portal](https://developer.laposte.fr/)
### Address Control
#### Find
```php
use DansMaCulotte\LaPoste\AddressControl;
$addressControl = new AddressControl($this->apiKey);
$results = $addressControl->find('7 rue Mélingue 14000 Caen');
print_r($results);
```
#### Detail
```php
use DansMaCulotte\LaPoste\AddressControl;
$addressControl = new AddressControl($this->apiKey);
$results = $addressControl->detail('260621288');
print_r($results);
```
### Tracking
#### Track
```php
use DansMaCulotte\LaPoste\Tracking;
$tracking = new Tracking($this->apiKey);
$results = $tracking->track('1111111111111');
print_r($results);
```
#### List
```php
use DansMaCulotte\LaPoste\Tracking;
$tracking = new Tracking($this->apiKey);
$results = $tracking->list(['1111111111111', '1111111111119']);
print_r($results);
```
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.