Skip to content

This is a npm module which adds support for API.ai on the Alexa-SDK to support e.g. Actions on Google.

License

Notifications You must be signed in to change notification settings

rekire/AlexaActions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is a npm module which adds support for API.ai on the Alexa-SDK to support e.g. Actions on Google.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published