https://github.com/afeiship/next-tx-cos-sdk
Tencent cos-nodejs-sdk wrapper.
https://github.com/afeiship/next-tx-cos-sdk
cos next sdk tencent tx
Last synced: 3 months ago
JSON representation
Tencent cos-nodejs-sdk wrapper.
- Host: GitHub
- URL: https://github.com/afeiship/next-tx-cos-sdk
- Owner: afeiship
- License: mit
- Created: 2020-04-11T11:42:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T03:13:24.000Z (over 5 years ago)
- Last Synced: 2025-03-17T22:55:47.801Z (over 1 year ago)
- Topics: cos, next, sdk, tencent, tx
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-tx-cos-sdk
> Tencent cos-nodejs-sdk wrapper.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-tx-cos-sdk
```
## apis
| api | params | description |
| --- | ------ | ------------- |
| get | - | desc balabala |
| put | - | desc balabala |
| del | - | desc balabala |
## usage
```js
import NxTxCosSdk from '@jswork/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
- https://github.com/sindresorhus/pify
- https://cloud.tencent.com/document/product/436/8629
- https://cloud.tencent.com/document/product/436/36119
## license
Code released under [the MIT license](https://github.com/afeiship/next-tx-cos-sdk/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-tx-cos-sdk
[version-url]: https://npmjs.org/package/@jswork/next-tx-cos-sdk
[license-image]: https://img.shields.io/npm/l/@jswork/next-tx-cos-sdk
[license-url]: https://github.com/afeiship/next-tx-cos-sdk/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-tx-cos-sdk
[size-url]: https://github.com/afeiship/next-tx-cos-sdk/blob/master/dist/next-tx-cos-sdk.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-tx-cos-sdk
[download-url]: https://www.npmjs.com/package/@jswork/next-tx-cos-sdk