Joseph J. Schmitt e63769c379 Add release date support (#14)
Closes #11 

Adds a couple of new utterances so you can limit your movie results by the release date. You can now add a movie by saying:

> Add The Godfather released in 1972
> Add The Godfather from 1972
> Add The Godfather that came out in 1972
> Add The Godfather released in March 1972

If you've used previous versions of the Intent Schema and Sample Utterances, make sure to copy and paste the new ones in.
2016-10-29 22:40:43 -04:00

34 lines
913 B
JavaScript

'use strict';
import Alexa from 'alexa-app';
import handleLaunchIntent, {
handleFindMovieIntent,
handleAddMovieIntent,
handleAddMovieDateIntent,
handleYesIntent,
handleNoIntent,
handleCancelIntent,
handleHelpIntent
} from './handlers.js';
const app = new Alexa.app('couchPotato');
app.launch(handleLaunchIntent);
app.intent('FindMovie', handleFindMovieIntent);
app.intent('AddMovie', handleAddMovieIntent);
app.intent('AddMovieDate', handleAddMovieDateIntent);
app.intent('AMAZON.YesIntent', handleYesIntent);
app.intent('AMAZON.NoIntent', handleNoIntent);
app.intent('AMAZON.CancelIntent', handleCancelIntent);
app.intent('AMAZON.HelpIntent', handleHelpIntent);
app.post = function(request, response, type, exception) {
if (exception) {
// Always turn an exception into a successful response
response.clear().say('An error occured: ' + exception).send();
}
};
export default app;