Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanmurakami/node-semantic-lighting
Node wrapper for the semantic lighting API
https://github.com/ryanmurakami/node-semantic-lighting
Last synced: 4 days ago
JSON representation
Node wrapper for the semantic lighting API
- Host: GitHub
- URL: https://github.com/ryanmurakami/node-semantic-lighting
- Owner: ryanmurakami
- Created: 2016-01-16T00:58:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-16T05:14:08.000Z (almost 9 years ago)
- Last Synced: 2023-08-03T21:50:56.226Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
node-semantic-lighting
======================Use the [Semantic Lighting API](https://lighting.kitt.ai) in your node projects.
## Installation
Install via npm:
```sh
npm install semantic-lighting
```## Usage
Include in your projects:
```javascript
var SemLight = require('semantic-lighting');
```Create a lighting client:
```javascript
var myLight = new SemLight(apiKey, lightsArray);
```Query the API:
```javascript
myLight.sendCommand('show me barney', callbackFunc);
```Register a function to be called based on response:
```javascript
function colorHandler(lights, colors) {}myLight.registerFunction('set_lights_to_color', colorHandler);
myLight.sendCommand('show me pee wee herman');
```