From 9d1d98cc32c98ca99ae9a55d161d3cce093a6407 Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:17:49 -0700 Subject: [PATCH 1/6] Added endpoint and mappings for synergyplaytypes --- tools/stats/library/mapping.py | 44 +++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/tools/stats/library/mapping.py b/tools/stats/library/mapping.py index ab549ca4..9417335c 100644 --- a/tools/stats/library/mapping.py +++ b/tools/stats/library/mapping.py @@ -130,6 +130,7 @@ 'ScoreboardV2', 'ShotChartDetail', 'ShotChartLineupDetail', + 'SynergyPlayTypes', 'TeamAndPlayerVsPlayers', 'TeamAndPlayersVsPlayers', 'TeamClutchStats', @@ -834,6 +835,16 @@ 'parameter_value': '', 'parameter_error_value': 'a', }, + 'PlayType': { + 'default_py_value': 'PlayType.default', + 'parameter_value': PlayType.default, + 'parameter_error_value': 0, + }, + 'PlayTypeNullable': { + 'default_py_value': 'PlayTypeNullable.default', + 'parameter_value': PlayTypeNullable.default, + 'parameter_error_value': 0, + }, 'PointDiff': { 'default_py_value': 'PointDiff.default', 'parameter_value': PointDiff.default, @@ -1094,6 +1105,16 @@ 'parameter_value': '', 'parameter_error_value': 'a', }, + 'TypeGrouping': { + 'default_py_value': 'TypeGrouping.default', + 'parameter_value': TypeGrouping.default, + 'parameter_error_value': 0, + }, + 'TypeGroupingNullable': { + 'default_py_value': 'TypeGroupingNullable.default', + 'parameter_value': TypeGroupingNullable.default, + 'parameter_error_value': 0, + }, 'WeightNullable': { 'default_py_value': "''", 'parameter_value': '', @@ -2571,6 +2592,16 @@ None: 'PlayerTeamID' } }, + 'PlayType': { + 'nullable': { + None: 'PlayTypeNullable', + '^(Transition)|(Isolation)|(PRBallHandler)|(PRRollman)|(Postup)|(Spotup)|(Handoff)|(Cut)|(OffScreen)|(OffRebound)|(Misc)$': 'PlayTypeNullable' + + }, + 'non-nullable': { + + } + }, 'PlusMinus': { 'nullable': { @@ -2730,7 +2761,8 @@ 'non-nullable': { '^\\d{4}-\\d{2}$': 'Season', None: 'SeasonYear', - '^(\\d{4}-\\d{2})|(All Time)$': 'SeasonAll_Time' + '^(\\d{4}-\\d{2})|(All Time)$': 'SeasonAll_Time', + '^(\\d{4}-\\d{2})|(\\d{4})$': 'Season' } }, 'SeriesID': { @@ -2864,6 +2896,16 @@ } }, + 'TypeGrouping': { + 'nullable': { + None: 'TypeGroupingNullable', + '^|(offensive)|(defensive)$': 'TypeGroupingNullable' + + }, + 'non-nullable': { + + } + }, 'VsConference': { 'nullable': { '^((East)|(West))?$': 'VsConferenceNullable', From e9465288ded654b773c82e08bbf5ce6689b9bbf6 Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:20:50 -0700 Subject: [PATCH 2/6] Added SynergyPlayTypes endpoint with needed parameters --- nba_api/stats/endpoints/__init__.py | 2 + nba_api/stats/endpoints/synergyplaytypes.py | 57 +++++++++++++++++++++ nba_api/stats/library/parameters.py | 31 +++++++++++ 3 files changed, 90 insertions(+) create mode 100644 nba_api/stats/endpoints/synergyplaytypes.py diff --git a/nba_api/stats/endpoints/__init__.py b/nba_api/stats/endpoints/__init__.py index 0d94c2b8..e96665ce 100644 --- a/nba_api/stats/endpoints/__init__.py +++ b/nba_api/stats/endpoints/__init__.py @@ -79,6 +79,7 @@ 'scoreboardv2', 'shotchartdetail', 'shotchartlineupdetail', + 'synergyplaytypes', 'teamandplayersvsplayers', 'teamdashlineups', 'teamdashptpass', @@ -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 diff --git a/nba_api/stats/endpoints/synergyplaytypes.py b/nba_api/stats/endpoints/synergyplaytypes.py new file mode 100644 index 00000000..ee8808dd --- /dev/null +++ b/nba_api/stats/endpoints/synergyplaytypes.py @@ -0,0 +1,57 @@ +from nba_api.stats.endpoints._base import Endpoint +from nba_api.stats.library.http import NBAStatsHTTP +from nba_api.stats.library.parameters import LeagueID, PerModeSimple, PlayerOrTeamAbbreviation, SeasonTypeAllStar, Season, PlayTypeNullable, TypeGroupingNullable + + +class SynergyPlayTypes(Endpoint): + endpoint = 'synergyplaytypes' + expected_data = {'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']} + + nba_response = None + data_sets = None + player_stats = None + team_stats = None + headers = None + + def __init__(self, + league_id=LeagueID.default, + per_mode_simple=PerModeSimple.default, + player_or_team_abbreviation=PlayerOrTeamAbbreviation.default, + season_type_all_star=SeasonTypeAllStar.default, + season=Season.default, + play_type_nullable=PlayTypeNullable.default, + type_grouping_nullable=TypeGroupingNullable.default, + proxy=None, + headers=None, + timeout=30, + get_request=True): + self.proxy = proxy + if headers is not None: + self.headers = headers + self.timeout = timeout + self.parameters = { + 'LeagueID': league_id, + 'PerMode': per_mode_simple, + 'PlayerOrTeam': player_or_team_abbreviation, + 'SeasonType': season_type_all_star, + 'SeasonYear': season, + 'PlayType': play_type_nullable, + 'TypeGrouping': type_grouping_nullable + } + if get_request: + self.get_request() + + def get_request(self): + self.nba_response = NBAStatsHTTP().send_api_request( + endpoint=self.endpoint, + parameters=self.parameters, + proxy=self.proxy, + headers=self.headers, + timeout=self.timeout, + ) + self.load_response() + + def load_response(self): + data_sets = self.nba_response.get_data_sets() + self.data_sets = [Endpoint.DataSet(data=data_set) for data_set_name, data_set in data_sets.items()] + self.synergy_play_type = Endpoint.DataSet(data=data_sets['SynergyPlayType']) diff --git a/nba_api/stats/library/parameters.py b/nba_api/stats/library/parameters.py index ddae15d2..833ed4e6 100644 --- a/nba_api/stats/library/parameters.py +++ b/nba_api/stats/library/parameters.py @@ -506,6 +506,26 @@ class ActivePlayers(_YesNo): pass +class PlayType: + transition = 'Transition' + isolation = 'Isolation' + pr_ball_handler = 'PRBallHandler' + pr_roll_man = 'PRRollman' + post_up = 'Postup' + spot_up = 'Spotup' + handoff = 'Handoff' + cut = 'Cut' + off_screen = 'OffScreen' + putbacks = 'OffRebound' + misc = 'Misc' + + default = transition + + +class PlayTypeNullable(_NotRequired, PlayType): + pass + + class PointDiff: def points(self, i): return str(int(i)) @@ -775,3 +795,14 @@ class StatType: tracking = 'Tracking' default = traditional + + +class TypeGrouping: + offensive = 'offensive' + defensive = 'defensive' + + default = offensive + + +class TypeGroupingNullable(_NotRequired, TypeGrouping): + pass From 9a14405b4ca9c5bd9c1bfa24c4ea720a23b4f2a0 Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:21:39 -0700 Subject: [PATCH 3/6] Added SynergyPlayTypes to tests --- tests/stats/deferred_endpoints.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/stats/deferred_endpoints.py b/tests/stats/deferred_endpoints.py index dedc8821..2dad9c14 100644 --- a/tests/stats/deferred_endpoints.py +++ b/tests/stats/deferred_endpoints.py @@ -94,6 +94,7 @@ def __call__(self): DeferredEndpoint(ep.ScoreboardV2), DeferredEndpoint(ep.ShotChartDetail, player_id='2544', team_id='1610612739'), DeferredEndpoint(ep.ShotChartLineupDetail), + DeferredEndpoint(ep.SynergyPlayTypes), DeferredEndpoint(ep.TeamAndPlayersVsPlayers, team_id=1610612739, player_id1=203954, @@ -133,5 +134,5 @@ def __call__(self): team_id='1610612739', start_period=1, end_period=1), DeferredEndpoint(ep.VideoEvents, game_id='0021700807'), DeferredEndpoint(ep.VideoStatus), - DeferredEndpoint(ep.WinProbabilityPBP, game_id='0021700807')] - + DeferredEndpoint(ep.WinProbabilityPBP, game_id='0021700807') +] From 9dd93ef5166c9bc6ff9188d71ace3384ccbdf88a Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:23:51 -0700 Subject: [PATCH 4/6] Updated analysis.json with SynergyPlayTypes endpoint --- analysis_archive/stats/analysis.json | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/analysis_archive/stats/analysis.json b/analysis_archive/stats/analysis.json index 9f60eb0c..27b08804 100644 --- a/analysis_archive/stats/analysis.json +++ b/analysis_archive/stats/analysis.json @@ -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": null, + "PlayerOrTeam": "^(P)|(T)$", + "SeasonType": "^(Regular Season)|(Pre Season)|(Playoffs)|(All Star)|(All-Star)$", + "SeasonYear": "^(\\d{4}-\\d{2})|(\\d{4})$", + "TypeGrouping": null + }, + "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", From 171f770b2e0c3fe635fd4ef0d646bec0dd878a8e Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:32:19 -0700 Subject: [PATCH 5/6] Updated docs for SynergyPlayTypes endpoint --- .../stats/endpoints/synergyplaytypes.md | 92 +++++++++++++++++++ docs/nba_api/stats/library/parameters.md | 64 ++++++++++--- 2 files changed, 141 insertions(+), 15 deletions(-) create mode 100644 docs/nba_api/stats/endpoints/synergyplaytypes.md diff --git a/docs/nba_api/stats/endpoints/synergyplaytypes.md b/docs/nba_api/stats/endpoints/synergyplaytypes.md new file mode 100644 index 00000000..480f81f5 --- /dev/null +++ b/docs/nba_api/stats/endpoints/synergyplaytypes.md @@ -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 \ No newline at end of file diff --git a/docs/nba_api/stats/library/parameters.md b/docs/nba_api/stats/library/parameters.md index 48091a8e..595644ba 100644 --- a/docs/nba_api/stats/library/parameters.md +++ b/docs/nba_api/stats/library/parameters.md @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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` @@ -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_ @@ -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_ @@ -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` @@ -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. @@ -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` From 8821435e6a6fd55c6531751cd991c5478758a7e4 Mon Sep 17 00:00:00 2001 From: Thomas Kelley Date: Sun, 14 Apr 2019 23:49:38 -0700 Subject: [PATCH 6/6] Added known parameters for SynergyPlayTypes endpoint --- analysis_archive/stats/analysis.json | 4 ++-- docs/nba_api/stats/endpoints/synergyplaytypes.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis_archive/stats/analysis.json b/analysis_archive/stats/analysis.json index 27b08804..dc434111 100644 --- a/analysis_archive/stats/analysis.json +++ b/analysis_archive/stats/analysis.json @@ -12137,11 +12137,11 @@ "parameter_patterns": { "LeagueID": "^\\d{2}$", "PerMode": "^(Totals)|(PerGame)$", - "PlayType": null, + "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": null + "TypeGrouping": "^(offensive)|(defensive)$" }, "parameters": [ "LeagueID", diff --git a/docs/nba_api/stats/endpoints/synergyplaytypes.md b/docs/nba_api/stats/endpoints/synergyplaytypes.md index 480f81f5..69a092e9 100644 --- a/docs/nba_api/stats/endpoints/synergyplaytypes.md +++ b/docs/nba_api/stats/endpoints/synergyplaytypes.md @@ -15,7 +15,7 @@ API Parameter Name | Python Parameter Variable | Pattern | Required | Nullable [_**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` | +[_**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