Skip to content

Commit acca349

Browse files
feat(recruiting): added 247 composite player data
1 parent 5318506 commit acca349

File tree

131 files changed

+1141
-125
lines changed

Some content is hidden

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

131 files changed

+1141
-125
lines changed

.openapi-generator/FILES

+12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cbbd/api/lines_api.py
1313
cbbd/api/plays_api.py
1414
cbbd/api/rankings_api.py
1515
cbbd/api/ratings_api.py
16+
cbbd/api/recruiting_api.py
1617
cbbd/api/stats_api.py
1718
cbbd/api/teams_api.py
1819
cbbd/api/venues_api.py
@@ -47,6 +48,9 @@ cbbd/models/play_type_info.py
4748
cbbd/models/player_season_stats.py
4849
cbbd/models/player_season_stats_win_shares.py
4950
cbbd/models/poll_team_info.py
51+
cbbd/models/recruit.py
52+
cbbd/models/recruit_committed_to.py
53+
cbbd/models/recruit_hometown.py
5054
cbbd/models/season_type.py
5155
cbbd/models/shot_info.py
5256
cbbd/models/shot_info_location.py
@@ -100,6 +104,10 @@ docs/PlaysApi.md
100104
docs/PollTeamInfo.md
101105
docs/RankingsApi.md
102106
docs/RatingsApi.md
107+
docs/Recruit.md
108+
docs/RecruitCommittedTo.md
109+
docs/RecruitHometown.md
110+
docs/RecruitingApi.md
103111
docs/SeasonType.md
104112
docs/ShotInfo.md
105113
docs/ShotInfoLocation.md
@@ -161,6 +169,10 @@ test/test_plays_api.py
161169
test/test_poll_team_info.py
162170
test/test_rankings_api.py
163171
test/test_ratings_api.py
172+
test/test_recruit.py
173+
test/test_recruit_committed_to.py
174+
test/test_recruit_hometown.py
175+
test/test_recruiting_api.py
164176
test/test_season_type.py
165177
test/test_shot_info.py
166178
test/test_shot_info_location.py

README.md

+8-4
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.13.0
7-
- Package version: 1.13.0
6+
- API version: 1.14.0
7+
- Package version: 1.14.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.13.0
19+
pip install cbbd@1.14.0
2020
```
21-
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.13.0`)
21+
(you may need to run `pip` with root permission: `sudo pip install cbbd@1.14.0`)
2222

2323
Then import the package:
2424
```python
@@ -93,6 +93,7 @@ Class | Method | HTTP request | Description
9393
*RankingsApi* | [**get_rankings**](docs/RankingsApi.md#get_rankings) | **GET** /rankings |
9494
*RatingsApi* | [**get_adjusted_efficiency**](docs/RatingsApi.md#get_adjusted_efficiency) | **GET** /ratings/adjusted |
9595
*RatingsApi* | [**get_srs**](docs/RatingsApi.md#get_srs) | **GET** /ratings/srs |
96+
*RecruitingApi* | [**get_recruits**](docs/RecruitingApi.md#get_recruits) | **GET** /recruiting/players |
9697
*StatsApi* | [**get_player_season_stats**](docs/StatsApi.md#get_player_season_stats) | **GET** /stats/player/season |
9798
*StatsApi* | [**get_team_season_stats**](docs/StatsApi.md#get_team_season_stats) | **GET** /stats/team/season |
9899
*TeamsApi* | [**get_team_roster**](docs/TeamsApi.md#get_team_roster) | **GET** /teams/roster |
@@ -128,6 +129,9 @@ Class | Method | HTTP request | Description
128129
- [PlayerSeasonStats](docs/PlayerSeasonStats.md)
129130
- [PlayerSeasonStatsWinShares](docs/PlayerSeasonStatsWinShares.md)
130131
- [PollTeamInfo](docs/PollTeamInfo.md)
132+
- [Recruit](docs/Recruit.md)
133+
- [RecruitCommittedTo](docs/RecruitCommittedTo.md)
134+
- [RecruitHometown](docs/RecruitHometown.md)
131135
- [SeasonType](docs/SeasonType.md)
132136
- [ShotInfo](docs/ShotInfo.md)
133137
- [ShotInfoLocation](docs/ShotInfoLocation.md)

cbbd/__init__.py

+6-2
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.13.0
10+
The version of the OpenAPI document: 1.14.0
1111
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.13.0"
18+
__version__ = "1.14.0"
1919

2020
# import apis into sdk package
2121
from cbbd.api.conferences_api import ConferencesApi
@@ -25,6 +25,7 @@
2525
from cbbd.api.plays_api import PlaysApi
2626
from cbbd.api.rankings_api import RankingsApi
2727
from cbbd.api.ratings_api import RatingsApi
28+
from cbbd.api.recruiting_api import RecruitingApi
2829
from cbbd.api.stats_api import StatsApi
2930
from cbbd.api.teams_api import TeamsApi
3031
from cbbd.api.venues_api import VenuesApi
@@ -67,6 +68,9 @@
6768
from cbbd.models.player_season_stats import PlayerSeasonStats
6869
from cbbd.models.player_season_stats_win_shares import PlayerSeasonStatsWinShares
6970
from cbbd.models.poll_team_info import PollTeamInfo
71+
from cbbd.models.recruit import Recruit
72+
from cbbd.models.recruit_committed_to import RecruitCommittedTo
73+
from cbbd.models.recruit_hometown import RecruitHometown
7074
from cbbd.models.season_type import SeasonType
7175
from cbbd.models.shot_info import ShotInfo
7276
from cbbd.models.shot_info_location import ShotInfoLocation

cbbd/api/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from cbbd.api.plays_api import PlaysApi
99
from cbbd.api.rankings_api import RankingsApi
1010
from cbbd.api.ratings_api import RatingsApi
11+
from cbbd.api.recruiting_api import RecruitingApi
1112
from cbbd.api.stats_api import StatsApi
1213
from cbbd.api.teams_api import TeamsApi
1314
from cbbd.api.venues_api import VenuesApi

cbbd/api/conferences_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/draft_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/games_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/lines_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/plays_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/rankings_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/ratings_api.py

+1-1
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.13.0
8+
The version of the OpenAPI document: 1.14.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

cbbd/api/recruiting_api.py

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

0 commit comments

Comments
 (0)