commit 5cf52bb138b614876d0dba0dbcdc20975c77bd38 Author: Tommy Parnell Date: Thu Dec 1 20:42:25 2016 -0500 init diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..7421bd2 --- /dev/null +++ b/Gemfile @@ -0,0 +1 @@ +gem 'alexa_skills_ruby' \ No newline at end of file diff --git a/app.rb b/app.rb new file mode 100644 index 0000000..9a5dceb --- /dev/null +++ b/app.rb @@ -0,0 +1,24 @@ +require 'sinatra' +require 'alexa_skills_ruby' + +class CustomHandler < AlexaSkillsRuby::Handler + + on_intent("GetDeveloperExcuse") do + response.set_output_speech_text("Developer Excuses yo") + end + +end + +post '/' do + content_type :json + + handler = CustomHandler.new(application_id: ENV['APPLICATION_ID'], logger: logger) + + begin + handler.handle(request.body.read) + rescue AlexaSkillsRuby::InvalidApplicationId => e + logger.error e.to_s + 403 + end + +end \ No newline at end of file