Returns a Roster object representing the opening day roster for this team
 for the specified year.
325385
def opening_day_roster(year)
      game = get_opening_day_game(year)
      rosters = game.get_rosters
      rosters[0].team_name == city + ' ' + name ? rosters[0] : rosters[1]
    end
670290
def broadcast_info(team_id, date=datetime.now()):
    """"""
    data = mlbgame.info.broadcast_info(team_id, date)
    return [mlbgame.info.BroadcastInfo(x) for x in data]
122493
def get_pitchers(home_or_away)
      if self.gid
        bs = get_boxscore
        if home_or_away == 'away'
          bs.pitchers[0]
        else
          bs.pitchers[1]
        end
      else
        puts "No data for input specified"
      end
    end
1335817
def from_year(cls, year):
        

        first_day = date(year, 1, 1)
        return cls.from_date(first_day, period="year")
1353994
def team_media(self, team, year=None, tag=None):
        
        return [Media(raw) for raw in self._get('team/%s/media%s%s' % (self.team_key(team), ('/tag/%s' % tag) if tag else '', ('/%s' % year) if year else ''))]
27303
def lineup_user(self,userid):
        ''''''
        headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain",'Referer': 'http://'+self.domain+'/standings.phtml',"User-Agent": user_agent}
        req = self.session.get('http://'+self.domain+'/playerInfo.phtml?pid='+userid,headers=headers).content
        soup = BeautifulSoup(req)
        info = []
        for i in soup.find_all('td',{'class':'name_cont'}):
            info.append(i.text.strip())
        return info
911417
def init_pitcher_from_scoreboard(element)
      @first = element.attributes['first']
      @last = element.attributes['last']
      @wins = element.attributes['wins']
      @losses = element.attributes['losses']
      @era = element.attributes['era']
    end
534443
def get_leadoff_hitters_by_year(year)
      results = []
      games = all_games(year)
      games.each do |game|
        boxscore = game.get_boxscore
        leadoffs = boxscore.get_leadoff_hitters
        if game.home_team_abbrev == @abrev
          results << leadoffs[1]
        else
          results << leadoffs[0]
        end
      end
      results
    end
1184759
def team_players(self, team):
        """"""
        players = sorted(team, key=lambda d: d['shirtNumber'])
        click.secho("%-4s %-25s    %-20s    %-20s    %-15s" %
                    ("N.",  "NAME", "POSITION", "NATIONALITY", "BIRTHDAY"),
                    bold=True,
                    fg=self.colors.MISC)
        fmt = (u"{shirtNumber:<4} {name:<28} {position:<23} {nationality:<23}"
               u" {dateOfBirth:<18}")
        for player in players:
            click.secho(fmt.format(**player), bold=True)
1220704
def day(year, month, day, home=None, away=None):
    
    # get the days per month
    daysinmonth = calendar.monthrange(year, month)[1]
    # do not even try to get data if day is too high
    if daysinmonth < day:
        return []
    # get data
    data = mlbgame.game.scoreboard(year, month, day, home=home, away=away)
    return [mlbgame.game.GameScoreboard(data[x]) for x in data]
1233210
public function GetTeamInfoByTeamIDV1($start_at_team_id = null, $teams_requested = null)
    {
        return $this->_call(__METHOD__, 'GET', array('start_at_team_id' => $start_at_team_id, 'teams_requested' => $teams_requested));
    }
54608
def common_team_years(
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::CommonTeamYears.new(
          get(COMMON_TEAM_YEARS_PATH, {
              :LeagueID => league_id
          })
      )
    end
650026
def _get_pitcher(self, pitcher):
        
        values = OrderedDict()
        player = self.players.rosters.get(pitcher.get('id'))
        values['pos'] = pitcher.get('pos', MlbamConst.UNKNOWN_SHORT)
        values['id'] = pitcher.get('id', MlbamConst.UNKNOWN_SHORT)
        values['first'] = player.first
        values['last'] = player.last
        values['box_name'] = player.box_name
        values['rl'] = player.rl
        values['bats'] = player.bats
        values['out'] = pitcher.get('out', MlbamConst.UNKNOWN_SHORT)
        values['bf'] = pitcher.get('bf', MlbamConst.UNKNOWN_SHORT)
        return values
891910
public Future<List<LeagueItem>> getLeagueEntries(String teamId) {
        return new ApiFuture<>(() -> handler.getLeagueEntries(teamId));
    }
486632
@Override
    public Page<Team> getTeamByCollectorWithFilter(ObjectId collectorId, String teamName, Pageable pageable) {
        Page<Team> teams = teamRepository.findAllByCollectorIdAndNameContainingIgnoreCase(collectorId,teamName,pageable);
        return teams;
    }
1359632
def get_players(self, team):
        
        team_id = self.__get_team_id(team)
        self.logger.debug(f'Getting players of team {team_id}.')
        return self._request('teams', team_id, 'players')
783570
def __get_league_object():
    """"""
    # get data
    data = mlbgame.data.get_properties()
    # return league object
    return etree.parse(data).getroot().find('leagues').find('league')