Skip to content

Instantly share code, notes, and snippets.

@tzangms
Created February 4, 2014 01:45
Show Gist options
  • Select an option

  • Save tzangms/8796042 to your computer and use it in GitHub Desktop.

Select an option

Save tzangms/8796042 to your computer and use it in GitHub Desktop.
# Description:
# Messing around with the curator.im API.
#
# Commands:
# hubot curator - give you random girl photo from curator.im
module.exports = (robot) ->
robot.respond /(curator|girl)/i, (msg) ->
msg.http("http://curator.im/api/stream/")
.query({
token: "<your curatorim token here>"
})
.get() (err, res, body) ->
stream = JSON.parse(body)
girls = stream.results
girl = msg.random girls
msg.send girl.image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment