Class: Sportradar::Nfl::GameRequest

Inherits:
WeeklySchedule show all
Defined in:
lib/sportradar/nfl/game_request.rb

Instance Method Summary collapse

Methods inherited from WeeklySchedule

#path, #week_path

Methods inherited from LeagueSchedule

#fetch, games, #path

Methods inherited from Feeds::LeagueSchedule

#path

Methods inherited from ApiRequest

#client, #endpoint, fetch, #fetch, #league, #path, save, #save

Constructor Details

#initialize(year: nil, interval_type: nil, week: 1, away_team_abbreviation:, home_team_abbreviation:) ⇒ GameRequest

Returns a new instance of GameRequest.



4
5
6
7
8
9
10
11
12
13
# File 'lib/sportradar/nfl/game_request.rb', line 4

def initialize(year: nil,
               interval_type: nil,
               week: 1,
               away_team_abbreviation:,
               home_team_abbreviation:)
  super(year: year, interval_type: interval_type, week: week)

  @away_team_abbreviation = away_team_abbreviation
  @home_team_abbreviation = home_team_abbreviation
end

Instance Method Details

#game_pathObject



15
16
17
# File 'lib/sportradar/nfl/game_request.rb', line 15

def game_path
  "#{year}/#{interval_type}/#{week}/#{away_team_abbreviation}/#{home_team_abbreviation}"
end