8000 GitHub - dtop/gin-alexa-skeleton: Golang Skeleton Application to start an Alexa Skill
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dtop/gin-alexa-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alexa Skeleton App

Golang Skeleton Application to start an Alexa Skill

Since Alexa APIs are only accepting one endpoint per skill you can easily add several apps to one server. Even if you need to handle them separrately you dont need to implement oauth stuff over and over.

Information

for building the skeleton I am using the following libs

Usage

since you need to edit the actual files to create your own skill(s) I would recommend to download the release version of this skeleton and create a new repo instead of forking it.

Chances that improvements on this skeleton will be mergable are not very good =(

do not forget to recreate the dependencies after downloading using glide

1) Create (or enhance) the config in ginlexa.go

type Config struct {

    
    ServerPort int `....`
    Apps map[string]ginalexa.Configurable `...`
    
    // your stuff
}

Advisory: all config into Apps (inside of the map) will be passed to the actual EchoApplication obj

2) Setup all applications (1 per skill)

in ginlexa.go

func (gl GinLexa) setupApps() {

    gl.apps["SampleApp"] = &ginalexa.EchoApplication{
        AppID:          "<<<SomeAppId>>>", // can be ommited if config is present
        Config:         gl.cfg.Apps["SampleApp"],
        OnAuthCheck:    sampleapp.OnAuth,
        OnLaunch:       sampleapp.OnLaunch,
        OnIntent:       sampleapp.OnIntent,
        OnSessionEnded: sampleapp.OnSessionEnded,
    }.Inject()
}

Advisory: do not forget the .Inject() at end. this will give the appid to the obj if you did not give it to the struct

3) Create another directory under apps and start your skill programming

tbc: create wrappers for your data storage stuff along with the provided interfaces in /abstract/types.go

Hints

tbc

About

Golang Skeleton Application to start an Alexa Skill

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0