Created
February 4, 2014 01:45
-
-
Save tzangms/8796042 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: | |
| # 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