1.0.5 • Published 3 years ago

hik-openapi v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

介绍

node版的hikvision (海康威视)OpenAPI安全认证库

安装

npm install hik-openapi -S

yarn add hik-openapi

使用

const HikOpenApi = require('hik-openapi');

// 构造
const appKey = 'xxxx';
const appSecret = 'xxxxx';
const baseUrl = 'https://xxx.xx.xxx.x:xxx';
const openApi = new HikOpenApi({ appKey, appSecret, baseUrl, debug: true });

// 请求
const apiUrl = '/artemis/api/resource/v1/cameras';
const postData = {
  pageNo: 1,
  pageSize: 1000
};
openApi.post(apiUrl, postData).then(res => console.log(res.data));

参数

构造参数

参数说明必须默认
appKeyappKey
appSecretappSecret
baseUrl平台地址
debug调试默认,开启会输出签名信息和请求头信息false

使用 参数

参数说明必须默认
apiUrl具体请求的数据接口url
postData请求体

说明

目前暂只支持post请求方式,若有其他请求方式可联系我添加(需要测试环境)😀

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago