Created
April 22, 2015 14:07
-
-
Save stenehall/7bbf1bbcf69cbbdd97db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# Web hook for the Stockholm coffee brewer | |
# | |
# Commands | |
# there's no commands. | |
# Author: | |
# Johan Stenehall <johan@narrativeteam.com> (https://github.com/stenehall) | |
# | |
# Contributors: | |
# Joakim Berglund <joakim@getnarrative.com> (https://github.com/Berglund) | |
module.exports = (robot) -> | |
robot.router.get "/brewingcoffee", (req, res) -> | |
user = {} | |
user.room = '31142_stockholm_team@conf.hipchat.com' | |
user.type = 'groupchat' | |
robot.send user, "Started brewing some (coffee), just for you. Ready soon." | |
res.writeHead 200, {'Content-Type': 'text/plain'} | |
res.end 'Over and out' | |
robot.router.get "/donecoffee", (req, res) -> | |
user = {} | |
user.room = '31142_stockholm_team@conf.hipchat.com' | |
user.type = 'groupchat' | |
robot.send user, "Ah, take a break and go get a fresh cup of (coffee)." | |
res.writeHead 200, {'Content-Type': 'text/plain'} | |
res.end 'Over and out' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment