https://github.com/boneskull/seneca-losant
https://github.com/boneskull/seneca-losant
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/boneskull/seneca-losant
- Owner: boneskull
- License: mit
- Created: 2016-06-12T03:54:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-13T09:23:52.000Z (almost 10 years ago)
- Last Synced: 2024-10-29T22:37:17.558Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# seneca-losant
[](https://travis-ci.org/boneskull/seneca-losant) [](https://www.bithound.io/github/boneskull/seneca-losant) [](https://www.bithound.io/github/boneskull/seneca-losant) [](https://www.npmjs.com/package/seneca-losant)
> Seneca plugin for interacting with Losant API
## Requirements
Node.js >= v6
## Install
```shell
$ npm i seneca seneca-losant
```
## Usage
```js
require('seneca')()
.use(require('seneca-losant'), {
id: 'MY_DEVICE_ID',
key: 'API_ACCESS_KEY',
secret: 'SECRET_KEY'
});
```
## Action Patterns
### Send Device State to Losant
`role:losant`, `cmd:send`
**Required** arguments:
- `state` - Object representing device state; keys should be configured in the device's settings on Lodash's site.
*Optional* arguments:
- `time` - A `Date` object representing the time of the state update. Defaults to "now".
*Returns `undefined` upon success*.
## License
© 2016 [Christopher Hiller](https://boneskull.com). Licensed MIT.