slince / shipment-tracking-yanwen-express
A flexible and shipment tracking library for Yanwen Express.
1.1.0
2017-08-01 09:23 UTC
Requires
- php: >=5.6.0
- slince/shipment-tracking: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.0|^6.0
This package is not auto-updated.
Last update: 2024-11-18 08:03:04 UTC
README
A flexible and shipment tracking library for Yanwen Express(燕文物流).
Installation
Install via composer
$ composer require slince/shipment-tracking-yanwen-express
Basic Usage
$tracker = new Slince\ShipmentTracking\YanWenExpress\YanWenTracker(KEY, 'en'); try { $shipment = $tracker->track('CNAQV100168101'); if ($shipment->isDelivered()) { echo "Delivered"; } echo $shipment->getOrigin(); echo $shipment->getDestination(); print_r($shipment->getEvents()); //print the shipment events } catch (Slince\ShipmentTracking\Exception\TrackException $exception) { exit('Track error: ' . $exception->getMessage()); }
License
The MIT license. See MIT