Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save manekinekko/5491d2331ee364eac43da469fee1c109 to your computer and use it in GitHub Desktop.
Save manekinekko/5491d2331ee364eac43da469fee1c109 to your computer and use it in GitHub Desktop.
'use strict';
const fetch = require('node-fetch');
const functions = require('firebase-functions');
const { smarthome } = require('actions-on-google');
const util = require('util');
const admin = require('firebase-admin');
admin.initializeApp();
const firebaseRef = admin.database().ref('/');
exports.auth = functions.https.onRequest((request, response) => { });
exports.token = functions.https.onRequest((request, response) => { });
const app = smarthome({ });
app.onSync((body, headers) => { });
app.onQuery(body => { });
app.onExecute((body, headers) => { });
app.onDisconnect((body, headers) => { });
exports.smarthome = functions.https.onRequest(app);
exports.requestsync = functions.https.onRequest((request, response) => { });
exports.reportstate = functions.database.ref('{deviceId}/state').onWrite(event => { });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment