Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. 'use strict';
  2. var APP_ID = 'amzn1.ask.skill.36aad7d9-ef3a-4256-bccf-e3580aee19c7';
  3. var SPEECH_OUTPUT_DOES = 'UHP is developing mobile and web applications.';
  4. var SPEECH_OUTPUT_FOUNDED = 'UHP was founded in late 2015.';
  5. var SPEECH_OUTPUT_LAUNCH = 'Ask me something about UHP Digital.';
  6. var AlexaSkill = require('./AlexaSkill');
  7. var UhpQAService = function() {
  8. AlexaSkill.call(this, APP_ID);
  9. };
  10.  
  11. UhpQAService.prototype = Object.create(AlexaSkill.prototype);
  12. var doesResponseFunction = function(intent, session, response) {
  13. response.tell(SPEECH_OUTPUT_DOES);
  14. };
  15.  
  16. var foundedResponseFunction = function(intent, session, response) {
  17. response.tell(SPEECH_OUTPUT_FOUNDED);
  18. };
  19.  
  20. var launchResponseFunction = function(intent, session, response) {
  21. response.tell(SPEECH_OUTPUT_LAUNCH);
  22. };
  23.  
  24. UhpQAService.prototype.eventHandlers.onLaunch = launchResponseFunction;
  25.  
  26. //UhpQAService.prototype.eventHandlers.onLaunch = doesResponseFunction;
  27. //UhpQAService.prototype.eventHandlers.onLaunch = foundedResponseFunction;
  28.  
  29. UhpQAService.prototype.intentHandlers = {
  30. 'testIntent': doesResponseFunction,
  31. 'uhpFounded': foundedResponseFunction
  32. };
  33.  
  34.  
  35. exports.handler = function(event, context) {
  36. var uhpQAService = new UhpQAService();
  37. uhpQAService.execute(event, context);
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement