@feizheng/next-tx-cos-sdk

1.2.0 • Public • Published

next-tx-cos-sdk

Tencent cos-nodejs-sdk wrapper.

installation

npm install -S @feizheng/next-tx-cos-sdk

apis

api params description
get - desc balabala
put - desc balabala
del - desc balabala

usage

import NxTxCosSdk from '@feizheng/next-tx-cos-sdk';

const config = {
  id: 'xxx',
  SecretId: 'xxxx',
  SecretKey: 'xxxxx'
};

// https://console.cloud.tencent.com/cos5/bucket
const nxCos = new NxTxCosSdk(config);

// create
nxCos
  .get({
    Bucket: 'img3-1301823685',
    Region: 'ap-chengdu'
  })
  .then((res) => {
    console.log(res);
  });

// // get
// nxCos.get().then((res) => {
//   console.log(res);
// });

// //delete
// nxCos
//   .del({
//     Bucket: 'img1-xxx',
//     Region: 'ap-chengdu'
//   })
//   .catch((err) => {
//     console.log(err);
//   });

resources

Readme

Keywords

none

Package Sidebar

Install

npm i @feizheng/next-tx-cos-sdk

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

15 kB

Total Files

6

Last publish

Collaborators

  • afeiship