Skip to content

Instantly share code, notes, and snippets.

@toshinarin
Created August 22, 2014 07:31
Show Gist options
  • Save toshinarin/2f743223bd3a73d779f0 to your computer and use it in GitHub Desktop.
Save toshinarin/2f743223bd3a73d779f0 to your computer and use it in GitHub Desktop.
hubot-script
# Description:
# Spice LGTM up with some images.
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# LGTM - Receive a LGTM image
module.exports = (robot) ->
robot.hear /LGTM/, (msg) ->
msg.http("http://www.lgtm.in/g")
.header('Accept', 'application/json')
.get() (err, res, body) ->
msg.send JSON.parse(body).actualImageUrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment