aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'client/gentoostats/search.py')
-rw-r--r--client/gentoostats/search.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/gentoostats/search.py b/client/gentoostats/search.py
index 4bb040b..dfc4b29 100644
--- a/client/gentoostats/search.py
+++ b/client/gentoostats/search.py
@@ -1,13 +1,19 @@
-import utils
+from gentoostats import utils
def pprint(title, object):
+ """
+ Pretty printer for the decoded json data
+ """
# TODO: write a custom pretty printer here
import pprint
print title
pprint.pprint(object)
def add_parser(subparsers):
+ """
+ Setup argparse parsers
+ """
# TODO: add help and descriptions for all opts
search_parser = subparsers.add_parser('search')
search_parser.add_argument('-c', '--category')
@@ -19,6 +25,9 @@ def add_parser(subparsers):
search_parser.set_defaults(func=search)
def search(args):
+ """
+ /search
+ """
url_base = '/search'
url_extra = ''