-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[![Build Status](https://travis-ci.org/hedii/colissimo-api.svg?branch=master)](https://travis-ci.org/hedii/colissimo-api) | ||
|
||
# colissimo-api | ||
A php API to track Colissimo (La Poste) parcels | ||
|
||
### Installation | ||
````bash | ||
composer require hedii/colissimo-api | ||
```` | ||
|
||
### Usage | ||
````php | ||
<?php | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
// create a new instance | ||
$colissimoApi = new ColissimoApi(); | ||
|
||
// get data | ||
$all = $colissimoApi->get('9V01144112123')->all(); | ||
$status = $colissimoApi->get('9V01144112123')->status(); | ||
$id = $colissimoApi->get('9V01144112123')->id(); | ||
$destination = $colissimoApi->get('9V01144112123')->destination(); | ||
var_dump($all, $status, $id, $destination); | ||
|
||
// show json | ||
$colissimoApi->show('9V01144112123')->all(); | ||
$colissimoApi->show('9V01144112123')->status(); | ||
$colissimoApi->show('9V01144112123')->id(); | ||
$colissimoApi->show('9V01144112123')->destination(); | ||
|
||
```` | ||
|
||
### Run tests | ||
You may need to update the id in */tests/ColissimoApiTest.php* because the id is only valid for 90 days. | ||
|
||
````bash | ||
composer require hedii/colissimo-api | ||
```` |