This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://us-central1-leeboonstra-blogdemos.cloudfunctions.net/tvguidefeed?channels=4&days=0 | |
'use strict'; | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const rp = require('request-promise'); | |
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const functions = require('firebase-functions'); | |
const { | |
dialogflow, | |
Suggestions, | |
Image, | |
BasicCard, | |
MediaObject, | |
List, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { | |
dialogflow | |
} = require('actions-on-google'); | |
const pug = require('pug'); | |
/* | |
* Uses Pug.js https://pugjs.org/language/plain-text.html | |
* Requires a Dialogflow custom payload like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { | |
dialogflow | |
} = require('actions-on-google'); //version 2.1.1 | |
const assistantHandler = (conv) => { | |
console.log('Dialogflow Request headers: ' + JSON.stringify(conv.headers)); | |
console.log('Dialogflow Request body: ' + JSON.stringify(conv.body)); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs | |
// for Dialogflow fulfillment library docs, samples, and to report issues | |
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const rp = require('request-promise'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-tvguide-agent", | |
"description": "Build the TV Guide agent for Google Assistant with Dialogflow", | |
"version": "1.0.0", | |
"license": "Apache-2.0", | |
"author": "Lee Boonstra", | |
"engines": { | |
"node": "^8" | |
}, | |
"dependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Follow Procedure Produced Errors: | |
Download https://www.raspberrypi.org/downloads/raspbian/ (2018-03-13) unzip, and burn to SD card with https://etcher.io/ | |
Select a working WIFI network. | |
To open a terminal you can use: CTRL + ALT + T | |
git clone https://github.com/google/aiyprojects-raspbian.git AIY-projects-python | |
sudo apt-get install python-virtualenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//follow these steps in order to make the raspberry pi reboot in headless mode | |
1. Open my_assistant.service file in an editor: | |
sudo nano /lib/systemd/system/my_assistant.service | |
2. Copy contents of my_assistant.service in editor | |
3. Make your service script executable: | |
sudo chmod 644 /lib/systemd/system/my_assistant.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
process.env.DEBUG = 'actions-on-google:*'; | |
const request = require('request'); | |
const Assistant = require('actions-on-google').ApiAiAssistant; | |
var CHANNELS = new Map([ | |
["Nederland 1", 1], | |
["Nederland 2", 2], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
{ | |
kind: 'storage#object', | |
resourceState: 'exists', | |
id: 'leeboonstra-videoapi/mov_bbb.mp4/1490796080783211', | |
selfLink: 'https://www.googleapis.com/storage/v1/b/leeboonstra-videoapi/o/mov_bbb.mp4', | |
name: 'mov_bbb.mp4', | |
bucket: 'leeboonstra-videoapi', | |
generation: '1490796080783211', | |
metageneration: '1', |