alexa-actions
v1.2.2
Published
This is a lightweight wrapper to make the Dialogflow callbacks compatible with an Alexa Skill.
Downloads
15
Maintainers
Readme
Alexa Actions
This is a npm module which adds support for API.ai on the Alexa-SDK to support e.g. Actions on Google.
Usage
The simple way:
Just replace require('alexa-sdk')
by require('alexa-actions')
.
The more advanced usage if something does not work for you:
const AlexaActions = require('alexa-actions');
// [...]
exports.handler = (event, context) => {
const alexa = Alexa.handler(AlexaActions.toAlexaStyle(event),
AlexaActions.addApiAiAttributes(context));
alexa.app_id = APP_ID;
alexa.resources = languageStrings;
alexa.registerHandlers(handlers);
alexa.execute();
};
The Intents on API.ai have to be the same as in your Alexa Skill, the parameters of your intent API.ai have to be named equal to the slots in your skill.
Examples
Real world examples on Google Home:
- "Okay Google, ask Dependency Lookup where is the class
AdView
?""
License
Apache 2.0