init
This commit is contained in:
24
app.rb
Normal file
24
app.rb
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user