GithubHelp home page GithubHelp logo

isabella232 / snips-action-directions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snipsco/snips-action-directions

0.0 0.0 0.0 788 KB

Snips action code for the Directions app

License: MIT License

Shell 0.09% JavaScript 0.08% TypeScript 99.84%

snips-action-directions's Introduction

snips-action-directions

Snips action code for the Directions app

Build Status

Setup

sh setup.sh

Don't forget to edit the config.ini file.

To be able to make calls to the API, you must have a Google Directions API key.

An assistant containing the intents listed below must be installed on your system. Deploy it following these instructions.

Run

  • Dev mode:
# Dev mode watches for file changes and restarts the action.
npm run dev
  • Prod mode:
# 1) Lint, transpile and test.
npm start
# 2) Run the action.
npm run launch

Test & Demo cases

This app only supports french ๐Ÿ‡ซ๐Ÿ‡ท and english ๐Ÿ‡ฌ๐Ÿ‡ง.

GetDirections

Get directions from a location A to a location B optionally indicating a travel mode

Get directions to the given location

Hey Snips, I would like to be guided to the Statue of Liberty

Get directions from a location A to a location B

Hey Snips, I need to get from Times Square to the Statue of Liberty

Get directions from a location A to a location B by car

Hey Snips, how can I get from the office to the Guggenheim Museum by car?

GetNavigationTime

Get estimated travel time to get to a specific location optionally indicating a travel mode and the place you leave from

Get estimated travel time to get to the given location

Hey Snips, how long will it take me to go to the Metropolitan Museum?

Get estimated travel time to get from location A to location B

Hey Snips, how long will it take me to go from Times Square to the Metropolitan Museum?

Get estimated travel time to get from a location A to a location B, indicating a travel mode

Hey Snips, how long will it take me to drive from Times Square to the Metropolitan Museum?

GetDepartureTime

Ask about what your departure time should be to arrive to a specific location at a specific time, optionally indicating a travel mode and the location you leave from

Get the departure time to get to the given location at a specific time

Hey Snips, I want to be at noon at the office, when I should leave?

Get the departure time to get to location B at a specific time, when leaving from location A

Hey Snips, I want to be at 11:35 am at the office, when I should leave from Times Square?

Get the departure time to get to location B at a specific time, when leaving from location A by car

Hey Snips, I want to be at noon at the office, when I should leave from Times Square if I'm travelling by car?

GetArrivalTime

Ask about your estimated arrival time to a specific location by providing your departure time. You can optionally indicate the location you are leaving from and/or a travel mode

Get the arrival time to the given location with the given departure time

Hey Snips, ETA to New York departure time being 5 pm?

Get the arrival time to location B when leaving location A at the given departure time

Hey Snips, what time will I arrive to Manhattan if I leave the Empire State Building at 9 pm?

Get the arrival time to location B when leaving location A at the given departure time, indicating a travel mode

Hey Snips, when will I reach the airport if I take the subway from 124 Main Street by noon?

Debug

In the src/index.ts file:

// Uncomment this line to print everything
// debug.enable(name + ':*')

Test & Lint

Requires mosquitto to be installed.

npm start

In test mode, i18n output and http calls are mocked.

  • http: mocks are written in tests/httpMocks/index.ts
  • i18n: mocked by snips-toolkit, see the documentation.

Contributing

Please see the Contribution Guidelines.

Copyright

This library is provided by Snips as Open Source software. See LICENSE for more information.

snips-action-directions's People

Contributors

thomas-bouvier avatar elbywan avatar mariaisabeldiazsaezsonos avatar

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.