Skip to content

Commit 378c0c4

Browse files
author
dfounderliu
committed
add tcb api
1 parent b97e2ca commit 378c0c4

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tencent-cloud-sdk",
33
"description": "Tencent Cloud SDK For Serverless Framework",
4-
"version": "0.0.5",
4+
"version": "0.0.7",
55
"main": "./index.js",
66
"publishConfig": {
77
"access": "public"

src/client.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ class TagClient {
126126
}
127127
}
128128

129+
class TcbClient {
130+
constructor(credentials = {}) {
131+
this.credentials = credentials
132+
}
133+
async request(data) {
134+
return await new TencentCloudClient(this.credentials, {
135+
host: 'tcb.tencentcloudapi.com',
136+
path: '/'
137+
}).doCloudApiRequest(data)
138+
}
139+
}
140+
129141
class ApigwClient {
130142
constructor(credentials = {}) {
131143
this.credentials = credentials
@@ -196,5 +208,6 @@ module.exports = {
196208
CnsClient,
197209
ApigwClient,
198210
DomainClient,
199-
CosClient
211+
CosClient,
212+
TcbClient
200213
}

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ module.exports = {
66
tag: require('./client').TagClient,
77
apigw: require('./client').ApigwClient,
88
domain: require('./client').DomainClient,
9-
cos: require('./client').CosClient
9+
cos: require('./client').CosClient,
10+
tcb: require('./client').TcbClient
1011
}

0 commit comments

Comments
 (0)