post2go.ru api client
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
tests
.gitignore
.travis.yml
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

Post2Go API client

Build Status

Post2Go is a shipment tracking service.

$post2goClient = new Post2GoClient\Manager('INSERT YOUR API KEY HERE');

$courier = 'usps';
$trackingNumber = 'EC208786464US';

//detect courier by tracking number
$post2goClient->couriers()->detect($trackingNumber);
//get all couriers
$post2goClient->couriers()->get();

//add tracking number to post2go 
$post2goClient->tracking()->create($courier, $trackingNumber);
//get tracking info
$post2goClient->tracking()->get($courier, $trackingNumber);
//reactivate tracking number 
$post2goClient->tracking()->reactivate($courier, $trackingNumber);

//get last checkpoint info
$post2goClient->lastCheckpoint($courier, $trackingNumber);

See examples for more info

Installing via Composer

The recommended way to install is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add as a dependency
php composer.phar require post2go/post2go-client:dev-master

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';