Skip to content

Commit 702201e

Browse files
feat: adjusted efficiency ratings
1 parent 1e72d8d commit 702201e

98 files changed

Lines changed: 536 additions & 101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ cbbd/api_response.py
1919
cbbd/configuration.py
2020
cbbd/exceptions.py
2121
cbbd/models/__init__.py
22+
cbbd/models/adjusted_efficiency_info.py
2223
cbbd/models/conference_history.py
2324
cbbd/models/conference_history_teams_inner.py
2425
cbbd/models/conference_info.py
@@ -55,6 +56,7 @@ cbbd/models/team_season_unit_stats_turnovers.py
5556
cbbd/models/venue_info.py
5657
cbbd/py.typed
5758
cbbd/rest.py
59+
docs/AdjustedEfficiencyInfo.md
5860
docs/ConferenceHistory.md
5961
docs/ConferenceHistoryTeamsInner.md
6062
docs/ConferenceInfo.md
@@ -104,6 +106,7 @@ setup.cfg
104106
setup.py
105107
test-requirements.txt
106108
test/__init__.py
109+
test/test_adjusted_efficiency_info.py
107110
test/test_conference_history.py
108111
test/test_conference_history_teams_inner.py
109112
test/test_conference_info.py

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ This API is in limited Beta for Patreon subscribers. It may have bugs and is sub
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

6-
- API version: 1.4.0
7-
- Package version: 1.4.0
6+
- API version: 1.5.0
7+
- Package version: 1.5.0
88
- Generator version: 7.11.0
99
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
1010

@@ -16,9 +16,9 @@ Python 3.7+
1616
### pip install
1717

1818
```sh
19-
pip install cbbd@1.4.0
19+
pip install cbbd@1.5.0
2020
```
21-
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.4.0`)
21+
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.5.0`)
2222

2323
Then import the package:
2424
```python
@@ -87,6 +87,7 @@ Class | Method | HTTP request | Description
8787
*PlaysApi* | [**get_plays_by_date**](docs/PlaysApi.md#get_plays_by_date) | **GET** /plays/date |
8888
*PlaysApi* | [**get_plays_by_player_id**](docs/PlaysApi.md#get_plays_by_player_id) | **GET** /plays/player/{playerId} |
8989
*PlaysApi* | [**get_plays_by_team**](docs/PlaysApi.md#get_plays_by_team) | **GET** /plays/team |
90+
*RatingsApi* | [**get_adjusted_efficiency**](docs/RatingsApi.md#get_adjusted_efficiency) | **GET** /ratings/adjusted |
9091
*RatingsApi* | [**get_srs**](docs/RatingsApi.md#get_srs) | **GET** /ratings/srs |
9192
*StatsApi* | [**get_player_season_stats**](docs/StatsApi.md#get_player_season_stats) | **GET** /stats/player/season |
9293
*StatsApi* | [**get_team_season_stats**](docs/StatsApi.md#get_team_season_stats) | **GET** /stats/team/season |
@@ -97,6 +98,7 @@ Class | Method | HTTP request | Description
9798

9899
## Documentation For Models
99100

101+
- [AdjustedEfficiencyInfo](docs/AdjustedEfficiencyInfo.md)
100102
- [ConferenceHistory](docs/ConferenceHistory.md)
101103
- [ConferenceHistoryTeamsInner](docs/ConferenceHistoryTeamsInner.md)
102104
- [ConferenceInfo](docs/ConferenceInfo.md)

cbbd/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
99
10-
The version of the OpenAPI document: 1.4.0
10+
The version of the OpenAPI document: 1.5.0
1111
Contact: admin@collegefootballdata.com
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

1717

18-
__version__ = "1.4.0"
18+
__version__ = "1.5.0"
1919

2020
# import apis into sdk package
2121
from cbbd.api.conferences_api import ConferencesApi
@@ -39,6 +39,7 @@
3939
from cbbd.exceptions import ApiException
4040

4141
# import models into sdk package
42+
from cbbd.models.adjusted_efficiency_info import AdjustedEfficiencyInfo
4243
from cbbd.models.conference_history import ConferenceHistory
4344
from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
4445
from cbbd.models.conference_info import ConferenceInfo

cbbd/api/conferences_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/games_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/lines_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/plays_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/ratings_api.py

Lines changed: 158 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -24,6 +24,7 @@
2424

2525
from typing import List, Optional
2626

27+
from cbbd.models.adjusted_efficiency_info import AdjustedEfficiencyInfo
2728
from cbbd.models.srs_info import SrsInfo
2829

2930
from cbbd.api_client import ApiClient
@@ -46,6 +47,162 @@ def __init__(self, api_client=None) -> None:
4647
api_client = ApiClient.get_default()
4748
self.api_client = api_client
4849

50+
@validate_arguments
51+
def get_adjusted_efficiency(self, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> List[AdjustedEfficiencyInfo]: # noqa: E501
52+
"""get_adjusted_efficiency # noqa: E501
53+
54+
Retrieves adjusted efficiency ratings for the provided season, team, or conference. # noqa: E501
55+
This method makes a synchronous HTTP request by default. To make an
56+
asynchronous HTTP request, please pass async_req=True
57+
58+
>>> thread = api.get_adjusted_efficiency(season, team, conference, async_req=True)
59+
>>> result = thread.get()
60+
61+
:param season: Optional season filter
62+
:type season: int
63+
:param team: Optional team filter
64+
:type team: str
65+
:param conference: Optional conference abbreviation filter
66+
:type conference: str
67+
:param async_req: Whether to execute the request asynchronously.
68+
:type async_req: bool, optional
69+
:param _request_timeout: timeout setting for this request.
70+
If one number provided, it will be total request
71+
timeout. It can also be a pair (tuple) of
72+
(connection, read) timeouts.
73+
:return: Returns the result object.
74+
If the method is called asynchronously,
75+
returns the request thread.
76+
:rtype: List[AdjustedEfficiencyInfo]
77+
"""
78+
kwargs['_return_http_data_only'] = True
79+
if '_preload_content' in kwargs:
80+
message = "Error! Please call the get_adjusted_efficiency_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
81+
raise ValueError(message)
82+
return self.get_adjusted_efficiency_with_http_info(season, team, conference, **kwargs) # noqa: E501
83+
84+
@validate_arguments
85+
def get_adjusted_efficiency_with_http_info(self, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
86+
"""get_adjusted_efficiency # noqa: E501
87+
88+
Retrieves adjusted efficiency ratings for the provided season, team, or conference. # noqa: E501
89+
This method makes a synchronous HTTP request by default. To make an
90+
asynchronous HTTP request, please pass async_req=True
91+
92+
>>> thread = api.get_adjusted_efficiency_with_http_info(season, team, conference, async_req=True)
93+
>>> result = thread.get()
94+
95+
:param season: Optional season filter
96+
:type season: int
97+
:param team: Optional team filter
98+
:type team: str
99+
:param conference: Optional conference abbreviation filter
100+
:type conference: str
101+
:param async_req: Whether to execute the request asynchronously.
102+
:type async_req: bool, optional
103+
:param _preload_content: if False, the ApiResponse.data will
104+
be set to none and raw_data will store the
105+
HTTP response body without reading/decoding.
106+
Default is True.
107+
:type _preload_content: bool, optional
108+
:param _return_http_data_only: response data instead of ApiResponse
109+
object with status code, headers, etc
110+
:type _return_http_data_only: bool, optional
111+
:param _request_timeout: timeout setting for this request. If one
112+
number provided, it will be total request
113+
timeout. It can also be a pair (tuple) of
114+
(connection, read) timeouts.
115+
:param _request_auth: set to override the auth_settings for an a single
116+
request; this effectively ignores the authentication
117+
in the spec for a single request.
118+
:type _request_auth: dict, optional
119+
:type _content_type: string, optional: force content-type for the request
120+
:return: Returns the result object.
121+
If the method is called asynchronously,
122+
returns the request thread.
123+
:rtype: tuple(List[AdjustedEfficiencyInfo], status_code(int), headers(HTTPHeaderDict))
124+
"""
125+
126+
_params = locals()
127+
128+
_all_params = [
129+
'season',
130+
'team',
131+
'conference'
132+
]
133+
_all_params.extend(
134+
[
135+
'async_req',
136+
'_return_http_data_only',
137+
'_preload_content',
138+
'_request_timeout',
139+
'_request_auth',
140+
'_content_type',
141+
'_headers'
142+
]
143+
)
144+
145+
# validate the arguments
146+
for _key, _val in _params['kwargs'].items():
147+
if _key not in _all_params:
148+
raise ApiTypeError(
149+
"Got an unexpected keyword argument '%s'"
150+
" to method get_adjusted_efficiency" % _key
151+
)
152+
_params[_key] = _val
153+
del _params['kwargs']
154+
155+
_collection_formats = {}
156+
157+
# process the path parameters
158+
_path_params = {}
159+
160+
# process the query parameters
161+
_query_params = []
162+
if _params.get('season') is not None: # noqa: E501
163+
_query_params.append(('season', _params['season']))
164+
165+
if _params.get('team') is not None: # noqa: E501
166+
_query_params.append(('team', _params['team']))
167+
168+
if _params.get('conference') is not None: # noqa: E501
169+
_query_params.append(('conference', _params['conference']))
170+
171+
# process the header parameters
172+
_header_params = dict(_params.get('_headers', {}))
173+
# process the form parameters
174+
_form_params = []
175+
_files = {}
176+
# process the body parameter
177+
_body_params = None
178+
# set the HTTP header `Accept`
179+
_header_params['Accept'] = self.api_client.select_header_accept(
180+
['application/json']) # noqa: E501
181+
182+
# authentication setting
183+
_auth_settings = ['apiKey'] # noqa: E501
184+
185+
_response_types_map = {
186+
'200': "List[AdjustedEfficiencyInfo]",
187+
}
188+
189+
return self.api_client.call_api(
190+
'/ratings/adjusted', 'GET',
191+
_path_params,
192+
_query_params,
193+
_header_params,
194+
body=_body_params,
195+
post_params=_form_params,
196+
files=_files,
197+
response_types_map=_response_types_map,
198+
auth_settings=_auth_settings,
199+
async_req=_params.get('async_req'),
200+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
201+
_preload_content=_params.get('_preload_content', True),
202+
_request_timeout=_params.get('_request_timeout'),
203+
collection_formats=_collection_formats,
204+
_request_auth=_params.get('_request_auth'))
205+
49206
@validate_arguments
50207
def get_srs(self, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> List[SrsInfo]: # noqa: E501
51208
"""get_srs # noqa: E501

cbbd/api/stats_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/teams_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.
77
8-
The version of the OpenAPI document: 1.4.0
8+
The version of the OpenAPI document: 1.5.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)