You can read the story behind this project, if you prefer more narrative form of information :)
- You need to install
node.js
- Clone the repo and
npm install
to get dependencies - Create a
config.json
in your home directory with similar structure of config.dist.json (you can just copy this file to config.json and add your values, i.e.cp config.dist.json ~/config.json
) - Create an app (bot) and take its handle, id, etc. for the config file
- Add the following "Messaging endpoint" in the bot settings page https://dev.botframework.com/bots?id=YOUR_BOT_ID as https://YOUR_PUBLIC_IP_ADDRESS/api/messages
- Check out the "Useful links" section for further details
emotion.js
abstracts service calls to the Emotions API, works with promises
in order to be then()
-able. Example implementation included:
var getEmotion = require('../emotion')
var imageUrl = 'https://pcb-kalinchernev.c9users.io/example.jpg'
var options = {
body: {
url: imageUrl
}
}
// Get a then-able reply from the expert
getEmotion(options).then(data => console.log(data));
runners
directory contains a custom runner with nodemon: faster development
Example usage of the emotion module: (pretty rough implementation)