Initial API function for imgur detail getting [#350]

This commit is contained in:
reality 2013-04-12 23:27:31 +00:00
parent 677a820638
commit 270ae138bf

View File

@ -25,6 +25,17 @@ var imgur = function(dbot) {
this.api.getRandomImage(callback);
}
}.bind(this));
},
'getImageInfo': function(slug, callback) {
request.get({
'url': 'https://api.imgur.com/3/image/' + slug + '.json',
'headers': {
'Authorization': 'Client-ID 86fd3a8da348b65'
}
}, function(err, response, body) {
callback(body);
});
}
};
@ -35,6 +46,9 @@ var imgur = function(dbot) {
});
}
}
this.onLoad = function() {
}.bind(this);
};
exports.fetch = function(dbot) {