DC Metro Google Action
This is a custom action for Google Assistant which will tell you the current rail and bus predictions for the DC Metro transit system. These actions can be invoked on anything that supports Google Assistant such as a phone, a Google Home device, and the from the app. This action leverages the Metro API's. It's not an official product provided by WMATA.
You can view this application on the Google Assistant interaction directory here.
This application can be installed with Yarn by running
yarn install. With the dependencies installed you can compile, lint and format the code base using the the following commands.
||Formats the code.|
||Lints the code.|
||Prepares the code for production.|
||Runs the unit tests. All unit tests can be found within the tests directory.|
Deploying the Action
This action uses Firebase functions and DialogFlow. It can be deployed to Firebase by running the
yarn deploy command and by importing the DialogFlow intents using the zip file found in the root of the repository. You'll also need to setup an environment variable within your functions configuration called
metro.apiKey with an API key from WMATA.
You're able to invoke the action using Google Assistant by saying
Hey Google, talk to DC Metro, or by using one of the following commands.
||You can ask the action for a rail or train timetable at a specific station. For instance you can say
||You can ask the action for a bus stop timetable for a specific stop id. For instance you can say
||You can ask the action for a list of available commands by saying either
If you have a screen the action will send a detailed timetable to your device.
The app icon used for the action was created by Paganini.