1.1.26 • Published 3 years ago

@bigegg/wdt-node v1.1.26

Weekly downloads
8
License
ISC
Repository
github
Last release
3 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

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.1.23

3 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.19

4 years ago

1.1.18

4 years ago

1.1.20

4 years ago

1.1.17

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.12

4 years ago

1.1.13

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago