/nfl_scores

A simple node module for getting live nfl scores data

Primary LanguageHTMLMIT LicenseMIT

NFL Scores

NFL Scores exposes a clean API for getting live data about the day's nfl scores. It queries nfl.com json endpoints.

Installation

npm install nfl_scores

Getting started

1. require it
var nflScores = requre("nfl_scores");
2. use it
// Acquire the most up to date scores, and inspect them.
nflScores.refresh(function(err, scores) {
  console.log(scores);
});

// Inspect the last set of refreshed scores
// without sending any network traffic.
console.log(nflScores.scores);

Example dashboard

To view the live scores in an example app, go to the examples/dashboard directory, and run node app.js. Point your browser to localhost:3000, and you should see something like this:

Example Dashboard

Example Table

Tests

NFL Scores uses the mocha framework for unit tests.

In the root dir, run npm test or make test to run all tests. Run make coverage to run the coverage tests. or just open coverage.html from the git repo in your browser to see the results of the latest coverage test.

NFL Scores is written by Zack Reneau-Wedeen