Skip to content

Get NFL schedules and live scores through official feeds.

License

Notifications You must be signed in to change notification settings

davenguyen/live_update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFL Live Update

Get NFL schedules and live scores through official feeds.

Installation

Add this line to your application's Gemfile:

gem 'live_update'

And then execute:

$ bundle

Or install it yourself as:

$ gem install live_update

Usage

# Pull the latest schedule
schedule = LiveUpdate::Schedule.new

# Grab some stats about the schedule
schedule.week      #=> 14
schedule.year      #=> 2016
schedule.games     #=> [#<LiveUpdate::Game>, ...]

# Get the raw data:
schedule._data     #=> {:ss=>{:gms=>{:w=>"13", :y=>"2016", ...}}}
schedule._xml      #=> "<?xml version=\"1.0\" ..."

# Find game by ID and grab its stats
game = schedule.game(id)
game.started?      #=> true
game.final?        #=> false
game.home          #=> PHI
game.possession    #=> PHI
game.quarter       #=> 4
game.clock         #=> 02:13
game.home_score    #=> 24
game._data         #=> {:eid=>"2016120100", :gsis=>"57078", ...}

License

The gem is available as open source under the terms of the MIT License.

About

Get NFL schedules and live scores through official feeds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published