Skip to content

Commit

Permalink
updates README with endpoints added/adjusted in 2.2.x (#33)
Browse files Browse the repository at this point in the history
* updates README with endpoints added/adjusted in 2.2.x

* bumpb 2.2.5
  • Loading branch information
coreyjs authored Feb 13, 2024
1 parent 4fb0a32 commit 82b9580
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,41 @@ client = NHLClient(verbose=True) # a tad more logging such as the URL being call
```


### Stats Endpoints (In development)

```python

client.club_stats_season(team_abbr="BUF") # kinda weird endpoint.

client.player_career_stats(player_id=8478402)

# Team Summary Stats.
# These have lots of available parameters. You can also tap into the apache cayenne expressions to build custom
# queries, if you have that knowledge.
client.stats.team_summary(start_season="20202021", end_season="20212022", game_type_id=2)
client.stats.team_summary(start_season="20202021", end_season="20212022")

###
# Skater Summary Stats.
# Queries for skaters for year ranges, filterable down by franchise.
client.stats.skater_stats_summary(start_season="20232024", end_season="20232024")
client.stats.skater_stats_summary(franchise_id=10, start_season="20232024", end_season="20232024")

# skater_stats_summary_by_expression is more advanced method. It allows for more direct manipulation of the query and
# the cayenne expression clauses.
sort_expr = [
{"property": "points", "direction": "DESC"},
{"property": "gamesPlayed", "direction": "ASC"},
{"property": "playerId", "direction": "ASC"},
]
expr = "gameTypeId=2 and seasonId<=20232024 and seasonId>=20222023"
client.stats.skater_stats_summary_by_expression(default_cayenne_exp=expr, sort_expr=sort_expr)

###

```


### Schedule Endpoints

```python
Expand All @@ -40,6 +75,7 @@ client.schedule.get_schedule_by_team_by_month(team_abbr="BUF")
client.schedule.get_schedule_by_team_by_month(team_abbr="BUF", month="2021-01")

client.schedule.get_schedule_by_team_by_week(team_abbr="BUF")
client.schedule.get_schedule_by_team_by_week(team_abbr="BUF", date="2024-01-01")

client.schedule.get_season_schedule(team_abbr="BUF", season="20212022")

Expand Down Expand Up @@ -80,6 +116,19 @@ client.game_center.score_now()
```


### Misc Endpoints
```python
client.misc.glossary()

client.misc.config()

client.misc.countries()

client.misc.season_specific_rules_and_info()

client.misc.draft_year_and_rounds()
```

---
### Insomnia Rest Client Export

Expand Down
2 changes: 1 addition & 1 deletion nhlpy/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Should this be driven by the main pyproject.toml file? yes, is it super convoluted? yes, can it wait? sure

__version__ = "2.2.4"
__version__ = "2.2.5"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "nhl-api-py"
version = "2.2.4"
version = "2.2.5"
description = "NHL API. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods for easy data loading in Pandas or any ML applications."
authors = ["Corey Schaf <cschaf@gmail.com>"]
readme = "README.md"
Expand Down

0 comments on commit 82b9580

Please sign in to comment.