0.0
No commit activity in last 3 years
No release in over 3 years
Get NFL schedules and live scores through official feeds.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 5.0.0.1, ~> 5.0.0
 Project Readme

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.