order_by(PlayerGameStat.rank).\
order_by(PlayerGameStat.score).all()
- return {'games':games,
+ return {'games':games,
'pgstats':pgstats}
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:
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']
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'}]
mainindex_data['recent_games'].append(('-', '-', '-', '-'))
return mainindex_data
+
+
+def main_index_json(request):
+ """
+ JSON output of the main page information.
+ """
+ return [{'status':'not implemented'}]
def map_index(request):
"""
- Provides a list of all the current maps.
+ Provides a list of all the current maps.
"""
return _map_index_data(request)
"""
Provides a JSON-serialized list of all the current maps.
"""
- view_data = _map_index_data(request)
+ view_data = _map_index_data(request)
maps = [m.to_dict() for m in view_data['maps']]
mapinfo_data['top_servers'].append(('-', '-', '-'))
return mapinfo_data
+
+
+def map_info_json(request):
+ """
+ List the information stored about a given map. JSON.
+ """
+ return [{'status':'not implemented'}]
return _player_index_data(request)
+def player_index_json(request):
+ """
+ Provides a list of all the current players. JSON.
+ """
+ return [{'status':'not implemented'}]
+
+
def _get_games_played(player_id):
"""
Provides a breakdown by gametype of the games played by player_id.
return _player_info_data(request)
+def player_info_json(request):
+ """
+ Provides detailed information on a specific player. JSON.
+ """
+ return [{'status':'not implemented'}]
+
+
def _player_game_index_data(request):
player_id = request.matchdict['player_id']
return _player_game_index_data(request)
+def player_game_index_json(request):
+ """
+ Provides an index of the games in which a particular
+ player was involved. This is ordered by game_id, with
+ the most recent game_ids first. Paginated. JSON.
+ """
+ return [{'status':'not implemented'}]
+
+
def _player_accuracy_data(request):
player_id = request.matchdict['id']
allowed_weapons = ['nex', 'rifle', 'shotgun', 'uzi', 'minstanex']
}
+def player_accuracy(request):
+ """
+ Provides the accuracy for the given weapon. (JSON only)
+ """
+ return _player_accuracy_data(request)
+
+
def player_accuracy_json(request):
"""
Provides a JSON response representing the accuracy for the given weapon.
def search(request):
return _search_data(request)
+
+
+def search_json(request):
+ return [{'status':'not implemented'}]
return _server_index_data(request)
+def server_index_json(request):
+ """
+ Provides a list of all the current servers. JSON.
+ """
+ return [{'status':'not implemented'}]
+
+
def _server_info_data(request):
server_id = request.matchdict['id']
return serverinfo_data
+def server_info_json(request):
+ """
+ List the stored information about a given server. JSON.
+ """
+ return [{'status':'not implemented'}]
+
+
def _server_game_index_data(request):
server_id = request.matchdict['server_id']
current_page = request.matchdict['page']
List the games played on a given server. Paginated.
"""
return _server_game_index_data(request)
+
+
+def server_game_index_json(request):
+ """
+ List the games played on a given server. Paginated. JSON.
+ """
+ return [{'status':'not implemented'}]