Skip to content

Instantly share code, notes, and snippets.

@stenehall
Created April 22, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenehall/7bbf1bbcf69cbbdd97db to your computer and use it in GitHub Desktop.
Save stenehall/7bbf1bbcf69cbbdd97db to your computer and use it in GitHub Desktop.
# 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