slince/shipment-tracking-ems

A flexible and shipment tracking library for E邮宝、E包裹、E特快、国际EMS.

1.0.0 2017-08-07 06:58 UTC

This package is not auto-updated.

Last update: 2024-12-22 06:20:04 UTC


README

Build Status Coverage Status Latest Stable Version Scrutinizer

中国邮政包裹物流信息查询,适用产品E邮宝、E包裹、E特快、国际EMS

Installation

Install via composer

$ composer require slince/shipment-tracking-ems

Basic Usage

$tracker = new Slince\ShipmentTracking\EMS\EMSTracker(AUTHENTICATE, 'en');

try {
   $shipment = $tracker->track('CNAQV100168101');
   
   print_r($shipment->getEvents());  //print the shipment events
   
} catch (Slince\ShipmentTracking\Exception\TrackException $exception) {
    exit('Track error: ' . $exception->getMessage());
}

注意:该库并不支持查询国内EMS包裹信息,相关文档主页http://shipping.ems.com.cn/apiIndex

License

The MIT license. See MIT