You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Nicolas Garnier dc2519ea4a Updating version of the firebase-functions module in package.json files to launch version 8 years ago
..
functions Updating version of the firebase-functions module in package.json files to launch version 8 years ago
README.md Update to the actions sample readme (again). 8 years ago
action.json Cleaned up and added README for the assistant sample. 8 years ago
firebase.json Cleaned up and added README for the assistant sample. 8 years ago

README.md

Google Assistant action that reads the ordinal of a number.

This sample shows how to create an action for the Google Home/Assistant using the Actions SDK hosted on Cloud Functions. The sample action asks users to say a number and reads out the ordinal of that number.

e.g. If the user says "Twelve" the action will say "The ordinal of twelve is twelfth".

Further reading:

Functions Code

See file functions/index.js for the code.

Handling the Google Actions requests is done using the Google Actions SDK.

The dependencies are listed in functions/package.json.

Deploy and test

To test this sample action:

  • Create a Firebase Project using the Firebase Developer Console
  • Configure this sample to use your project using firebase --use add and select your project.
  • Deploy your project using firebase deploy
  • In the action.json file, update the two <YOUR_PROJECT_ID> placeholders with your Firebase project ID. The URL should match the Function URL (sayNumber): that was printed out by firebase deploy.
  • Download the gaction CLI
  • Make your action available for testing using the gactions preview action.json
  • Test your Action on the Google Home Web Simulator by saying "Talk to My Action"