X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=blobdiff_plain;f=xonstat%2Fviews%2Fplayer.py;h=d2112515ed82ff1cc911a2b993667d9976fbef69;hp=fe322a78f8767c220009370d5be14a7f4834c5d7;hb=ac531417765e217e7633f4e2ba00583305f6fec7;hpb=ab01b511f02a52d5386be63f228f9237b0e4586f diff --git a/xonstat/views/player.py b/xonstat/views/player.py index fe322a7..d211251 100644 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -45,6 +45,13 @@ def player_index(request): 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. @@ -266,6 +273,13 @@ def player_info(request): 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'] @@ -309,6 +323,15 @@ def player_game_index(request): 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'] @@ -346,6 +369,13 @@ def _player_accuracy_data(request): } +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. @@ -362,7 +392,7 @@ def _player_damage_data(request): player_id = request.matchdict['id'] allowed_weapons = ['grenadelauncher', 'electro', 'crylink', 'hagar', 'rocketlauncher', 'laser'] - weapon_cd = 'laser' + weapon_cd = 'rocketlauncher' games = 20 if request.params.has_key('weapon'):