summaryrefslogtreecommitdiffstats
path: root/web/api.py
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-22 19:29:47 -0700
committerraylu <raylu@gridium.com>2013-10-22 19:30:38 -0700
commit0dea8f430e4905da98d7009bdf111e0965fedd22 (patch)
treebc15ef1accedd36af12db9023becb8eb55cd3229 /web/api.py
parent1b81975f1fb3d1341cad30061dc195581e2264b6 (diff)
downloadykill-0dea8f430e4905da98d7009bdf111e0965fedd22.tar.xz
alliance and character pages
Diffstat (limited to 'web/api.py')
-rw-r--r--web/api.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/api.py b/web/api.py
index 523880b..5f21441 100644
--- a/web/api.py
+++ b/web/api.py
@@ -29,9 +29,9 @@ class SearchHandler(APIHandler):
data = db.queries.search(q)
self.respond_json(data)
-class CorporationHandler(APIHandler):
- def get(self, corp_id):
- kills = db.queries.corporation(int(corp_id))
+class KillListHandler(APIHandler):
+ def get(self, entity_type, entity_id):
+ kills = db.queries.kill_list(entity_type, int(entity_id))
self.respond_json(kills)
class KillHandler(APIHandler):
@@ -43,7 +43,7 @@ def start():
tornado.web.Application(
handlers=[
(r'/search', SearchHandler),
- (r'/corporation/(.+)', CorporationHandler),
+ (r'/(alliance|corporation|character)/(.+)', KillListHandler),
(r'/kill/(.+)', KillHandler),
],
debug=config.debug,