Slack bot returning the occupation status.
Based on ChuckNorris tutorial https://scotch.io/tutorials/building-a-slack-bot-with-node-js-and-chuck-norris-super-powers
- Install node.js
- install npm
- clone repository
- run npm install
- get the slack API token, as described here
- export acquired token as environment variable BOT_API_KEY
- run the application
node bin\wcbot.js
- the application expects rest endpoint, configured via config\default.json, which returns JSON array in following format:
[
{
"id":1,
"name":"name 1",
"occupied":false,
"lastUpdateDate":"2016-12-18T11:43:57"
},
{
"id":2,
"name":"name 2",
"occupied":true,
"lastUpdateDate":"2016-12-18T14:43:57"
}
]