diff --git a/core/config.py b/core/config.py index 0649b50..1b2cacb 100644 --- a/core/config.py +++ b/core/config.py @@ -22,6 +22,7 @@ if not os.path.exists('config'): "disabled_plugins": [], "disabled_commands": [], "acls": {}, + "api_keys": {}, "censored_strings": [ "DCC SEND", diff --git a/plugins/rottentomatoes.py b/plugins/rottentomatoes.py new file mode 100644 index 0000000..5e20c43 --- /dev/null +++ b/plugins/rottentomatoes.py @@ -0,0 +1,36 @@ +from util import http, hook + +api_root = 'http://api.rottentomatoes.com/api/public/v1.0/' +movie_search_url = api_root+'movies.json?q=%s&apikey=%s' +movie_info_url = api_root+'movies/%s.json?apikey=%s' +movie_reviews_url = api_root+'movies/%s/reviews.json?apikey=%s&review_type=all' + +response = u"%s - critics: \x02%d%%\x02 (%d\u2191%d\u2193) audience: \x02%d%%\x02 - %s" + +@hook.command('rt') +def rottentomatoes(inp, bot=None): + '.rt