Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SynergyPlayTypes Endpoint #60

Merged
merged 6 commits into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions analysis_archive/stats/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -12101,6 +12101,66 @@
],
"status": "success"
},
"SynergyPlayTypes": {
"data_sets": {
"SynergyPlayType": [
"SEASON_ID",
"TEAM_ID",
"TEAM_ABBREVIATION",
"TEAM_NAME",
"PLAY_TYPE",
"TYPE_GROUPING",
"PERCENTILE",
"GP",
"POSS_PCT",
"PPP",
"FG_PCT",
"FT_POSS_PCT",
"TOV_POSS_PCT",
"SF_POSS_PCT",
"PLUSONE_POSS_PCT",
"SCORE_POSS_PCT",
"EFG_PCT",
"POSS",
"PTS",
"FGM",
"FGA",
"FGMX"
]
},
"endpoint": "SynergyPlayTypes",
"last_validated_date": "2019-04-14",
"nullable_parameters": [
"PlayType",
"TypeGrouping"
],
"parameter_patterns": {
"LeagueID": "^\\d{2}$",
"PerMode": "^(Totals)|(PerGame)$",
"PlayType": "^(Transition)|(Isolation)|(PRBallHandler)|(PRRollman)|(Postup)|(Spotup)|(Handoff)|(Cut)|(OffScreen)|(OffRebound)|(Misc)$",
"PlayerOrTeam": "^(P)|(T)$",
"SeasonType": "^(Regular Season)|(Pre Season)|(Playoffs)|(All Star)|(All-Star)$",
"SeasonYear": "^(\\d{4}-\\d{2})|(\\d{4})$",
"TypeGrouping": "^(offensive)|(defensive)$"
},
"parameters": [
"LeagueID",
"PerMode",
"PlayType",
"PlayerOrTeam",
"SeasonType",
"SeasonYear",
"TypeGrouping"
],
"required_parameters": [
"LeagueID",
"PerMode",
"PlayerOrTeam",
"SeasonType",
"SeasonYear"
],
"status": "success"
},
"TeamAndPlayerVsPlayers": {
"endpoint": "TeamAndPlayerVsPlayers",
"last_validated_date": "2019-04-07",
Expand Down
92 changes: 92 additions & 0 deletions docs/nba_api/stats/endpoints/synergyplaytypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# SynergyPlayTypes
##### [nba_api/stats/endpoints/synergyplaytypes.py](https://github.com/swar/nba_api/blob/master/nba_api/stats/endpoints/synergyplaytypes.py)

##### Endpoint URL
>[https://stats.nba.com/stats/synergyplaytypes](https://stats.nba.com/stats/synergyplaytypes)

##### Valid URL
>[https://stats.nba.com/stats/synergyplaytypes?LeagueID=00&PerMode=Totals&PlayType=&PlayerOrTeam=T&SeasonType=Regular+Season&SeasonYear=2018-19&TypeGrouping=](https://stats.nba.com/stats/synergyplaytypes?LeagueID=00&PerMode=Totals&PlayType=&PlayerOrTeam=T&SeasonType=Regular+Season&SeasonYear=2018-19&TypeGrouping=)

## Parameters
API Parameter Name | Python Parameter Variable | Pattern | Required | Nullable
------------ | ------------ | :-----------: | :---: | :---:
[_**LeagueID**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#LeagueID) | league_id | `^\d{2}$` | `Y` | |
[_**PerMode**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#PerMode) | per_mode_simple | `^(Totals)\|(PerGame)$` | `Y` | |
[_**PlayerOrTeam**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#PlayerOrTeam) | player_or_team_abbreviation | `^(P)\|(T)$` | `Y` | |
[_**SeasonType**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#SeasonType) | season_type_all_star | `^(Regular Season)\|(Pre Season)\|(Playoffs)\|(All Star)\|(All-Star)$` | `Y` | |
[_**SeasonYear**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#SeasonYear) | season | `^(\d{4}-\d{2})\|(\d{4})$` | `Y` | |
[_**TypeGrouping**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#TypeGrouping) | type_grouping_nullable | `^(offensive)\|(defensive)$` | | `Y` |
[_**PlayType**_](https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/library/parameters.md#PlayType) | play_type_nullable | `^(Transition)\|(Isolation)\|(PRBallHandler)\|(PRRollman)\|(Postup)\|(Spotup)\|(Handoff)\|(Cut)\|(OffScreen)\|(OffRebound)\|(Misc)$` | | `Y` |

## Data Sets
#### SynergyPlayType `synergy_play_type`
```text
['SEASON_ID', 'TEAM_ID', 'TEAM_ABBREVIATION', 'TEAM_NAME', 'PLAY_TYPE', 'TYPE_GROUPING', 'PERCENTILE', 'GP', 'POSS_PCT', 'PPP', 'FG_PCT', 'FT_POSS_PCT', 'TOV_POSS_PCT', 'SF_POSS_PCT', 'PLUSONE_POSS_PCT', 'SCORE_POSS_PCT', 'EFG_PCT', 'POSS', 'PTS', 'FGM', 'FGA', 'FGMX']
```


## JSON
```json
{
"data_sets": {
"SynergyPlayType": [
"SEASON_ID",
"TEAM_ID",
"TEAM_ABBREVIATION",
"TEAM_NAME",
"PLAY_TYPE",
"TYPE_GROUPING",
"PERCENTILE",
"GP",
"POSS_PCT",
"PPP",
"FG_PCT",
"FT_POSS_PCT",
"TOV_POSS_PCT",
"SF_POSS_PCT",
"PLUSONE_POSS_PCT",
"SCORE_POSS_PCT",
"EFG_PCT",
"POSS",
"PTS",
"FGM",
"FGA",
"FGMX"
]
},
"endpoint": "SynergyPlayTypes",
"last_validated_date": "2019-04-14",
"nullable_parameters": [
"PlayType",
"TypeGrouping"
],
"parameter_patterns": {
"LeagueID": "^\\d{2}$",
"PerMode": "^(Totals)|(PerGame)$",
"PlayType": "^(Transition)|(Isolation)|(PRBallHandler)|(PRRollman)|(Postup)|(Spotup)|(Handoff)|(Cut)|(OffScreen)|(OffRebound)|(Misc)$",
"PlayerOrTeam": "^(P)|(T)$",
"SeasonType": "^(Regular Season)|(Pre Season)|(Playoffs)|(All Star)|(All-Star)$",
"SeasonYear": "^(\\d{4}-\\d{2})|(\\d{4})$",
"TypeGrouping": "^|(offensive)|(defensive)$"
},
"parameters": [
"LeagueID",
"PerMode",
"PlayType",
"PlayerOrTeam",
"SeasonType",
"SeasonYear",
"TypeGrouping"
],
"required_parameters": [
"LeagueID",
"PerMode",
"PlayerOrTeam",
"SeasonType",
"SeasonYear"
],
"status": "success"
}
```

Last validated 2019-04-14
64 changes: 49 additions & 15 deletions docs/nba_api/stats/library/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ No available information.
Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Expand All @@ -700,7 +700,7 @@ _**current_season_year**_ | `2018`
Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Expand Down Expand Up @@ -1358,6 +1358,27 @@ _**quarter**_ | `quarter()`
_**second**_ | `2`
_**third**_ | `3`

## _PlayType_

#### Class `PlayTypeNullable`
##### Patterns
- `^(Transition)|(Isolation)|(PRBallHandler)|(PRRollman)|(Postup)|(Spotup)|(Handoff)|(Cut)|(OffScreen)|(OffRebound)|(Misc)$`

Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**cut**_ | `Cut`
_**handoff**_ | `Handoff`
_**isolation**_ | `Isolation`
_**misc**_ | `Misc`
_**off_screen**_ | `OffScreen`
_**post_up**_ | `Postup`
_**pr_ball_handler**_ | `PRBallHandler`
_**pr_roll_man**_ | `PRRollman`
_**putbacks**_ | `OffRebound`
_**spot_up**_ | `Spotup`
_**transition**_ | `Transition`

## _PlayerExperience_

#### Class `PlayerExperienceNullable`
Expand Down Expand Up @@ -1564,7 +1585,7 @@ _**no**_ `default` | `N`
Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Expand Down Expand Up @@ -1611,7 +1632,7 @@ _**rs**_ | `RS`
Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

#### Class `SeasonAll`
Expand All @@ -1622,7 +1643,7 @@ Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**all**_ | `ALL`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

#### Class `SeasonAllNullable`
Expand All @@ -1633,7 +1654,7 @@ Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**all**_ | `ALL`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Expand All @@ -1645,7 +1666,7 @@ Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**alltime**_ | `ALLTIME`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

#### Class `SeasonAll_Time`
Expand All @@ -1656,7 +1677,7 @@ Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**all_time**_ | `All Time`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

#### Class `SeasonNullable`
Expand All @@ -1666,7 +1687,7 @@ _**current_season_year**_ | `2018`
Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Expand All @@ -1677,7 +1698,7 @@ _**current_season_year**_ | `2018`
Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

## _SeasonID_
Expand All @@ -1689,7 +1710,7 @@ _**current_season_year**_ | `2018`
Variable Name | Value
------------ | -------------
_**current_season_year**_ `default` | `22018`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**get_season_id**_ | `get_season_id()`

## _SeasonSegment_
Expand Down Expand Up @@ -1765,11 +1786,12 @@ _**preseason**_ | `Pre Season`
#### Class `Season`
##### Patterns
- `^\d{4}-\d{2}$`
- `^(\d{4}-\d{2})|(\d{4})$`

Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

#### Class `SeasonAll_Time`
Expand All @@ -1780,20 +1802,20 @@ Variable Name | Value
------------ | -------------
_**current_season**_ `default` | `2018-19`
_**all_time**_ | `All Time`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season_year**_ | `2018`

Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`
_**current_season**_ | `2018-19`
_**current_season_year**_ | `2018`

Variable Name | Value
------------ | -------------
_**current_season_year**_ `default` | `2018`
_**current_datetime**_ | `2019-04-07 01:07:05.165098`
_**current_datetime**_ | `2019-04-14 22:12:04.974188`

## _SeriesID_
No available information.
Expand Down Expand Up @@ -1990,6 +2012,18 @@ No available information.
No available information.


## _TypeGrouping_

#### Class `TypeGroupingNullable`
##### Patterns
- `^|(offensive)|(defensive)$`

Variable Name | Value
------------ | -------------
_**none**_ `default` |
_**defensive**_ | `defensive`
_**offensive**_ | `offensive`

## _VsConference_

#### Class `ConferenceNullable`
Expand Down
2 changes: 2 additions & 0 deletions nba_api/stats/endpoints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
'scoreboardv2',
'shotchartdetail',
'shotchartlineupdetail',
'synergyplaytypes',
'teamandplayersvsplayers',
'teamdashlineups',
'teamdashptpass',
Expand Down Expand Up @@ -188,6 +189,7 @@
from .scoreboardv2 import ScoreboardV2
from .shotchartdetail import ShotChartDetail
from .shotchartlineupdetail import ShotChartLineupDetail
from .synergyplaytypes import SynergyPlayTypes
from .teamandplayersvsplayers import TeamAndPlayersVsPlayers
from .teamdashlineups import TeamDashLineups
from .teamdashptpass import TeamDashPtPass
Expand Down
Loading