- Get a WWO API key, by going to https://developer.worldweatheronline.com/api/ and following the instructions to get an API key that includes forecasts 14 days into the future
- Paste your API key for the value of the
wwoApiKey
varible on line 20 offunctions/index.js
Choose one of the three options listed below for setup. You only need to complete one of the three options below to setup this sample.
Click on the Add to Dialogflow button below and follow the prompts to create a new agent:
- Create a Dialogflow agent
- Go to your agent's settings and Restore from zip using the
weather-agent.zip
in this directory (Note: this will overwrite your existing agent) - Sign up for or sign into Dialogflow
- Enable the Cloud Function for Firebase inline editor
- Change the name of the function in
functions/index.js
fromdialogflowFulfillmentLibAdvancedSample
todialogflowFirebaseFulfillment
- Copy the code in
functions/index.js
to theindex.js
file in the Dialogflow Cloud Function for Firebase inline editor. - Copy the code in
functions/package.json
to thepackage.json
file in the Dialogflow Cloud Function for Firebase inline editor. - Click
Deploy
- Create a Dialogflow agent
- Go to your agent's settings and Restore from zip using the
weather-agent.zip
in this directory (Note: this will overwrite your existing agent) cd
to thefunctions
directory- Run
npm install
- Install the Firebase CLI by running
npm install -g firebase-tools
- Login to your Google account with
firebase login
- Add your project to the sample with
firebase use [project ID]
find your project ID here - Run
firebase deploy --only functions:dialogflowFulfillmentLibAdvancedSample
- Paste the URL into your Dialogflow agent's fulfillment
- Dialogflow documentation: https://docs.dialogflow.com.
- If you find any issues, please open a bug on GitHub.
- Questions are answered on StackOverflow.
Please read and follow the steps in the CONTRIBUTING.md.
See LICENSE.md.
Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.