@bridgerakol/samsung-smart-api
Version:
Node Module For Connecting Samsung Smartthings API
57 lines (45 loc) • 1.2 kB
Markdown
#bridgerakol
#samsung-smart-api
## Quick Start
Install the samsung-smart-api module
```bash
$ npm install @bridgerakol/samsung-smart-api
```
Import the module
```js
const smartthings = require("@bridgerakol/samsung-smart-api");
let st = new smartthings.SmartThings("Token");
```
Get a list of all devices:
```js
st.devices.getList().then(res => {
console.log(res.status) // True for success and False for Failure
console.log(res.data)
})
```
Get the device status
```js
st.devices.getStatus(deviceID).then(res => {
console.log(res.status) // True for success and False for Failure
console.log(res.data)
})
```
# List of Functionality
* devices
* getList()
* getStatus(deviceId)
* devices.getListLocation([locationId])
* devices.getBulkStatus([deviceId])
* devices.commands(deviceId,on/off)
* locations
* getList()
* getDetail(locationId)
* create(payload)
* remove(locationId)
* update(locationId, payload)
* rooms
* getList()
* getDetail(locationId, roomId)
* create(locationId, payload)
* remove(locationId, roomId)
* update(locationId, roomId,payload)