阿里云 CDN API SDK
const co = require('co');
const SDK = require('ali-cdn-sdk');
const CONFIG = {
accessKeyId: '在阿里云OSS申请的 accessKeyId',
appSecret: '在阿里云OSS申请的 secretAccessKey',
endpoint: 'https://cdn.aliyuncs.com',
apiVersion: '2014-11-11',
};
co(function* () {
const sdk = new SDK(CONFIG);
const res = yield sdk.DescribeDomainHttpCodeData({
DomainName: 'a.alipayobjects.com',
StartTime: '', // 数据格式参考测试用例
EndTime: '',
});
console.log(res);
});
请查看 lib/apis.js
, 如果有需要,可以提交 MR 新增