Purpose
Offer ctwing sdk for browser or react-native enviorment
inspired by ctwing-sdk but change the crypto library and query-params
libarary implementation .
Installation
yarn add ctwing-sdk-browserify
Usage
import {CommandOperate, injectCTWingConfiguration} from '@deepcode/ctwing-sdk-browserify';
injectCTWingConfiguration(appKey, appSecret);
let commandOperate = new CommandOperate(productId, masterKey, deviceId);
const mqttMessage = {
payload: {
status: 1,
temperature: 26,
},
}
await commandOperate.sendJSON(mqttMessage);
Limitation
For these sdk implementation , I only use dispatch device command functionality ,
so that I can't ensure other functionality of this library work correctly .
But you also can modify it by your self , I already split the code to multiple file
so that the code should be read easily .
In the end , Welcome PR to perfect this library .