1.1.26 • Published 5 years ago

@bigegg/wdt-node v1.1.26

Weekly downloads
8
License
ISC
Repository
github
Last release
5 years ago
    this.sid = opt.sid;
    this.appKey = opt.appKey;
    this.appSecret = opt.appSecret;
    this.retryCount = opt.retryCount || 5; // 请求频率超过时重试次数
    this.timeout = opt.timeout || 10 * 1000; // 请求超时时间
    this.retryInterval = opt.retryInterval || 30 * 1000; // 请求重试间隔
    this._baseUrl = opt.baseUrl || 'http://api.wangdian.cn/openapi2/'; // 基础路径
const WDT = require('@bigegg/wdt-node').WDT;
let wdt = new WDT({
    sid: process.env.WDT_SID,
    appKey: process.env.WDT_APPKEY,
    appSecret: process.env.WDT_APPSECRET
})
//qm
const WDT = require('@bigegg/wdt-node').QM;
let wdt = new QM({
    appSecret: process.env.QM_APPSECERT ,
    sid: process.env.QM_SID ,
    appKey: process.env.QM_APPKEY,
    targetAppKey : process.env.QM_TARGETAPPKEY,
}) 


wdt.call('goods_query.php', {
    start_time: '2020-08-01 00:00:00',
    end_time: '2020-08-02 00:00:00'
})
wdt.call('goods_push.php', {
    goods_list: JSON.stringify([
        {
            'goods_no': 'test0001',
            'goods_type': 1,
            'goods_name': 'test',
            'spec_list': [{
                'spec_no': 'test00010001'
            }]
        }
    ])
})
wdt.findAll('goods_query.php', {
    start_time: '2020-08-01 00:00:00',
    end_time: '2020-08-15 00:00:00'
}, 'goods_list')

wdt.eachByTime({
    action: 'trade_query.php',
    filter:{
        start_time: '2020-08-01 00:00:00',
        end_time: '2020-08-03 00:00:00'
    },
    limit: 60 * 60 * 1000,
    key: 'trades'
}, async function(list){
    console.log(list)
})
1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.20

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.12

5 years ago

1.1.13

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago