You can play "Shiritori" with your Google Home.
To use this app, you should
- have a Google account
- create Actions on Google
- deploy Firebase Functions
- deploy Actions SDK
- insert data in Firebase Realtime Database
- node (v6.11.5^)
- gactions (mention later)
git clone https://github.com/monstar-lab/google-home-shiritori.git
- Click "Add/import project" on Actions on Google Console
- Write down your [project-name (actions)], choose your country and create project
- Click "Actions SDK"
- Download
gactions
from the cite of gactions-cli and executechmod u+x gactions
- move
gactions
togoogle-home-shiritori
- Open your Firebase Console, write down your [project-name (firebase)] [project-id] and create new project
npm install -g firebase-tools
- Execute
firebase login
and login to Firebase-cli according to the instruction - Execute
firebase init functions
ingoogle-home-shiritori/
- Choose [project-name (firebase)]
- Answer like below
? What language would you like to use to write Cloud Functions? JavaScript ? Do you want to use ESLint to catch probable bugs and enforce style? No ? File functions/package.json already exists. Overwrite? No ? File functions/index.js already exists. Overwrite? No ? Do you want to install dependencies with npm now? Yes
- Deploy
firebase deploy --only functions
- Execute
./gactions init
- Edit
action.json
like belowYour URL of Firebase Functions is displayed on your Firebase Console.{ "actions": [ { "description": "Default Welcome Intent", "name": "MAIN", "fulfillment": { "conversationName": "shiritoriFunction" }, "intent": { "name": "actions.intent.MAIN", "trigger": { "queryPatterns": [ "しりとりアプリにつないで" ] } } }, { "name": "SHIRITORI", "fulfillment": { "conversationName": "shiritoriFunction" }, "intent": { "name": "actions.intent.TEXT", "parameters": { "name": "shiritoriWord", "type": "Shiritori" }, "trigger": { "queryPatterns": [ "$Shiritori:shiritoriWord" ] } } } ], "conversations": { "shiritoriFunction": { "name": "shiritoriFunction", "url": [URL of Firebase Functions] } }, "locale": "ja" }
- Execute
./gactions update --action_package action.json --project [project名(actions)]
- Edit
data.json
.dictionary
is the vocabulary list of the Google Home - Click "Database" from Firebase Console
- Create Realtime Database and import data from JSON
- Import
data.json