alexa-nodekit
Amazon Echo Alexa's App Kit NodeJS Implementation
Usage
// Require module.var alexa = ; /** * Store values from Echo Request. * * @param * * @return */alexa;alexa;alexa; /** * Respond to the Echo requests. The Content-Length header must be included in each response. * * @param * @param * @param * @param * @param * @param * @param * * @return */// Launch or Intent Response.alexa; // Session Ended Response.alexa;
Examples
Example of Launch Request/Response using ExpressJS.
var alexa = ; // Route request and response ends up here.exports { // Grab the necessary values from the Echo request. alexa; // Store the session and/or user data // Respond to the Echo alexa;};
Example of Intent Request/Response using ExpressJS.
var alexa = ; // Same route used as launch, request and response ends up here.exports { // Grab the necessary values from the Echo request. alexa; // Check session and/or user data // Check the Intent Name and Intent Slots to decide on what logic to kick off. // Respond to the Echo alexa;};
Example of Session Ended Request/Response using ExpressJS.
var alexa = ; // Same route used as launch and intent, request and response ends up here.exports { // Grab the necessary values from the Echo request. alexa; // Check session and delete it. // Respond to the Echo alexa;};
Testing
$ npm test
Contributions
- Fork it (https://github.com/YOUR_USERNAME/alexa-nodekit/fork).
- Create your feature branch (git checkout -b my-new-feature).
- Commit your changes (git commit -am 'Added some feature.').
- Push to the branch (git push origin my-new-feature).
- Create a new pull request.