Skip to content

skierkowski/alexa-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Climate Dependency Status

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

About

A Ruby based DSL to create new Alexa Skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages