intell.js 456 B

123456789
  1. const {intell} = require('../https/intell.js')
  2. module.exports = {
  3. //查看设备基本信息(返回中有数据流,但没有值)
  4. getBasic:(divice_id,key) => intell('/devices/' + divice_id, 'GET', key),
  5. //查看设备数据流
  6. getData:(divice_id,key) => intell('/devices/'+ divice_id + '/datastreams', 'GET',key),
  7. //控制设备,发送数据
  8. postData:(divice_id,key,params) => intell('/cmds?device_id=' + divice_id, 'POST',key,params),
  9. }