Following the Lambda setup, it's time to code the actual Lambda function. We will be editing the code inline, in the index.js file on the Developer Portal itself, following these steps:
- Implement the handling of events in exports.handler. Our Lambda, in this case, will be handling only a single intent, that is, OneShotFetchTemperatureIntent. Since we are implementing a One-Shot Launch, this single intent will launch our skill and fetch the temperature data.
Before we move on to write the functional logic, declare the following variables, which will be used by our functional logic:
var https = require('https');var firebaseHost = "androidwarehousemonitor.firebaseio.com";
firebaseHost is the same URL (it may ...