aliyun-iot-sdk

Aliyun Server Side IoT SDK for Node.js.(阿里云 IoT 服务端 Node.js SDK)


Keywords
aliyun, iot, server, sdk, node, iothub, nodejs
License
MIT
Install
npm install aliyun-iot-sdk@0.1.1

Documentation

aliyun-iot-sdk

🇹🇸 纯 TypeScript 实现,提供完整声明文件

Aliyun Server Side IoT SDK for Node.js.(阿里云 IoT 服务端 Node.js SDK)

旧版 API

查看旧版 (0.0.5) API 点击此处

使用示例

import { Client } from 'aliyun-iot-sdk'

// 新建客户端
const client = new Client({
  accessKeyId: '<xxxxx>',
  accessKeySecret: '<xxxxx>',
  regionId: 'cn-shanghai'
})

// 调用接口
client.request({
  Action: 'GetDeviceShadow',
  DeviceName: 'test',
  ProductKey: 'test'
})

API

新建客户端

  • new Client()

发送请求

  • Client.request(requestParameters)

    • requestParameters 请求参数,目前已经添加类型声明的接口在下面的列表中,对于没有添加类型声明的接口,使用 ts 时用 as any 过度
    • 返回值是一个 axios 的请求结果

声明文件完成进度