1 Star 0 Fork 6

aigouzz/tencentcloud-sdk-nodejs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cms.v20190321.test.js 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
tencentcloud 提交于 2023-06-01 10:11 +08:00 . release 4.0.611
const expect = require("chai").expect
const tencentcloud = require("../../tencentcloud-sdk-nodejs")
const client = new tencentcloud.cms.v20190321.Client({
credential: {
secretId: process.env.secretId,
secretKey: process.env.secretKey,
},
region: "ap-shanghai",
profile: {
signMethod: "TC3-HMAC-SHA256",
httpProfile: {
reqMethod: "POST",
reqTimeout: 30,
endpoint: "cvm.ap-shanghai.tencentcloudapi.com",
},
},
})
describe("cms.v20190321.test.js", function () {
it("cms.v20190321.TextModeration", async function () {
try {
const data = await client.TextModeration({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("cms.v20190321.ImageModeration", async function () {
try {
const data = await client.ImageModeration({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("cms.v20190321.DescribeLibSamples", async function () {
try {
const data = await client.DescribeLibSamples({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("cms.v20190321.DescribeKeywordsLibs", async function () {
try {
const data = await client.DescribeKeywordsLibs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("cms.v20190321.CreateKeywordsSamples", async function () {
try {
const data = await client.CreateKeywordsSamples({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("cms.v20190321.DeleteLibSamples", async function () {
try {
const data = await client.DeleteLibSamples({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aigouzz/tencentcloud-sdk-nodejs.git
git@gitee.com:aigouzz/tencentcloud-sdk-nodejs.git
aigouzz
tencentcloud-sdk-nodejs
tencentcloud-sdk-nodejs
master

搜索帮助