GithubHelp home page GithubHelp logo

isabella232 / snips-action-nutrition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snipsco/snips-action-nutrition

0.0 0.0 0.0 660 KB

Snips action code for the Nutrition app

License: MIT License

Shell 0.54% JavaScript 0.82% TypeScript 98.64%

snips-action-nutrition's Introduction

snips-action-nutrition

Snips action code for the Nutrition app

Setup

# Install the dependencies, builds the action and creates the config.ini file.
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 FatSecret Platform REST 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 english ๐Ÿ‡ฌ๐Ÿ‡ง. French ๐Ÿ‡ซ๐Ÿ‡ท will probably be supported in the future.

GetNutritionalInfo

Get nutritional info for a given food

Get nutritional information for the given food

Hey Snips, how many calories are in a serving of spaghetti?

Hey Snips, how much vitamin A is in a carrot?

CompareNutritionalInfo

Compare the nutritional info between two given foods

Compare the nutritional info between the two given foods

Hey Snips, how much vitamin C in an orange compared to a lemon?

Debug

In the src/index.ts file:

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

Test

Requires mosquitto to be installed.

npm run test

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

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

snips-action-nutrition's People

Contributors

thomas-bouvier avatar elbywan avatar coorfun 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.