def game_details(game_number, eaid): """last results for last games for team""" url = get_api_url(eaid, 'matches') json = get_content(url) index = game_number - 1 games = parse_results_data(json, eaid) if index < len(games): return games[index] return None
def get_results_url(eaid): return get_api_url(eaid, 'matches')
def get_players(eaid, ids): postfix = 'members/' + ','.join(map(str, ids)) + '/stats' url = get_api_url(eaid, postfix) url = url.replace('clubs/' + eaid, '') players_json = get_content(url) return parse_player_data(players_json)
def get_ids(eaid): url = get_api_url(eaid, 'members') team_members_json = get_content(url) return get_player_ids(team_members_json)