unfinished
This commit is contained in:
parent
fb84e17e34
commit
91c827a03b
1 changed files with 5 additions and 0 deletions
|
@ -6,6 +6,9 @@ base_url = "http://api.bukget.org/3/"
|
||||||
search_url = base_url + "search/plugin_name/like/{}"
|
search_url = base_url + "search/plugin_name/like/{}"
|
||||||
details_url = base_url + "plugins/bukkit/{}"
|
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):
|
class BukgetError(Exception):
|
||||||
def __init__(self, code, text):
|
def __init__(self, code, text):
|
||||||
|
@ -54,6 +57,7 @@ def plugin_details(slug):
|
||||||
def bukkitplugin(inp, reply=None, message=None):
|
def bukkitplugin(inp, reply=None, message=None):
|
||||||
"""plugin <slug/name> - Look up a plugin on dev.bukkit.org"""
|
"""plugin <slug/name> - Look up a plugin on dev.bukkit.org"""
|
||||||
# get the plugin slug using search
|
# get the plugin slug using search
|
||||||
|
print total_plugins
|
||||||
try:
|
try:
|
||||||
slug = plugin_search(inp)
|
slug = plugin_search(inp)
|
||||||
except BukgetError as e:
|
except BukgetError as e:
|
||||||
|
@ -65,6 +69,7 @@ def bukkitplugin(inp, reply=None, message=None):
|
||||||
except BukgetError as e:
|
except BukgetError as e:
|
||||||
return e
|
return e
|
||||||
|
|
||||||
|
|
||||||
name = data["plugin_name"]
|
name = data["plugin_name"]
|
||||||
description = data['description']
|
description = data['description']
|
||||||
url = data['website']
|
url = data['website']
|
||||||
|
|
Reference in a new issue