Snips action code for the Places app
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 Places API key.
An assistant containing the intents listed below must be installed on your system. Deploy it following these instructions.
- 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
This app only supports french ๐ซ๐ท and english ๐ฌ๐ง.
Get details about places in the surroundings
Hey Snips, is there any top rated sushi place in this area? Hey Snips, is there a gas station that is open nearby?
Get the phone number of a given place
Hey Snips, can you tell me the phone number for the most popular spanish restaurant in Beaver Street?
Get the address of a given place
Hey Snips, what's the address of the closest Domino's Pizza?
Get the distance to the given place
Hey Snips, how far away is the best rated park?
Get the opening hours of the given place
Hey Snips, is the pharmacy below open this weekend?
In the src/index.ts
file:
// Uncomment this line to print everything
// debug.enable(name + ':*')
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.
Please see the Contribution Guidelines.
This library is provided by Snips as Open Source software. See LICENSE for more information.