]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/views/game.py
Dummy json views
[xonotic/xonstat.git] / xonstat / views / game.py
index 70bbd58c862325959f10761ac359fea1a76e95f2..6147c5fed1d44d9b4bac3b16c4e9124e1503dbcb 100644 (file)
@@ -31,7 +31,7 @@ def _game_index_data(request):
                 order_by(PlayerGameStat.rank).\
                 order_by(PlayerGameStat.score).all()
 
-    return {'games':games, 
+    return {'games':games,
             'pgstats':pgstats}
 
 
@@ -44,6 +44,15 @@ def game_index(request):
     return _game_index_data(request)
 
 
+def game_index_json(request):
+    """
+    Provides a list of current games, with the associated game stats.
+    These games are ordered by game_id, with the most current ones first.
+    Paginated. JSON.
+    """
+    return [{'status':'not implemented'}]
+
+
 def _game_info_data(request):
     game_id = request.matchdict['id']
     try:
@@ -103,6 +112,13 @@ def game_info(request):
     return _game_info_data(request)
 
 
+def game_info_json(request):
+    """
+    List the game stats (scoreboard) for a particular game. Paginated. JSON.
+    """
+    return [{'status':'not implemented'}]
+
+
 def _rank_index_data(request):
     if request.params.has_key('page'):
         current_page = request.params['page']
@@ -131,3 +147,10 @@ def rank_index(request):
     Provide a list of gametype ranks, paginated.
     """
     return _rank_index_data(request)
+
+
+def rank_index_json(request):
+    """
+    Provide a list of gametype ranks, paginated. JSON.
+    """
+    return [{'status':'not implemented'}]