def overview(game_id):
    """Gets the overview information for the game with matching id."""
    output = {}
    # get data
    overview = mlbgame.data.get_overview(game_id)
    # parse data
    overview_root = etree.parse(overview).getroot()

    try:
        output = add_raw_box_score_attributes(output, game_id)
    except ValueError:
        pass

    # get overview attributes
    for x in overview_root.attrib:
        output[x] = overview_root.attrib[x]

    # Get probable starter attributes if they exist
    home_pitcher_tree = overview_root.find('home_probable_pitcher')
    if home_pitcher_tree is not None:
        output.update(build_namespaced_attributes(
            'home_probable_pitcher', home_pitcher_tree))
    else:
        output.update(build_probable_starter_defaults('home'))

    away_pitcher_tree = overview_root.find('away_probable_pitcher')
    if away_pitcher_tree is not None:
        output.update(build_namespaced_attributes(
            'away_probable_pitcher', away_pitcher_tree))
    else:
        output.update(build_probable_starter_defaults('away'))

    return output
def overview ( game_id ) : output = { } overview = mlbgame . data . get_overview ( game_id ) overview_root = etree . parse ( overview ) . getroot ( ) try : output = add_raw_box_score_attributes ( output , game_id ) except ValueError : pass for x in overview_root . attrib : output [ x ] = overview_root . attrib [ x ] home_pitcher_tree = overview_root . find ( 'home_probable_pitcher' ) if home_pitcher_tree is not None : output . update ( build_namespaced_attributes ( 'home_probable_pitcher' , home_pitcher_tree ) ) else : output . update ( build_probable_starter_defaults ( 'home' ) ) away_pitcher_tree = overview_root . find ( 'away_probable_pitcher' ) if away_pitcher_tree is not None : output . update ( build_namespaced_attributes ( 'away_probable_pitcher' , away_pitcher_tree ) ) else : output . update ( build_probable_starter_defaults ( 'away' ) ) return output
Gets the overview information for the game with matching id.