Skip to content

ali-sdk/aliyun-cdn-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 新增

链接