Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 785 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 785 Bytes

aliyun-sdk

阿里云 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);
});

目前支持的 API

请查看 lib/apis.js, 如果有需要,可以提交 MR 新增

链接