Created
April 22, 2016 06:14
-
-
Save steam0/9dbe5c260da60455c14741ae8d661f67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Telldus REST api */ | |
app.get('/listClients', function (request, response) { | |
cloud.getDevices(function(err, devices) { | |
if (!!err) { | |
return console.log('getDevices: ' + err.message); | |
} | |
response.end(JSON.stringify(devices)); | |
}); | |
}) | |
/* Hue REST API */ | |
app.get('/hue/lights', function (request, response) { | |
console.log(request.query) | |
if (!hue_online) { | |
hue_error(response) | |
return | |
} | |
HueApi.lights(function(lights) { | |
response.end(JSON.stringify(lights)) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment