diff --git a/ohmysportsfeedspy/v2_1.py b/ohmysportsfeedspy/v2_1.py index 2ff2f18..e236ac6 100644 --- a/ohmysportsfeedspy/v2_1.py +++ b/ohmysportsfeedspy/v2_1.py @@ -48,6 +48,7 @@ def __init__(self, verbose, store_type=None, store_location=None): 'seasonal_standings', 'seasonal_game_lines', 'daily_game_lines', + 'weekly_game_lines', 'daily_futures' ] @@ -240,6 +241,16 @@ def determine_url(self, league, season, feed, output_format, params): return "{base_url}/{league}/{season}/date/{date}/odds_gamelines.{output}".format(base_url=self.base_url, league=league, season=season, date=params["date"], output=output_format) + elif feed == "weekly_game_lines": + if season == "": + raise AssertionError("You must specify a season for this request") + if not "week" in params: + raise AssertionError("You must specify a 'week' param for this request.") + if league != "nfl": + raise AssertionError("weekly_game_lines feed type only avaiable for the NFL") + week = params['week'] + return f"{self.base_url}/{league}/{season}/week/{week}/odds_gamelines.{output_format}" + elif feed == "daily_futures": if season == "": raise AssertionError("You must specify a season for this request.")