0.4.1 • Published 7 years ago

voice-assistant-js v0.4.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

voice-assistant-js

one client library to rule them all (api-ai, google-action, alexa, ...)

Build Status Coverage Status npm GitHub license

Installation

$ yarn add voice-assistant-js

then you should install the client library you want.

  • actions-on-google and express if you want to use api-ai or google-actions

  • alexa-sdk if you want to use alexa

Usage

Implementations

  • alexa sdk
  • google action sdk
  • api-ai over google-action

on aws lamda

make sure you use at least node-6.10

require('reflect-metadata')
const lambda = require('voice-assistant-js').lambda

class IntentClass {
  /**
   * @param {IEvent} event
   */
  say (event) {
    event.tell('say')
  }
  
  /**
   * @param {IEvent} event
   */
  ask (event) {
    event.ask('ask')
  }
}

const mapping = {
  say: IntentClass,
  ask: IntentClass
}

exports.handler = lambda(mapping)

so if you the lamda is invoked with the intent ask the function IntentClass.ask is called...

on google-cloud-functions

//TODO

Test

$ yarn test

TODOS

  • event construction with DI factory (so we can get rid of the specific handler classes)
  • i18n
  • cards
  • forms
  • dialogs
  • error-handling
  • google-cloud-function
0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago