Narcissistic Preening Monarch
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    nfl_scorespublic

    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

    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

    install

    npm i nfl_scores

    Downloadslast 7 days

    20

    version

    0.1.0

    license

    MIT

    repository

    www.github.com

    last publish

    collaborators

    • avatar