Skip to content

Commit c1d51cc

Browse files
author
dfounderliu
committed
init project
0 parents  commit c1d51cc

20 files changed

+6278
-0
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage
2+
dist
3+
node_modules

.eslintrc.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['prettier'],
4+
plugins: ['import', 'prettier'],
5+
env: {
6+
es6: true,
7+
jest: true,
8+
node: true
9+
},
10+
parser: 'babel-eslint',
11+
parserOptions: {
12+
ecmaVersion: 2018,
13+
sourceType: 'module',
14+
ecmaFeatures: {
15+
jsx: true
16+
}
17+
},
18+
globals: {
19+
on: true // for the Socket file
20+
},
21+
rules: {
22+
'array-bracket-spacing': [
23+
'error',
24+
'never',
25+
{
26+
objectsInArrays: false,
27+
arraysInArrays: false
28+
}
29+
],
30+
'arrow-parens': ['error', 'always'],
31+
'arrow-spacing': ['error', { before: true, after: true }],
32+
'comma-dangle': ['error', 'never'],
33+
curly: 'error',
34+
'eol-last': 'error',
35+
'func-names': 'off',
36+
'id-length': [
37+
'error',
38+
{
39+
min: 2,
40+
max: 50,
41+
properties: 'never',
42+
exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$']
43+
}
44+
],
45+
'no-alert': 'error',
46+
'no-console': 'off',
47+
'no-const-assign': 'error',
48+
'no-else-return': 'error',
49+
'no-empty': 'off',
50+
'no-shadow': 'error',
51+
'no-undef': 'error',
52+
'no-unused-vars': 'error',
53+
'no-use-before-define': 'error',
54+
'no-useless-constructor': 'error',
55+
'object-curly-newline': 'off',
56+
'object-shorthand': 'off',
57+
'prefer-const': 'error',
58+
'prefer-destructuring': ['error', { object: true, array: false }],
59+
quotes: [
60+
'error',
61+
'single',
62+
{
63+
allowTemplateLiterals: true,
64+
avoidEscape: true
65+
}
66+
],
67+
semi: ['error', 'never'],
68+
'spaced-comment': 'error',
69+
strict: ['error', 'never'],
70+
'prettier/prettier': 'error'
71+
}
72+
}

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Logs
2+
*.log
3+
npm-debug.log
4+
npm-shrinkwrap.json
5+
package-lock.json
6+
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
dist
12+
13+
# Directory for instrumented libs generated by jscoverage/JSCover
14+
lib-cov
15+
16+
# Coverage directory used by tools like nyc
17+
coverage
18+
/.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directory
30+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
31+
node_modules
32+
33+
# IDE stuff
34+
**/.idea
35+
**/.vs
36+
**/*.iml
37+
38+
# OS stuff
39+
.DS_Store
40+
.tmp
41+
42+
# Serverless stuff
43+
admin.env
44+
.env
45+
tmp
46+
.coveralls.yml
47+
tmpdirs-serverless
48+
*.zip
49+
tracking-config.json
50+
51+
# ESLint cache
52+
.eslintcache
53+
54+
# Misc
55+
jest
56+
57+
# VIM
58+
*.swp
59+
60+
# DotNet
61+
obj/
62+
[Oo]bj/
63+
64+
# Tests
65+
!tests/**/*.zip
66+

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage
2+
dist
3+
node_modules

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: node_js
2+
3+
node_js:
4+
- '8'
5+
6+
install:
7+
- npm install
8+
9+
script:
10+
- npm test
11+
12+
notifications:
13+
email:
14+
recipients:
15+
- wjielai@tencent.com
16+
- fysntian@tencent.com

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019-present TencentCloud
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 腾讯云 SDK
2+
3+
## 云API 接口使用方法
4+
5+
```
6+
const { apigw } = require('../lib/index')
7+
8+
const secret = {
9+
SecretId: '',
10+
SecretKey: ''
11+
}
12+
13+
const apigwClient = new apigw(secret)
14+
15+
const data = {
16+
Action: 'DescribeServicesStatus'
17+
}
18+
19+
apigwClient.request(data)
20+
21+
```
22+
23+
参考地址: https://cloud.tencent.com/document/api
24+
25+
## COS 接口使用方法
26+
27+
```
28+
const { cos } = require('../lib/index')
29+
30+
const secret = {
31+
SecretId: '',
32+
SecretKey: ''
33+
}
34+
35+
const cosClient = new cos(secret)
36+
37+
cosClient.getService(function(err, data) {
38+
console.log(err || data);
39+
});
40+
```
41+
42+
参考地址:https://cloud.tencent.com/document/product/436/8629

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var tencentCloud = require('./lib/index')
2+
module.exports = tencentCloud

0 commit comments

Comments
 (0)