2.1.1 • Published 3 years ago

refresh-aliyun-cdn v2.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

refresh-aliyun-cdn

simplify aliyun-sdk for refreshing aliyun CDN

Features

Refresh Aliyun CDN file, files and dir simply.

Guide

1. Get the cdn instance

import { CDN } from 'refresh-aliyun-cdn';

const cdn = new CDN({
  accessKeyId: "a key",
  accessKeySecret: "a secret"
});

(async () => {
  const res = await cdn.refreshFile("a url");
  const result:RefreshResult = res.data; 
  
  console.log(result);
})();

2. refresh object

  • refresh single file
const {data} = await cdn.refreshFile('http://sss/xxx/ss.jpg');
  • refresh directory
const {data} = await cdn.refreshDir('http://sss/xxx/';
  • refresh multiple files
const {data} = await cdn.refreshFiles([
    'http://sss/xxx/',
    'http://sss/yyy/',
    'http://sss/zzz/'
]);

Installation

npm i -S refresh-aliyun-cdn

Dependencies

Authors

LnsooXD

License

MIT

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago