|
| 1 | +""" |
| 2 | +BoxScoreTraditionalV2 endpoint. |
| 3 | +
|
| 4 | +.. deprecated:: 2025-26 |
| 5 | + This endpoint is deprecated. Please use BoxScoreTraditionalV3 instead. |
| 6 | + Data is no longer being published for BoxScoreTraditionalV2 as of the 2025-26 NBA season. |
| 7 | +""" |
| 8 | +import warnings |
| 9 | + |
1 | 10 | from nba_api.stats.endpoints._base import Endpoint |
2 | 11 | from nba_api.stats.library.http import NBAStatsHTTP |
3 | 12 | from nba_api.stats.library.parameters import ( |
|
10 | 19 |
|
11 | 20 |
|
12 | 21 | class BoxScoreTraditionalV2(Endpoint): |
| 22 | + """ |
| 23 | + BoxScoreTraditionalV2 endpoint. |
| 24 | +
|
| 25 | + .. deprecated:: 2025-26 |
| 26 | + **DEPRECATION WARNING:** This endpoint is deprecated. |
| 27 | + Please use :class:`~nba_api.stats.endpoints.BoxScoreTraditionalV3` instead. |
| 28 | + Data is no longer being published for BoxScoreTraditionalV2 as of the 2025-26 NBA season. |
| 29 | +
|
| 30 | + Args: |
| 31 | + game_id (str): NBA game ID. |
| 32 | + end_period (int, optional): End period for range. |
| 33 | + end_range (int, optional): End range value. |
| 34 | + range_type (int, optional): Range type parameter. |
| 35 | + start_period (int, optional): Start period for range. |
| 36 | + start_range (int, optional): Start range value. |
| 37 | + proxy (str, optional): HTTP/HTTPS proxy for requests. |
| 38 | + headers (dict, optional): Custom HTTP headers. |
| 39 | + timeout (int, optional): Request timeout in seconds. Defaults to 30. |
| 40 | + get_request (bool, optional): Whether to fetch data immediately. Defaults to True. |
| 41 | + """ |
13 | 42 | endpoint = "boxscoretraditionalv2" |
14 | 43 | expected_data = { |
15 | 44 | "PlayerStats": [ |
@@ -117,6 +146,13 @@ def __init__( |
117 | 146 | timeout=30, |
118 | 147 | get_request=True, |
119 | 148 | ): |
| 149 | + warnings.warn( |
| 150 | + "BoxScoreTraditionalV2 is deprecated and will be removed in a future version. " |
| 151 | + "Please use BoxScoreTraditionalV3 instead. " |
| 152 | + "Data is no longer being published for BoxScoreTraditionalV2 as of the 2025-26 NBA season.", |
| 153 | + DeprecationWarning, |
| 154 | + stacklevel=2 |
| 155 | + ) |
120 | 156 | self.proxy = proxy |
121 | 157 | if headers is not None: |
122 | 158 | self.headers = headers |
|
0 commit comments