Skip to content

Commit 1e72d8d

Browse files
feat: srs ratings
1 parent 2a4e045 commit 1e72d8d

97 files changed

Lines changed: 613 additions & 97 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cbbd/api/conferences_api.py
1010
cbbd/api/games_api.py
1111
cbbd/api/lines_api.py
1212
cbbd/api/plays_api.py
13+
cbbd/api/ratings_api.py
1314
cbbd/api/stats_api.py
1415
cbbd/api/teams_api.py
1516
cbbd/api/venues_api.py
@@ -38,6 +39,7 @@ cbbd/models/play_info_participants_inner.py
3839
cbbd/models/play_type_info.py
3940
cbbd/models/player_season_stats.py
4041
cbbd/models/season_type.py
42+
cbbd/models/srs_info.py
4143
cbbd/models/team_info.py
4244
cbbd/models/team_roster.py
4345
cbbd/models/team_roster_player.py
@@ -76,7 +78,9 @@ docs/PlayInfoParticipantsInner.md
7678
docs/PlayTypeInfo.md
7779
docs/PlayerSeasonStats.md
7880
docs/PlaysApi.md
81+
docs/RatingsApi.md
7982
docs/SeasonType.md
83+
docs/SrsInfo.md
8084
docs/StatsApi.md
8185
docs/TeamInfo.md
8286
docs/TeamRoster.md
@@ -123,7 +127,9 @@ test/test_play_info_participants_inner.py
123127
test/test_play_type_info.py
124128
test/test_player_season_stats.py
125129
test/test_plays_api.py
130+
test/test_ratings_api.py
126131
test/test_season_type.py
132+
test/test_srs_info.py
127133
test/test_stats_api.py
128134
test/test_team_info.py
129135
test/test_team_roster.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.3.0
7-
- Package version: 1.3.0
6+
- API version: 1.4.0
7+
- Package version: 1.4.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.3.0
19+
pip install cbbd@1.4.0
2020
```
21-
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.3.0`)
21+
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.4.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_srs**](docs/RatingsApi.md#get_srs) | **GET** /ratings/srs |
9091
*StatsApi* | [**get_player_season_stats**](docs/StatsApi.md#get_player_season_stats) | **GET** /stats/player/season |
9192
*StatsApi* | [**get_team_season_stats**](docs/StatsApi.md#get_team_season_stats) | **GET** /stats/team/season |
9293
*TeamsApi* | [**get_team_roster**](docs/TeamsApi.md#get_team_roster) | **GET** /teams/roster |
@@ -116,6 +117,7 @@ Class | Method | HTTP request | Description
116117
- [PlayTypeInfo](docs/PlayTypeInfo.md)
117118
- [PlayerSeasonStats](docs/PlayerSeasonStats.md)
118119
- [SeasonType](docs/SeasonType.md)
120+
- [SrsInfo](docs/SrsInfo.md)
119121
- [TeamInfo](docs/TeamInfo.md)
120122
- [TeamRoster](docs/TeamRoster.md)
121123
- [TeamRosterPlayer](docs/TeamRosterPlayer.md)

cbbd/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
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.3.0
10+
The version of the OpenAPI document: 1.4.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.3.0"
18+
__version__ = "1.4.0"
1919

2020
# import apis into sdk package
2121
from cbbd.api.conferences_api import ConferencesApi
2222
from cbbd.api.games_api import GamesApi
2323
from cbbd.api.lines_api import LinesApi
2424
from cbbd.api.plays_api import PlaysApi
25+
from cbbd.api.ratings_api import RatingsApi
2526
from cbbd.api.stats_api import StatsApi
2627
from cbbd.api.teams_api import TeamsApi
2728
from cbbd.api.venues_api import VenuesApi
@@ -58,6 +59,7 @@
5859
from cbbd.models.play_type_info import PlayTypeInfo
5960
from cbbd.models.player_season_stats import PlayerSeasonStats
6061
from cbbd.models.season_type import SeasonType
62+
from cbbd.models.srs_info import SrsInfo
6163
from cbbd.models.team_info import TeamInfo
6264
from cbbd.models.team_roster import TeamRoster
6365
from cbbd.models.team_roster_player import TeamRosterPlayer

cbbd/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from cbbd.api.games_api import GamesApi
66
from cbbd.api.lines_api import LinesApi
77
from cbbd.api.plays_api import PlaysApi
8+
from cbbd.api.ratings_api import RatingsApi
89
from cbbd.api.stats_api import StatsApi
910
from cbbd.api.teams_api import TeamsApi
1011
from cbbd.api.venues_api import VenuesApi

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.3.0
8+
The version of the OpenAPI document: 1.4.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.3.0
8+
The version of the OpenAPI document: 1.4.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.3.0
8+
The version of the OpenAPI document: 1.4.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.3.0
8+
The version of the OpenAPI document: 1.4.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/ratings_api.py

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# coding: utf-8
2+
3+
"""
4+
College Basketball Data API
5+
6+
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.
7+
8+
The version of the OpenAPI document: 1.4.0
9+
Contact: admin@collegefootballdata.com
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
import re # noqa: F401
17+
import io
18+
import warnings
19+
20+
from pydantic import validate_arguments, ValidationError
21+
22+
from typing_extensions import Annotated
23+
from pydantic import Field, StrictInt, StrictStr
24+
25+
from typing import List, Optional
26+
27+
from cbbd.models.srs_info import SrsInfo
28+
29+
from cbbd.api_client import ApiClient
30+
from cbbd.api_response import ApiResponse
31+
from cbbd.exceptions import ( # noqa: F401
32+
ApiTypeError,
33+
ApiValueError
34+
)
35+
36+
37+
class RatingsApi:
38+
"""NOTE: This class is auto generated by OpenAPI Generator
39+
Ref: https://openapi-generator.tech
40+
41+
Do not edit the class manually.
42+
"""
43+
44+
def __init__(self, api_client=None) -> None:
45+
if api_client is None:
46+
api_client = ApiClient.get_default()
47+
self.api_client = api_client
48+
49+
@validate_arguments
50+
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
51+
"""get_srs # noqa: E501
52+
53+
Retrieves SRS ratings for the provided season, team, or conference. # noqa: E501
54+
This method makes a synchronous HTTP request by default. To make an
55+
asynchronous HTTP request, please pass async_req=True
56+
57+
>>> thread = api.get_srs(season, team, conference, async_req=True)
58+
>>> result = thread.get()
59+
60+
:param season: Optional season filter
61+
:type season: int
62+
:param team: Optional team filter
63+
:type team: str
64+
:param conference: Optional conference abbreviation filter
65+
:type conference: str
66+
:param async_req: Whether to execute the request asynchronously.
67+
:type async_req: bool, optional
68+
:param _request_timeout: timeout setting for this request.
69+
If one number provided, it will be total request
70+
timeout. It can also be a pair (tuple) of
71+
(connection, read) timeouts.
72+
:return: Returns the result object.
73+
If the method is called asynchronously,
74+
returns the request thread.
75+
:rtype: List[SrsInfo]
76+
"""
77+
kwargs['_return_http_data_only'] = True
78+
if '_preload_content' in kwargs:
79+
message = "Error! Please call the get_srs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
80+
raise ValueError(message)
81+
return self.get_srs_with_http_info(season, team, conference, **kwargs) # noqa: E501
82+
83+
@validate_arguments
84+
def get_srs_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
85+
"""get_srs # noqa: E501
86+
87+
Retrieves SRS ratings for the provided season, team, or conference. # noqa: E501
88+
This method makes a synchronous HTTP request by default. To make an
89+
asynchronous HTTP request, please pass async_req=True
90+
91+
>>> thread = api.get_srs_with_http_info(season, team, conference, async_req=True)
92+
>>> result = thread.get()
93+
94+
:param season: Optional season filter
95+
:type season: int
96+
:param team: Optional team filter
97+
:type team: str
98+
:param conference: Optional conference abbreviation filter
99+
:type conference: str
100+
:param async_req: Whether to execute the request asynchronously.
101+
:type async_req: bool, optional
102+
:param _preload_content: if False, the ApiResponse.data will
103+
be set to none and raw_data will store the
104+
HTTP response body without reading/decoding.
105+
Default is True.
106+
:type _preload_content: bool, optional
107+
:param _return_http_data_only: response data instead of ApiResponse
108+
object with status code, headers, etc
109+
:type _return_http_data_only: bool, optional
110+
:param _request_timeout: timeout setting for this request. If one
111+
number provided, it will be total request
112+
timeout. It can also be a pair (tuple) of
113+
(connection, read) timeouts.
114+
:param _request_auth: set to override the auth_settings for an a single
115+
request; this effectively ignores the authentication
116+
in the spec for a single request.
117+
:type _request_auth: dict, optional
118+
:type _content_type: string, optional: force content-type for the request
119+
:return: Returns the result object.
120+
If the method is called asynchronously,
121+
returns the request thread.
122+
:rtype: tuple(List[SrsInfo], status_code(int), headers(HTTPHeaderDict))
123+
"""
124+
125+
_params = locals()
126+
127+
_all_params = [
128+
'season',
129+
'team',
130+
'conference'
131+
]
132+
_all_params.extend(
133+
[
134+
'async_req',
135+
'_return_http_data_only',
136+
'_preload_content',
137+
'_request_timeout',
138+
'_request_auth',
139+
'_content_type',
140+
'_headers'
141+
]
142+
)
143+
144+
# validate the arguments
145+
for _key, _val in _params['kwargs'].items():
146+
if _key not in _all_params:
147+
raise ApiTypeError(
148+
"Got an unexpected keyword argument '%s'"
149+
" to method get_srs" % _key
150+
)
151+
_params[_key] = _val
152+
del _params['kwargs']
153+
154+
_collection_formats = {}
155+
156+
# process the path parameters
157+
_path_params = {}
158+
159+
# process the query parameters
160+
_query_params = []
161+
if _params.get('season') is not None: # noqa: E501
162+
_query_params.append(('season', _params['season']))
163+
164+
if _params.get('team') is not None: # noqa: E501
165+
_query_params.append(('team', _params['team']))
166+
167+
if _params.get('conference') is not None: # noqa: E501
168+
_query_params.append(('conference', _params['conference']))
169+
170+
# process the header parameters
171+
_header_params = dict(_params.get('_headers', {}))
172+
# process the form parameters
173+
_form_params = []
174+
_files = {}
175+
# process the body parameter
176+
_body_params = None
177+
# set the HTTP header `Accept`
178+
_header_params['Accept'] = self.api_client.select_header_accept(
179+
['application/json']) # noqa: E501
180+
181+
# authentication setting
182+
_auth_settings = ['apiKey'] # noqa: E501
183+
184+
_response_types_map = {
185+
'200': "List[SrsInfo]",
186+
}
187+
188+
return self.api_client.call_api(
189+
'/ratings/srs', 'GET',
190+
_path_params,
191+
_query_params,
192+
_header_params,
193+
body=_body_params,
194+
post_params=_form_params,
195+
files=_files,
196+
response_types_map=_response_types_map,
197+
auth_settings=_auth_settings,
198+
async_req=_params.get('async_req'),
199+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
200+
_preload_content=_params.get('_preload_content', True),
201+
_request_timeout=_params.get('_request_timeout'),
202+
collection_formats=_collection_formats,
203+
_request_auth=_params.get('_request_auth'))

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.3.0
8+
The version of the OpenAPI document: 1.4.0
99
Contact: admin@collegefootballdata.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)