Awesome
Alexa Skill
A Ruby based DSL to create new Alexa Skills
First, install the gem
gem install alexa-skill
Now we'll create a simple hello world app app.rb
require 'alexa-skill/app'
intent 'MyApp' do
utterance 'my name is {name}'
slot 'name', ['michelle', 'rich', 'stacie', 'tim', 'emma']
respond do |slots|
"Hi, #{slots['name']}"
end
end
This sets up Rackup to run the app, just like running a Sinatra app config.ru
require './app'
require 'alexa-skill/server'
run AlexaSkill::Server
Now we can start the server
rackup
Now we can configure the server in the Alexa Developer Portal.
curl http://localhost:9292/utterances.txt
curl http://localhost:9292/schema.json
curl http://localhost:9292/types.txt?type=LIST_OF_NAME