How to use the jovo-framework.App function in jovo-framework

To help you get started, we’ve selected a few jovo-framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jovotech / jovo-framework / examples / javascript / language-model-tester / src / app.js View on Github external
const { App, Util } = require('jovo-framework');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const { LanguageModelTester } = require('jovo-plugin-lmtester');

const app = new App();
// Util.consoleLog();

app.use(
    new GoogleAssistant(),
    new Alexa(),
    new JovoDebugger(),
    new FileDb(),
    new LanguageModelTester(),
);

app.setHandler({
    async LAUNCH() {
        return this.toIntent('HelloWorldIntent');
    },
    HelloWorldIntent() {
        this
github jovotech / jovo-framework / examples / javascript / i18n / src / app.js View on Github external
const { App, Util } = require('jovo-framework');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');

const app = new App();


app.use(
    new GoogleAssistant(),
    new Alexa(),
    new JovoDebugger(),
    new FileDb(),
);


app.setHandler({
    LAUNCH() {
        // this.$speech.t('WELCOME_ARRAY');
        // return this.tell(this.$cms.resources);
        console.log(this.t('WELCOME_GLOBAL'));
        this.tell(this.t('WELCOME'));
github jovotech / jovo-framework / examples / typescript / 01_alexa / reminders-api / src / app.ts View on Github external
import { App } from 'jovo-framework';
import { Alexa, RelativeReminder, AbsoluteReminder } from 'jovo-platform-alexa';
import { JovoDebugger } from 'jovo-plugin-debugger';
import { FileDb } from 'jovo-db-filedb';


const app = new App();

app.use(
    new Alexa(),
    new JovoDebugger(),
    new FileDb(),
);


app.setHandler({
    async LAUNCH() {
        return this.toIntent('AskForRemindersIntent');
        // return this.toIntent('AddRelativeReminderIntent');
        // return this.toIntent('AddAbsoluteReminderIntent');
        // return this.toIntent('AllRemindersIntent');
        // return this.toIntent('UpdateReminderIntent');
        // return this.toIntent('DeleteReminderIntent');
github rmtuckerphx / jovo-enterprise-template-nodejs / src / app.js View on Github external
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

const { Jovo } = require('jovo-core');
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { GoogleAssistant } = require('jovo-platform-googleassistant');

// Plugins
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const { DynamoDb } = require('jovo-db-dynamodb');
const { DashbotAlexa, DashbotGoogleAssistant } = require('jovo-analytics-dashbot');

const app = new App();

app.use(
  new Alexa(),
  new GoogleAssistant(),
  new JovoDebugger(),
  new FileDb(),
  new DynamoDb(),
  new DashbotAlexa(),
  new DashbotGoogleAssistant()
);

// ------------------------------------------------------------------
// JOVO EXTENSIONS
// ------------------------------------------------------------------

Jovo.prototype.log = require('./jovo-ext/log.js');
github jovotech / jovo-framework / examples / appHelloWorld.js View on Github external
'use strict';

// =================================================================================
// App Configuration
// =================================================================================

const {App} = require('jovo-framework');

const config = {
    logging: true,
};

const app = new App(config);


// =================================================================================
// App Logic
// =================================================================================

app.setHandler({
    'LAUNCH': function() {
        this.toIntent('HelloWorldIntent');
    },

    'HelloWorldIntent': function() {
        this.followUpState('NameState').ask('Hello World! What is your name?', 'Please tell me your name.');
    },
    'NameState': {
        'MyNameIsIntent': function(name) {
github jovotech / jovo-framework / examples / alexa_specific / appAlexaLists.js View on Github external
'use strict';

// =================================================================================
// App Configuration
// =================================================================================

const {App} = require('jovo-framework');

const config = {
    logging: true,
};

const app = new App(config);

// =================================================================================
// App Logic
// =================================================================================

app.setHandler({
    'LAUNCH': function() {
        this.toIntent('GetShoppingListIntent');
        // this.toIntent('GetTodoListIntent');
        // this.toIntent('AddItemToToDoListIntent');
        // this.toIntent('AddItemToShoppingListIntent');
    },

    'GetShoppingListIntent': function() {
        // Active or completed
        this.user().getShoppingList('active')
github jovotech / jovo-framework / examples / javascript / 01_alexa / canfulfill / src / app.js View on Github external
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');

const app = new App();

app.use(
    new Alexa(),
    new JovoDebugger()
);


app.setHandler({
    LAUNCH() {
        this.tell('Hello World');
    },

    CAN_FULFILL_INTENT() {
        const knownSlots = ['name', 'city'] // other known slots
        let canFulfillOneOrMoreSlots = false;
        let canFulfillEverySlot = true;
github jovotech / jovo-framework / examples / javascript / 01_alexa / todo-list / src / app.js View on Github external
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');

const app = new App();

app.use(
    new Alexa()
);


app.setHandler({

    async LAUNCH() {
       // return this.toIntent('GetTodoListIntent');
       // return this.toIntent('AddItemToTodoListIntent');
       //  return this.toIntent('UpdateItemTodoListIntent');
        return this.toIntent('DeleteItemTodoListIntent');


    },
github jovotech / jovo-framework / examples / google_action_specific / appMediaResponse.js View on Github external
'use strict';

// =================================================================================
// App Configuration
// =================================================================================

const {App} = require('jovo-framework');


const config = {
    logging: true,
};

const app = new App(config);


// =================================================================================
// App Logic
// =================================================================================

app.setHandler({
    'LAUNCH': function() {
        // keep session open
        this.googleAction().audioPlayer().play('https://www.url.to/file.mp3', 'song one');
        this.googleAction().showSuggestionChips([' Chip1'])
        this.ask('This is my song');

        // close session
        // this.googleAction().audioPlayer().play('https://song.url.com/song1.mp3', 'song one');
        // this.tell('This is my song');
github jovotech / jovo-framework / examples / javascript / hooks / src / app.js View on Github external
const { App } = require('jovo-framework');

const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');

const app = new App();

app.use(
    new GoogleAssistant(),
    new Alexa(),
    new JovoDebugger(),
    new FileDb(),
);

app.hook('before.platform.output', async (error, host, jovo) => {
    const pollyName = 'Hans';
    if (jovo.isAlexaSkill()) {
        if (jovo.$output.tell) {
            jovo.$output.tell.speech = `${jovo.$output.tell.speech}`;
        }

        if (jovo.$output.ask) {