{"id":18268432,"url":"https://github.com/coreyjs/nhl-api-py-examples","last_synced_at":"2025-04-09T02:46:58.805Z","repository":{"id":172220949,"uuid":"649003775","full_name":"coreyjs/nhl-api-py-examples","owner":"coreyjs","description":"A collab notebook of the nhl-api-py package.","archived":false,"fork":false,"pushed_at":"2023-06-03T13:55:59.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T21:26:07.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coreyjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-03T13:24:16.000Z","updated_at":"2023-06-03T13:46:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"930c7b7e-0a5d-4d28-bd74-c67051c5a8a0","html_url":"https://github.com/coreyjs/nhl-api-py-examples","commit_stats":null,"previous_names":["coreyjs/nhl-api-py-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreyjs%2Fnhl-api-py-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreyjs%2Fnhl-api-py-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreyjs%2Fnhl-api-py-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreyjs%2Fnhl-api-py-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreyjs","download_url":"https://codeload.github.com/coreyjs/nhl-api-py-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968240,"owners_count":21025797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:31:31.218Z","updated_at":"2025-04-09T02:46:58.789Z","avatar_url":"https://github.com/coreyjs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nhl-api-py-examples\nA collab notebook of the nhl-api-py package.\n\n\n```python\npip install nhl-api-py\n```\n\n    Collecting nhl-api-py\n      Downloading nhl_api_py-0.1.3-py3-none-any.whl (5.4 kB)\n    Collecting httpx\n      Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n         ---------------------------------------- 0.0/75.4 kB ? eta -:--:--\n         ---------------------------------------- 75.4/75.4 kB 4.1 MB/s eta 0:00:00\n    Requirement already satisfied: certifi in c:\\users\\cscha\\anaconda3\\envs\\generic-ml-env\\lib\\site-packages (from httpx-\u003enhl-api-py) (2023.5.7)\n    Collecting httpcore\u003c0.18.0,\u003e=0.15.0\n      Downloading httpcore-0.17.2-py3-none-any.whl (72 kB)\n         ---------------------------------------- 0.0/72.5 kB ? eta -:--:--\n         ---------------------------------------- 72.5/72.5 kB ? eta 0:00:00\n    Requirement already satisfied: idna in c:\\users\\cscha\\anaconda3\\envs\\generic-ml-env\\lib\\site-packages (from httpx-\u003enhl-api-py) (3.4)\n    Requirement already satisfied: sniffio in c:\\users\\cscha\\anaconda3\\envs\\generic-ml-env\\lib\\site-packages (from httpx-\u003enhl-api-py) (1.2.0)\n    Collecting h11\u003c0.15,\u003e=0.13\n      Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n         ---------------------------------------- 0.0/58.3 kB ? eta -:--:--\n         ---------------------------------------- 58.3/58.3 kB ? eta 0:00:00\n    Requirement already satisfied: anyio\u003c5.0,\u003e=3.0 in c:\\users\\cscha\\anaconda3\\envs\\generic-ml-env\\lib\\site-packages (from httpcore\u003c0.18.0,\u003e=0.15.0-\u003ehttpx-\u003enhl-api-py) (3.5.0)\n    Installing collected packages: h11, httpcore, httpx, nhl-api-py\n    Successfully installed h11-0.14.0 httpcore-0.17.2 httpx-0.24.1 nhl-api-py-0.1.3\n    Note: you may need to restart the kernel to use updated packages.\n    \n\n\n```python\nfrom nhlpy import NHLClient\n```\n\n### Getting Started - Create the NHLClient\n\n\n```python\nclient = NHLClient()\n```\n\n### Team APIs\n\n\n```python\nteams = client.teams.all()\nteams\n```\n\n\n```python\nbuffalo = client.teams.get_by_id(id=7)\nbuffalo\n```\n\n\n```python\nnext_buffalo_game = client.teams.get_team_next_game(id=7)\nnext_buffalo_game\n```\n\n\n```python\nprev_buffalo_game = client.teams.get_team_previous_game(id=7)\nprev_buffalo_game\n```\n\n\n```python\nbuffalo_with_stats = client.teams.get_team_with_stats(id=7)\nbuffalo_with_stats\n```\n\n\n```python\nbuffalo_roster = client.teams.get_team_roster(id=7)\nbuffalo_roster\n```\n\n\n```python\nbuffalo_full_team_stats = client.teams.get_team_stats(id=7)\nbuffalo_full_team_stats\n```\n\n### Standing APIs\n\n\n```python\n# These can be used in conjunction with get_standings_by_standing_type\nall_standing_types = client.standings.get_standing_types()\nall_standing_types\n```\n\n\n```python\n# standings by season\nall_standings = client.standings.get_standings(season=\"20222023\", detailed_record=False)\nall_standings\n```\n\n\n```python\n# same as above but with more detailed information\n# standings by season\nall_standings = client.standings.get_standings(season=\"20222023\", detailed_record=True)\nall_standings\n```\n\n\n```python\n# Get standings by type, types can be found via get_standings_by_type, or in the docstring\npost_season = client.standings.get_standings_by_standing_type(standing_type=\"regularSeason\")\npost_season\n```\n\n\n```python\n\n```\n\n### Players\n\n\n```python\n# APIs to access player information.  Requires person_id, found from `teams.get_team_roster()`\njj = client.players.get_player(person_id=8482175)\njj\n```\n\n\n```python\njj_stats = client.players.get_player_stats(person_id=8482175, season=\"20222023\", stat_type=\"statsSingleSeason\")\njj_stats\n```\n\n\n```python\n# Differnt stat types you can access\ntypes = client.players.get_player_stat_types()\ntypes\n```\n\n\n```python\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreyjs%2Fnhl-api-py-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreyjs%2Fnhl-api-py-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreyjs%2Fnhl-api-py-examples/lists"}