class SportsDataApi::Ncaafb::Game

Attributes

away[R]
away_team[R]
away_team_id[R]
broadcast[R]
clock[R]
home[R]
home_team[R]
home_team_id[R]
id[R]
quarter[R]
scheduled[R]
season[R]
status[R]
venue[R]
weather[R]
week[R]
year[R]

Public Class Methods

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

  @id = game_hash['id']
  @scheduled = Time.parse game_hash['scheduled']
  @home = game_hash['home'] || game_hash['home_team']['id']
  @away = game_hash['away'] || game_hash['away_team']['id']
  @home_team_id = @home
  @away_team_id = @away
  @status = game_hash['status']
  @quarter = game_hash['quarter'].to_i
  @clock = game_hash['clock']

  @home_team = Team.new(game_hash['home_team'])
  @away_team = Team.new(game_hash['away_team'])
  @venue = Venue.new(game_hash['venue'])
  @broadcast = Broadcast.new(game_hash['broadcast'])
  @weather = Weather.new(game_hash['weather'])
end

Public Instance Methods

boxscore() click to toggle source

Wrapper for Ncaafb.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/game.rb, line 54
def boxscore
  Ncaafb.boxscore(year, season, week, home, away)
end
depthchart() click to toggle source

Wrapper for Ncaafb.depthchart TODO

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

Wrapper for Ncaafb.injuries TODO

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

Wrapper for Ncaafb.pbp (Ncaafb.play_by_play) TODO

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

Wrapper for Ncaafb.game_roster TODO

# File lib/sports_data_api/ncaafb/game.rb, line 61
def roster
  Ncaafb.game_roster(year, season, week, home, away)
end
statistics() click to toggle source

Wrapper for Ncaafb.statistics

# File lib/sports_data_api/ncaafb/game.rb, line 32
def statistics
  Ncaafb.game_statistics(year, season, week, home, away)
end
summary() click to toggle source

Wrapper for Ncaafb.summary TODO

# File lib/sports_data_api/ncaafb/game.rb, line 39
def summary
  raise NotImplementedError
end