@easy-front-core-sdk/kdniao
v1.5.5
Published
核心模块-快递鸟
Downloads
16
Readme
kdniao
快递鸟 API 封装
Usage
init sdk
import { KdniaoCore } from '@easy-front-core-sdk/kdniao/dist/KdniaoCore';
const kdniaoCore = await kdniaoCoreFactory.putCore({
eBusinessId: YOUR_EBUSINESS_ID,
apiKey: YOUR_API_KEY
})
if (kdniaoCore) {
console.log("kdniao的SDK初始化成功!")
} else {
console.log("kdniao的SDK初始化失败!")
}
call api
// 订阅快递物流信息
const kdniaoCore = kdniaoCoreFactory.getCore('YOUR_EBUSINESS_ID')
const param: SubscribeParams = { ShipperCode: '12345', LogisticCode: '12345' }
const res = await EbusinessOrderHandleAPI.subscribe(kdniaoCore, param)