From 91c827a03b1dc503f5c0fadb1a354d71d04c4a64 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Sun, 1 Dec 2013 22:53:40 +1300 Subject: [PATCH] unfinished --- plugins/minecraft_bukkit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/minecraft_bukkit.py b/plugins/minecraft_bukkit.py index 0ecc057..0c3313e 100644 --- a/plugins/minecraft_bukkit.py +++ b/plugins/minecraft_bukkit.py @@ -6,6 +6,9 @@ base_url = "http://api.bukget.org/3/" search_url = base_url + "search/plugin_name/like/{}" details_url = base_url + "plugins/bukkit/{}" +categories = http.get_json("http://api.bukget.org/3/categories") +total_plugins = sum([cat["count"] for cat in categories]) + class BukgetError(Exception): def __init__(self, code, text): @@ -54,6 +57,7 @@ def plugin_details(slug): def bukkitplugin(inp, reply=None, message=None): """plugin - Look up a plugin on dev.bukkit.org""" # get the plugin slug using search + print total_plugins try: slug = plugin_search(inp) except BukgetError as e: @@ -65,6 +69,7 @@ def bukkitplugin(inp, reply=None, message=None): except BukgetError as e: return e + name = data["plugin_name"] description = data['description'] url = data['website']