private decimal GetOpponentsBattingAverage(string pitcherSlug) { var result = PlayerStatsRequest.Submit( queryDate: GameDate.AddDays(-1), playerSlug: pitcherSlug); return(result.OpponentsBattingAverage); }
public DateTime DefaultDate = Convert.ToDateTime("1/1/2000"); // kdtodo move to constants // Constructor public LoadBoxScores(string LeagueName, string strLoadDateTime, DateTime StartGameDate) { new LeagueInfoDO(LeagueName, _oLeagueDTO, _ConnectionString); // Init _oLeagueDTO _strLoadDateTime = strLoadDateTime; DateTime GameDate = BoxScoreDO.GetMaxBoxScoresGameDate(_ConnectionString, LeagueName, DefaultDate); if (GameDate == DefaultDate) { GameDate = StartGameDate; } else { GameDate = GameDate.AddDays(1); } _oSeasonInfo = new SeasonInfoDO(GameDate, _oLeagueDTO.LeagueName); if (_oSeasonInfo.oSeasonInfoDTO.Bypass) { _oSeasonInfo.GetNextGameDate(); } // RotationDO.DeleteRestOfRotation(GameDate, LeagueName); }