Permalink
Browse files

birthday updates

Signed-off-by: Justin <jusjef@amazon.com>
  • Loading branch information...
Justin
Justin committed Aug 25, 2017
1 parent c8e2b50 commit 1fda556ebdcc86ca1dea6eb69cdecf8c4e42a465
@@ -1,10 +1,10 @@
'use strict';
var Alexa = require('alexa-sdk');
var constants = require('./constants');
const Alexa = require('alexa-sdk');
const constants = require('./constants');
// Binding audio handlers to PLAY_MODE State since they are expected only in this mode.
var audioEventHandlers = Alexa.CreateStateHandler(constants.states.PLAY_MODE, {
const audioEventHandlers = Alexa.CreateStateHandler(constants.states.PLAY_MODE, {
'PlaybackStarted' : function () {
/*
* AudioPlayer.PlaybackStarted Directive received.
@@ -53,7 +53,7 @@ var audioEventHandlers = Alexa.CreateStateHandler(constants.states.PLAY_MODE, {
*/
return this.context.succeed(true);
}
var enqueueIndex = this.attributes['index'];
enqueueIndex +=1;
// Checking if there are any items to be enqueued.
@@ -74,7 +74,7 @@ var audioEventHandlers = Alexa.CreateStateHandler(constants.states.PLAY_MODE, {
var podcast = audioData[this.attributes['playOrder'][enqueueIndex]];
var expectedPreviousToken = this.attributes['token'];
var offsetInMilliseconds = 0;
this.response.audioPlayerPlay(playBehavior, podcast.url, enqueueToken, expectedPreviousToken, offsetInMilliseconds);
this.emit(':responseReady');
},
@@ -101,4 +101,4 @@ function getIndex() {
function getOffsetInMilliseconds() {
// Extracting offsetInMilliseconds received in the request.
return this.event.request.offsetInMilliseconds;
}
}
@@ -1,11 +1,11 @@
// Minimized client.recordings.list function
// This works beautifully as well
var config = require('./twilio-config.js')
var accountSid = config.accountSid
var authToken = config.authToken
const config = require('./twilio-config.js')
const accountSid = config.accountSid
const authToken = config.authToken
var client = require('twilio')(accountSid, authToken);
const client = require('twilio')(accountSid, authToken);
var arr =[];
module.exports = {
@@ -1,9 +1,9 @@
'use strict';
var Alexa = require('alexa-sdk');
var constants = require('./constants');
var stateHandlers = require('./stateHandlers');
var audioEventHandlers = require('./audioEventHandlers');
const Alexa = require('alexa-sdk');
const constants = require('./constants');
const stateHandlers = require('./stateHandlers');
const audioEventHandlers = require('./audioEventHandlers');
exports.handler = function(event, context, callback){
var alexa = Alexa.handler(event, context);
@@ -1,10 +1,10 @@
'use strict';
var Alexa = require('alexa-sdk');
var audioData = require('./getRecordings.js');
var constants = require('./constants');
const Alexa = require('alexa-sdk');
const audioData = require('./getRecordings.js');
const constants = require('./constants');
var stateHandlers = {
const stateHandlers = {
startModeIntentHandlers : Alexa.CreateStateHandler(constants.states.START_MODE, {
/*
* All Intent Handlers for state : START_MODE
@@ -177,7 +177,7 @@ var stateHandlers = {
module.exports = stateHandlers;
var controller = function () {
const controller = function () {
return {
play: function () {
/*
@@ -1,4 +1,4 @@
var config = {
const config = {
accountSid: 'YOUR_ACCOUNT_SID', // Your Account SID from www.twilio.com/console
authToken: 'YOUR_AUTH_TOKEN' // Your Auth Token from www.twilio.com/console
}

0 comments on commit 1fda556

Please sign in to comment.