Skip to content

Luncher/kdniao

Repository files navigation

快递鸟SDK Node.js实现

NPM version Build Status Codecov Status David Status NPM download

使用方法

安装

npm install kdniaosdk

运行测试

运行测试之前,请先设置AppKey以及EBusinessID

npm test

基本配置

const config = {
  EBusinessID: 'xxx', //商户id
  AppKey: 'xxx' //秘钥
}

demo(同步查询快递信息)

  import assert from 'assert';
  import KDNService from '../src/index';

  const service = new KDNService(config);
  const order = {
    code: 'xxxx', //订单号
    shipper: 'ZTO' //快递提供商
  };

  service.makeOrderTraceSync(order)
  .then(ret => {
    assert(ret.Success, ret.Reason);
  });

Todo List

  • 物流轨迹(订阅查询)
  • 物流轨迹(即时查询)
  • 异步推送
  • 在线下单

LICENSE

MIT

About

快递鸟sdk,nodejs平台实现。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published