1.0.0 • Published 4 years ago

antool_apigw v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

概述

这个库用于访问安兔网关,API中心里的API。需要先创建访问密钥

用法

支持options:

  • appid
  • appsecret
  • env (dev、test、preview、release), 默认release(正式环境)
  • isIdc (true | false), IDC环境使用api.antool.oa.com,云支撑环境使用new.tss.tencentyun.com
import ApiGateway from '@tencent/antool_apigw'

const gateway = new ApiGateway({ appid: "cbsj8kgtjtw", appsecret: "oeaxt99xtgk85dz25zc6bwssqllfr", isIdc:true});
const data = await gateway.post('/qcloud/region/get_region', {
    params: {}
});

API

gateway.get(path, params, options) gateway.post(path, data, options) gateway.put(path, data, options) gateway.delete(path, params, options)

1.0.0

4 years ago