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
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "my interaction model", | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [] | |
}, | |
{ |
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
const fetch = require('node-fetch'); | |
module.exports = Alexa.CreateStateHandler( | |
'fetch_state', | |
Object.assign({}, genericHandlers, { | |
'FetchRequest': () => | |
{ | |
fetch('https://jsonplaceholder.typicode.com/posts/1') | |
.then(response => response.json()) | |
.then(json => this.emit(':tell', `The title is: ${json.title} `) |
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
const accountSid = 'YOUR TWILIO SID HERE'; | |
const authToken = 'YOUR TWILIO AUTH TOKEN HERE'; | |
const twilio = require('twilio'); | |
const client = new twilio(accountSid, authToken); | |
module.exports = Alexa.CreateStateHandler( | |
'twilio_state', | |
Object.assign({}, genericHandlers, { | |
'SendSMS': () => |
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
module.exports = Alexa.CreateStateHandler( | |
'root_handler_state', | |
Object.assign({}, genericHandler, { | |
'LaunchRequest': () => this.emit(':ask', "Just keeping the session open") | |
}) | |
); |
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
module.exports = { | |
'AMAZON.HelpIntent': () => this.emit(':ask', 'Help Prompt', 'Help RePrompt'), | |
'AMAZON.StopIntent': () => this.emit(':tell', 'Bye!'), | |
'AMAZON.CancelIntent': () => { | |
this.response.speak('Ok, let\'s play again soon.'); | |
this.emit(':responseReady'); | |
}, | |
'SessionEndedRequest': () => this.emit(':saveState', true) | |
}; |
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
const genericHandler = request('../generic_handler'); | |
module.exports = Object.assign({}, genericHandler, { | |
'LaunchRequest': () => this.emit(':ask', "This skill has been launched!") | |
}); |
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
module.exports = { | |
SynonymValue: (slt, evt) => { | |
return evt | |
.request | |
.intent | |
.slots[slt] | |
.resolutions | |
.resolutionsPerAuthority[0] | |
.values[0] | |
.value |
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
'use strict'; | |
const Alexa = require('alexa-sdk'); | |
const constants = require('constants'); | |
const rootHandler = require('rootHandler'); | |
const otherHandler = require('otherHandler'); | |
exports.handler = function(event, context, callback){ | |
let alexa = Alexa.handler(event, context); |
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
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "my example app", | |
"intents": [ | |
{ | |
"name": "RootRequest", | |
"slots": [{ | |
"name": "pronoun", | |
"type": "pronoun" |
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
``` | |
words | |
to | |
scrape | |
```.replace('\n', ',\n') |
NewerOlder