class SportsDataApi::Ncaafb::PlayByPlay

Attributes

away[R]
away_team[R]
completed[R]
home[R]
home_team[R]
id[R]
quarters[R]
scheduled[R]
season[R]
status[R]
week[R]
year[R]

Public Class Methods

new(year, season, week, play_by_play_hash) click to toggle source
# File lib/sports_data_api/ncaafb/play_by_play.rb, line 7
def initialize(year, season, week, play_by_play_hash)
  @year = year
  @season = season
  @week = week

  @id = play_by_play_hash['id']
  @scheduled = Time.parse play_by_play_hash['scheduled']
  @completed = play_by_play_hash['completed'] || Time.parse(play_by_play_hash['scheduled'])
  @home = play_by_play_hash['home'] || play_by_play_hash['home_team']['id']
  @away = play_by_play_hash['away'] || play_by_play_hash['away_team']['id']
  @status = play_by_play_hash['status']

  @home_team = Team.new(play_by_play_hash['home_team'])
  @away_team = Team.new(play_by_play_hash['away_team'])

  @away_team = Team.new(play_by_play_hash['away_team'])

  @quarters = Quarters.new(play_by_play_hash["quarters"])
end

Public Instance Methods

boxscore() click to toggle source

Wrapper for Nfl.boxscore these helper methods are used to provide similar functionality as the links attribute found in the weekly schedule example.

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 51
def boxscore
  Nfl.boxscore(year, season, week, home, away, 1)
end
depthchart() click to toggle source

Wrapper for Nfl.depthchart TODO

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 72
def depthchart
  raise NotImplementedError
end
injuries() click to toggle source

Wrapper for Nfl.injuries TODO

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 65
def injuries
  raise NotImplementedError
end
pbp() click to toggle source

Wrapper for Nfl.pbp (Nfl.play_by_play) TODO

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 43
def pbp
  raise NotImplementedError
end
roster() click to toggle source

Wrapper for Nfl.roster TODO

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 58
def roster
  raise NotImplementedError
end
statistics() click to toggle source

Wrapper for Nfl.statistics

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 29
def statistics
  Nfl.game_statistics(year, season, week, home, away, 1)
end
summary() click to toggle source

Wrapper for Nfl.summary TODO

# File lib/sports_data_api/ncaafb/play_by_play.rb, line 36
def summary
  raise NotImplementedError
end