Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
def get_results_url(eaid):
    return get_api_url(eaid, 'matches')
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
def get_ids(eaid):
    url = get_api_url(eaid, 'members')
    team_members_json = get_content(url)
    return get_player_ids(team_members_json)