Metadata-Version: 2.1
Name: statsapiclient
Version: 0.1.2
Summary: A wrapper around the NHL’s JSON API.
Home-page: https://github.com/bplabombarda/statsapiclient
License: MPL-2.0
Keywords: nhl,hockey
Author: Brett LaBombarda
Author-email: bplabombarda@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Environment :: Console
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: jupyter (>=1.0,<2.0)
Requires-Dist: requests (>=2.21,<3.0)
Project-URL: Documentation, https://github.com/bplabombarda/statsapiclient#README.rst
Project-URL: Repository, https://github.com/bplabombarda/statsapiclient
Description-Content-Type: text/markdown

# statsapiclient: A client for the NHL stats API

[![CircleCI](https://circleci.com/gh/bplabombarda/statsapiclient.svg?style=svg)](https://circleci.com/gh/bplabombarda/statsapiclient)

## Purpose

To provide a Python client to access the NHL's JSON API including game, play, and player data.


## Installation

    pip install -i https://test.pypi.org/simple/ statsapiclient


## Modules

### Schedule

`get_games`

Returns a list of games contained within the instantiated date or date range.


### Games

#### game

`get_box_score`

`get_line_score`

`get_play_by_play`


### Teams

`get_active`

Returns a list of all active teams.

`get_active_by_conference`

Returns a list of all active teams in a given conference.

`get_active_by_division`

Returns a list of all active teams in a given division.


### Examples

Games from date:
      
    from statsapiclient.schedule import Schedule


    s = Schedule('2019-01-01')
    games = s.get_games()

    print(games[0]['gamePk'])    # 2018020612

Game data:

    from statsapiclient.games.game import Game

    g = Game('2018020612')

    box_score = g.get_box_score()
    line_score = g.get_line_score()
    play_by_play = g.get_play_by_play()

For more: [Jupyter notebook](https://github.com/bplabombarda/statsapiclient/blob/development/examples/examples.ipynb)

