kud / ed-209

I'm an IRC bot!
8 stars 4 forks source link

listeners: add imgur listener #58

Closed Bigorneau closed 9 years ago

Bigorneau commented 9 years ago

Add a Imgur listener to catch imgur URL and display if the image is tagged as NSFW.

Imgur require an authentication through https using a client id to access read only informations.

I added the key I got on the config sample. The listener parse (again) the config to get the key (while the giphy listener use a hardcoded key).

So far it only handle URL with a format http://www.imgur.com/gallery/ID but I'm looking to extend it to i.imgur.com and the other variants of imgur URL.

Example:

http://imgur.com/gallery/N9TNuy6 ↳ null (NSFW)

Imgur API: https://api.imgur.com/