Class: Sportradar::Nfl::WeeklySchedule

Inherits:
LeagueSchedule show all
Defined in:
lib/sportradar/nfl/weekly_schedule.rb

Instance Method Summary collapse

Methods inherited from LeagueSchedule

#fetch, games

Methods inherited from ApiRequest

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

Constructor Details

#initialize(year: nil, interval_type: nil, week: 1) ⇒ WeeklySchedule

Returns a new instance of WeeklySchedule.



4
5
6
7
# File 'lib/sportradar/nfl/weekly_schedule.rb', line 4

def initialize(year: nil, interval_type: nil, week: 1)
  super(year: year, interval_type: interval_type)
  @week = week
end

Instance Method Details

#pathObject



13
14
15
# File 'lib/sportradar/nfl/weekly_schedule.rb', line 13

def path
  "#{week_path}/schedule.json"
end

#week_pathObject



9
10
11
# File 'lib/sportradar/nfl/weekly_schedule.rb', line 9

def week_path
  "#{year}/#{interval_type}/#{week}"
end