Skip to content

Instantly share code, notes, and snippets.

@chids
Created February 21, 2014 15:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chids/9136319 to your computer and use it in GitHub Desktop.
Save chids/9136319 to your computer and use it in GitHub Desktop.
# CATS
http = require 'http'
module.exports = (robot) ->
robot.hear /(\W|^)cat[sz]*(\W|$)/i, (msg) ->
options =
host: 'thecatapi.com',
port: 80,
path: '/api/images/get?format=src&type=gif'
http.get options, (res) ->
msg.send res.headers.location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment