config.add_route("player_info", "/player/{id:\d+}")
config.add_view(player_info, route_name="player_info", renderer="player_info.mako")
+ config.add_route("player_hashkey_info_json", "/player/{hashkey:.{44}}.json")
+ config.add_view(player_hashkey_info_json, route_name="player_hashkey_info_json", renderer="jsonp")
+
#config.add_route("player_hashkey_info_text", "/player/me")
config.add_route("player_hashkey_info_text", "/player/{hashkey}")
config.add_view(player_hashkey_info_text, route_name="player_hashkey_info_text", renderer="player_hashkey_info_text.mako")
for gt,mapinfo in player_info['fav_maps'].items():
fav_maps[gt] = to_json(mapinfo)
+ most_recent_game = to_json(player_info['most_recent_game'])
+
return [{
'version': 1,
'player': player,
'fav_maps': fav_maps,
'elos': elos,
'ranks': ranks,
+ 'most_recent_game': most_recent_game,
}]