jovo-plugin-alexa-skill-connections
v1.0.0
Published
Jovo plugin that adds support for Alexa Skill Connections.
Downloads
1
Readme
jovo-plugin-alexa-skill-connections
Jovo plugin that adds support for Alexa Skill Connections.
Installation
Install SkillConnections plugin into your Jovo project:
npm install jovo-plugin-alexa-skill-connections --save
Use the plugin in the app.js:
const { SkillConnections } = require("jovo-plugin-alexa-skill-connections");
app.$platform.get('Alexa').use(new SkillConnections());
Or app.ts:
import { Extensible } from 'jovo-framework';
import { SkillConnections } from "jovo-plugin-alexa-skill-connections";
const AlexaPlugin = <Extensible | undefined>app.$platform.get('Alexa');
AlexaPlugin?.use(new SkillConnections());
Usage
In general:
app.setHandler({
TestIntent(): {
this.$alexaSkill?.startConnection({
uri: "connection://AMAZON.TestStatusCode/1",
input: {
code: "200",
},
});
},
ON_SESSIONRESUME() {
console.log('AlexaSkill.SessionResumedRequest');
const { code, message } = (<any>this.$request).request.cause.status;
this.ask(`status code: ${code}, message: ${message}`);
}
});