0.2.4 • Published 6 years ago

voxa-opearlo v0.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Voxa Opearlo

Build Status Coverage Status

An Opearlo plugin for voxa

Installation

Just install from npm

npm install --save voxa-opearlo

Usage

const voxaOpearlo = require('voxa-opearlo');

const opearloConfig = {
  userId: 'userId',
  appName: 'appName',
  apiKey: 'apiKey',
  suppressSending: false, // A flag to supress sending hits. Useful while developing on the skill
};

voxaOpearlo(skill, opearloConfig);

What you get

Once you register the Voxa plugin, it will handle logging all incoming intents automatically. Additionally, each state will be logged as a CustomEvent. Thus out of the box you'll get a pathway that looks like:

voice pathway

Suppressing State Events

Sometimes smaller intermediary states can flood the pathways diagram. Suppress a state from logging as follows:

skill.onState('my-state',alexaEvent => {
  alexaEvent.opearlo.ignore();
  return {reply: 'Greeting', to: 'my-next-state'};
})

Logging variables

You can also add additional values which will be logged along with the state custom event

skill.onState('my-state',alexaEvent => {
  alexaEvent.opearlo.variables.myVariable = 'hello'
  return {reply: 'Greeting', to: 'my-next-state'};
})

Custom Events

You can also log custom events from a state.

skill.onState('my-state',alexaEvent => {
  alexaEvent.opearlo.log('my-custom-event',{myVariable: 'hello'});
  return {reply: 'Greeting', to: 'my-next-state'};
})
3.0.0-alpha1

6 years ago

3.0.0-alpha

6 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago