Node.js client for Sesame smart lock API
const sesame = require('sesame-client')
const myLock = new sesame.RestClient('API_TOKEN', 'DEVICE_ID')
async function toggle () {
const currStatus = await myLock.getLockStatus()
await myLock.controlLock(currStatus.locked ? 'unlock' : 'lock')
}
Run the following command in your project root.
npm install sesame-client
See API documentation.
Contributions are welcome. Feel free to report an issue or submit a pull request.
This package is distributed under the MIT License. See LICENSE.md for details.
Generated using TypeDoc