config.add_route("player_captimes_json", "/player/{id:\d+}/captimes.json")
config.add_view(player_captimes_json, route_name="player_captimes_json", renderer="jsonp")
- config.add_route("nvd3_damage", "/player/{id:\d+}/damage")
- config.add_view(player_nvd3_damage, route_name="nvd3_damage", renderer="nvd3_damage.mako")
-
config.add_route("player_weaponstats_data_json", "/player/{id:\d+}/weaponstats.json")
config.add_view(player_weaponstats_data_json, route_name="player_weaponstats_data_json", renderer="jsonp")
from xonstat.views.player import player_elo_info_text, player_elo_info_json
from xonstat.views.player import player_hashkey_info_text, player_hashkey_info_json
from xonstat.views.player import player_captimes, player_captimes_json
-from xonstat.views.player import player_nvd3_damage, player_weaponstats_data_json
+from xonstat.views.player import player_weaponstats_data_json
from xonstat.views.game import game_info, rank_index
from xonstat.views.game import game_info_json, rank_index_json
'player':player,
}
+
def player_captimes(request):
return player_captimes_data(request)
+
def player_captimes_json(request):
return player_captimes_data(request)
-def player_nvd3_damage(request):
- player_id = int(request.matchdict['id'])
- if player_id <= 2:
- player_id = -1;
-
- game_type_cd = request.params.get("game_type", None)
- if game_type_cd == "overall":
- game_type_cd = None
-
- limit = 20
- if request.params.has_key("limit"):
- limit = int(request.params["limit"])
-
- if limit < 0:
- limit = 20
- if limit > 50:
- limit = 50
-
- return { "player_id": player_id,
- "game_type_cd": game_type_cd,
- "limit": limit,
- }
-
def player_weaponstats_data_json(request):
player_id = request.matchdict["id"]
if player_id <= 2: