basketball-reference-js

0.2.6 • Public • Published

basketball-reference-js

Build Status Coverage Status

A lib to receive data from the Basketball Reference site by json.

Installation

npm install basketball-reference-js

How to use?

const Nba = require('basketball-reference-js');
 
const games = await Nba.games.get(new Date(2019, 2, 15));
 
[ { game: 'LA Lakers vs Detroit',
    score: [ 97, 111 ],
    statistics:
     { boxScores: '/boxscores/201903150DET.html',
       playByPlay: '/boxscores/pbp/201903150DET.html',
       shotChart: '/boxscores/shot-chart/201903150DET.html' } },
  { game: 'Phoenix vs Houston',
    score: [ 102, 108 ],
    statistics:
     { boxScores: '/boxscores/201903150HOU.html',
       playByPlay: '/boxscores/pbp/201903150HOU.html',
       shotChart: '/boxscores/shot-chart/201903150HOU.html' } },
  { game: 'Chicago vs LA Clippers',
    score: [ 121, 128 ],
    statistics:
     { boxScores: '/boxscores/201903150LAC.html',
       playByPlay: '/boxscores/pbp/201903150LAC.html',
       shotChart: '/boxscores/shot-chart/201903150LAC.html' } },
       ....

Future implementations

  • Add more features to the game object
  • Create a team object for interaction with the times
  • Improve test coverage

Package Sidebar

Install

npm i basketball-reference-js

Weekly Downloads

0

Version

0.2.6

License

ISC

Unpacked Size

25.1 kB

Total Files

15

Last publish

Collaborators

  • samucars