cloudfunctions/SegmentPortraitPic/node_modules/tencentcloud-sdk-nodejs/test/tbm.v20180129.test.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


const expect = require("chai").expect
const tencentcloud = require("../../tencentcloud-sdk-nodejs")
const client = new tencentcloud.tbm.v20180129.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("tbm.v20180129.test.js", function () {

it("tbm.v20180129.DescribeUserPortrait", async function () {
    try {
       const data = await client.DescribeUserPortrait({})
       expect(data).to.be.ok
    } catch(error) {
      expect(error.requestId).to.be.ok
      expect(error.code).to.be.ok
    }
})

it("tbm.v20180129.DescribeBrandPosComments", async function () {
    try {
       const data = await client.DescribeBrandPosComments({})
       expect(data).to.be.ok
    } catch(error) {
      expect(error.requestId).to.be.ok
      expect(error.code).to.be.ok
    }
})

it("tbm.v20180129.DescribeIndustryNews", async function () {
    try {
       const data = await client.DescribeIndustryNews({})
       expect(data).to.be.ok
    } catch(error) {
      expect(error.requestId).to.be.ok
      expect(error.code).to.be.ok
    }
})

it("tbm.v20180129.DescribeBrandMediaReport", async function () {
    try {
       const data = await client.DescribeBrandMediaReport({})
       expect(data).to.be.ok
    } catch(error) {
      expect(error.requestId).to.be.ok
      expect(error.code).to.be.ok
    }
})

后面还有 51 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。