Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hedii committed Feb 14, 2016
1 parent 2c77268 commit ad238df
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
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
````

0 comments on commit ad238df

Please sign in to comment.