and this
This commit is contained in:
parent
97e7741434
commit
4236b7bc29
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,8 @@ from util import hook, http, web
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
## CONSTANTS
|
||||||
|
|
||||||
base_url = "http://api.bukget.org/3/"
|
base_url = "http://api.bukget.org/3/"
|
||||||
|
|
||||||
search_url = base_url + "search/plugin_name/like/{}"
|
search_url = base_url + "search/plugin_name/like/{}"
|
||||||
|
@ -23,7 +25,7 @@ class BukgetError(Exception):
|
||||||
return self.text
|
return self.text
|
||||||
|
|
||||||
|
|
||||||
## API FUNCTIONS
|
## DATA FUNCTIONS
|
||||||
|
|
||||||
def plugin_search(term):
|
def plugin_search(term):
|
||||||
""" searches for a plugin with the bukget API and returns the slug """
|
""" searches for a plugin with the bukget API and returns the slug """
|
||||||
|
@ -102,6 +104,8 @@ def format_output(data):
|
||||||
return line_a, line_b
|
return line_a, line_b
|
||||||
|
|
||||||
|
|
||||||
|
## HOOK FUNCTIONS
|
||||||
|
|
||||||
@hook.command('plugin')
|
@hook.command('plugin')
|
||||||
@hook.command
|
@hook.command
|
||||||
def bukkitplugin(inp, reply=None, message=None):
|
def bukkitplugin(inp, reply=None, message=None):
|
||||||
|
|
Reference in a new issue