Skip to content

phwissmann/nhl_openapi_py

Repository files navigation

openapi-client

Documenting the publicly accessible portions of the NHL API.

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openapi_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapi_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.ConferencesApi(openapi_client.ApiClient(configuration))
id = 5 # float | The ID of the conference.

try:
    # Get an NHL conference.
    api_response = api_instance.get_conference(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConferencesApi->get_conference: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://statsapi.web.nhl.com/api/v1

Class Method HTTP request Description
ConferencesApi get_conference GET /conferences/{id} Get an NHL conference.
ConferencesApi get_conferences GET /conferences Get all current NHL conferences.
DivisionsApi get_division GET /divisions/{id} Get an NHL division.
DivisionsApi get_divisions GET /divisions Get all current NHL divisions.
DraftApi get_draft GET /draft Get round-by-round data for current year's NHL Entry Draft.
DraftApi get_draft_by_year GET /draft/{year} Get round-by-round data for a specific year's NHL Entry Draft.
DraftApi get_draft_prospect GET /draft/prospects/{id} Get an NHL Entry Draft prospect.
DraftApi get_draft_prospects GET /draft/prospects Get all NHL Entry Draft prospects.
GamesApi get_game GET /game/{id}/feed/live Get all available data for an NHL game.
GamesApi get_game_boxscore GET /game/{id}/boxscore Get the boxscore for an NHL game.
GamesApi get_game_content GET /game/{id}/content Get editorials, video replays and photo highlights for an NHL game.
GamesApi get_game_diff GET /game/{id}/feed/live/diffPatch Get all available data for an NHL game after a specific time.
PlayersApi get_player GET /people/{id} Get an NHL player.
PlayersApi get_player_stats GET /people/{id}/stats Get specific statistics for an NHL player.
ScheduleApi get_schedule GET /schedule Get the NHL game schedule.
StandingsApi get_standing_types GET /standingsTypes Get all available NHL standing types.
StandingsApi get_standings GET /standings Get NHL division standings.
StandingsApi get_standings_by_type GET /standings/{type} Get NHL standings for a specific standing type.
StatsApi get_stat_types GET /statTypes Get all available NHL statistic types.
TeamsApi get_team GET /teams/{id} Get an NHL team.
TeamsApi get_team_roster GET /teams/{id}/roster Get an NHL team's roster.
TeamsApi get_team_stats GET /teams/{id}/stats Get all statistics for an NHL team.
TeamsApi get_teams GET /teams Get all NHL teams.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published