Coder Social home page Coder Social logo

fulfillment-weather-nodejs's Introduction

Dialogflow Fulfillment Weather Sample Node.js

Setup: WWO Weather API

  1. 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
  2. Paste your API key for the value of the wwoApiKeyvarible on line 20 of functions/index.js

Setup: Dialogflow and fulfillment

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.

Option 1: Add to Dialogflow (recommended)

Click on the Add to Dialogflow button below and follow the prompts to create a new agent:

Weather Sample

Option 2: Dialogflow Inline Editor

  1. Create a Dialogflow agent
  2. 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)
  3. Sign up for or sign into Dialogflow
  4. Enable the Cloud Function for Firebase inline editor
  5. Change the name of the function in functions/index.js from dialogflowFulfillmentLibAdvancedSample to dialogflowFirebaseFulfillment
  6. Copy the code in functions/index.js to the index.js file in the Dialogflow Cloud Function for Firebase inline editor.
  7. Copy the code in functions/package.json to the package.json file in the Dialogflow Cloud Function for Firebase inline editor.
  8. Click Deploy

Option 3: Firebase CLI

  1. Create a Dialogflow agent
  2. 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)
  3. cd to the functions directory
  4. Run npm install
  5. Install the Firebase CLI by running npm install -g firebase-tools
  6. Login to your Google account with firebase login
  7. Add your project to the sample with firebase use [project ID] find your project ID here
  8. Run firebase deploy --only functions:dialogflowFulfillmentLibAdvancedSample
  9. Paste the URL into your Dialogflow agent's fulfillment

References and How to report bugs

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.md.

Terms

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.

fulfillment-weather-nodejs's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.