Class: Sportradar::Nfl::PlaySummary

Inherits:
PlayByPlay show all
Defined in:
lib/sportradar/nfl/play_summary.rb

Instance Method Summary collapse

Methods inherited from GameRequest

#game_path

Methods inherited from WeeklySchedule

#week_path

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, away_team_abbreviation:, home_team_abbreviation:, play_id:) ⇒ PlaySummary



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

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

Instance Method Details

#pathObject



18
19
20
# File 'lib/sportradar/nfl/play_summary.rb', line 18

def path
  "#{game_path}/plays/#{play_id}.json"
end