O'Reilly logo

Alexa Skills Projects by Madhur Bhargava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding the Lambda function

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:

  1. Implement the handling of events in exports.handler.  Our Lambda, in this case, will be handling only a single intent, that isOneShotFetchTemperatureIntent. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required