How to use jovo-platform-googleassistant - 7 common examples

To help you get started, we’ve selected a few jovo-platform-googleassistant 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 / 02_googleassistant / notifications / src / app.js View on Github external
'use strict';

// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

const { App } = require('jovo-framework');
const { GoogleAssistant, NotificationPlugin } = require('jovo-platform-googleassistant');

const app = new App();

const googleAssistant = new GoogleAssistant();

googleAssistant.use(new NotificationPlugin());

app.use(
    googleAssistant
);

// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------

app.setHandler({
    async LAUNCH() {

        this.toIntent('AskForNotifications');
        // this.toIntent('SendNotificationIntent');
github jovotech / jovo-framework / examples / typescript / 02_googleassistant / notifications / src / app.ts View on Github external
import { App } from 'jovo-framework';


import {GoogleAssistant, NotificationObject, NotificationPlugin} from 'jovo-platform-googleassistant';
import { JovoDebugger } from 'jovo-plugin-debugger';
import { FileDb } from 'jovo-db-filedb';


const app = new App();

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


app.setHandler({
    async LAUNCH() {
        this.toIntent('AskForNotifications');
        // this.toIntent('SendNotificationIntent');
    },
    AskForNotifications() {
        // You have to show them suggestion chips inviting them to opt-in,
        // before you can send the actual permission request
        this.$googleAction!.showSuggestionChips(['yes', 'no']);
        this.ask('Notifications?');
    },
github speechmarkdown / jovo-sample-speechmarkdown / src / app.js View on Github external
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

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

const app = new App();

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


// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------

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

    HelloWorldIntent() {
github jovotech / jovo-sample-voice-app-nodejs / src / app.js View on Github external
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

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

const app = new App();

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


// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------

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

    HelloWorldIntent() {
        this.ask('Hello World! What\'s your name?', 'Please tell me your name.');
github jovotech / jovo-framework / examples / javascript / databases / 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 { DynamoDb } = require('jovo-db-dynamodb');
const { DatastoreDb } = require('jovo-db-datastore');
const { MySQL } = require('jovo-db-mysql');


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

app.use(
    new GoogleAssistant(),
    new Alexa(),
    new JovoDebugger(),
    new FileDb(),
    new MySQL({
        tableName: 'users',
        connection: {
            host     : 'localhost',
            user     : 'root',
            password : '',
            database : 'test'
        }
    })
);

app.setHandler({
    async LAUNCH() {
github jovotech / jovo-framework / examples / javascript / speechbuilder / 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 app = new App();

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


app.setHandler({

    async LAUNCH() {
        let foo = false;
        let bar = true;
        this.$speech
            .addText('HelloWorld')
            .addBreak('100ms', false)
            .addAudio('http://www.any.url/test.mp3', 'Text')
            .addText('Foo', foo)
            .addText('Bar', bar)
            .addText(['Text1', 'Text2', 'Text3'])
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) {
            jovo.$output.ask.speech = `${jovo.$output.ask.speech}`;
            jovo.$output.ask.reprompt = `${jovo.$output.ask.reprompt}`;
        }

jovo-platform-googleassistant

> To view this page on the Jovo website, visit https://v3.jovo.tech/marketplace/jovo-platform-googleassistant

Apache-2.0
Latest version published 2 years ago

Package Health Score

34 / 100
Full package analysis

Popular jovo-platform-googleassistant functions

Similar packages