Coder Social home page Coder Social logo

kuaidi100's Introduction

建议快递100正式会员使用

安装

composer require twodogeggs/kuaidi100

实现功能

- 实时查询
- 智能查询 (不推荐使用)
- 订阅推送
- 云打印

开始准备

快递100接口文档

实时查询

use Twodogeggs\Kuaidi100\Tracker;

try {
    $kuaidi = new Tracker([
        'key' => '你的key',
        'customer' => '你的customer'
    ]);
    $kuaidi->track('快递公司编码', '快递单号');
} catch (Exception $e) {
    
}

智能查询(不推荐使用,查询结果不准)

use Twodogeggs\Kuaidi100\Tracker;

try {
    $kuaidi = new Tracker([
        'key' => '你的key'
    ]);

    $kuaidi->getAutoTrack('快递单号');
} catch (Exception $e) {
    
}

订阅推送

use Twodogeggs\Kuaidi100\Poll;

try {
    $kuaidi = new Poll([
        'key' => 'uexWYZbd2758',
    ]);

    $kuaidi->getPoll('快递公司编码', '快递单号', '回调地址', '返回格式');
    $kuaidi->getPollByParam([
        // 根据文档的param参数
    ], 'json');
} catch (Exception $e) {
    
}

云打印

use Twodogeggs\Kuaidi100\CloudPrint;

try {
    $kuaidi = new CloudPrint([
        'customer' => '快递公司编码',
        'key' => '申请的key',
        'secret' => '分配的secret'
    ]);
} catch (Exception $e) {

}

云打印的sign

$kuaidi->getSign();

License

MIT

kuaidi100's People

Contributors

shuliuzhenhua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.