Class: YahooSports::NHL

Inherits:
Base
  • Object
show all
Defined in:
lib/yahoo_sports/nhl.rb

Class Method Summary collapse

Class Method Details

.get_homepage_games(state = "") ⇒ Array<OpenStruct>

Get the NHL scoreboard games. Includes recently completed, live and upcoming games.

Source: sports.yahoo.com/nhl

Game struct has the following keys:

game.date   # date of game; includes time if preview
game.team1  # visiting team
game.team2  # home team
game.score1 # team1's score, if live or final
game.score2 # team2's score, if live or final
game.state  # live, final or preview
game.tv     # TV station showing the game, if preview and available

23
24
25
# File 'lib/yahoo_sports/nhl.rb', line 23

def self.get_homepage_games(state = "")
    super("nhl", state)
end