summaryrefslogtreecommitdiffstats
path: root/web/api.py
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-22 22:22:26 -0700
committerraylu <raylu@gridium.com>2013-10-22 22:22:26 -0700
commit29d0528ec6ff9cf61af3bab2feb71dcb3625240a (patch)
tree74e0b143e576fee14a217f74e8cf414b70e75c40 /web/api.py
parent0dea8f430e4905da98d7009bdf111e0965fedd22 (diff)
downloadykill-29d0528ec6ff9cf61af3bab2feb71dcb3625240a.tar.xz
most expensive kills on homepage
Diffstat (limited to 'web/api.py')
-rw-r--r--web/api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/api.py b/web/api.py
index 5f21441..70c0aff 100644
--- a/web/api.py
+++ b/web/api.py
@@ -39,12 +39,18 @@ class KillHandler(APIHandler):
kill = db.queries.kill(kill_id)
self.respond_json(kill)
+class TopCostHandler(APIHandler):
+ def get(self):
+ kills = db.queries.top_cost()
+ self.respond_json(kills)
+
def start():
tornado.web.Application(
handlers=[
(r'/search', SearchHandler),
(r'/(alliance|corporation|character)/(.+)', KillListHandler),
(r'/kill/(.+)', KillHandler),
+ (r'/top/cost', TopCostHandler),
],
debug=config.debug,
).listen(config.api_port)