0.2.0 • Published 8 years ago

alexa-ability-async-handler v0.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

alexa-ability-async-handler Build Status

A promise based alexa-ability handler

Example

import { Ability, events } from 'alexa-ability';
import { handleAbility, handleEvent } from 'alexa-ability-async-handler';

const ability = new Ability();

ability.on(events.launch, function(req) {
    req.say("Testing testing one two three.").end();
});

handleAbility(ability)(event).then(
    res => console.log(res),
    err => console.error(err)
)

API

handleAbility(app) -> abilityHandler(event) -> promise
handleEvent(app, event) -> promise