Node.js library to communicate with official SwitchBot API. It provides elementary functionalities to control devices.
Using npm:
$ npm install switchbot-api
Once the package is installed, you can import the classes:
import SwitchBotApi, { SwitchBotBlindTilt } from 'switchbot-api';
const switchBotApi = new SwitchBotApi(token, secret);
const devices = await switchBotApi.getDevices();
See examples to get an insight.
This project is licensed under MIT.