cbbd 1.1.2__tar.gz → 1.2.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. {cbbd-1.1.2 → cbbd-1.2.0}/PKG-INFO +1 -1
  2. {cbbd-1.1.2 → cbbd-1.2.0}/README.md +15 -7
  3. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/__init__.py +7 -2
  4. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/conferences_api.py +146 -2
  5. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/games_api.py +1 -1
  6. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/plays_api.py +1 -1
  7. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/stats_api.py +1 -1
  8. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/teams_api.py +150 -1
  9. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/venues_api.py +1 -1
  10. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api_client.py +2 -2
  11. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/configuration.py +3 -3
  12. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/exceptions.py +1 -1
  13. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/__init__.py +6 -1
  14. cbbd-1.2.0/cbbd/models/conference_history.py +90 -0
  15. cbbd-1.2.0/cbbd/models/conference_history_teams_inner.py +92 -0
  16. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/conference_info.py +1 -1
  17. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_box_score_players.py +1 -1
  18. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_box_score_players_players_inner.py +1 -1
  19. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_box_score_team.py +1 -1
  20. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_box_score_team_stats.py +1 -1
  21. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_box_score_team_stats_points.py +1 -1
  22. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_info.py +1 -1
  23. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_media_info.py +1 -1
  24. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_media_info_broadcasts_inner.py +1 -1
  25. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/game_status.py +1 -1
  26. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/play_info.py +1 -1
  27. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/play_info_participants_inner.py +1 -1
  28. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/play_type_info.py +1 -1
  29. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/player_season_stats.py +1 -1
  30. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/season_type.py +1 -1
  31. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_info.py +1 -1
  32. cbbd-1.2.0/cbbd/models/team_roster.py +95 -0
  33. cbbd-1.2.0/cbbd/models/team_roster_player.py +135 -0
  34. cbbd-1.2.0/cbbd/models/team_roster_player_hometown.py +91 -0
  35. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_stats.py +1 -1
  36. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats.py +1 -1
  37. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_field_goals.py +1 -1
  38. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_fouls.py +1 -1
  39. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_four_factors.py +1 -1
  40. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_points.py +1 -1
  41. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_rebounds.py +1 -1
  42. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/team_season_unit_stats_turnovers.py +1 -1
  43. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/models/venue_info.py +1 -1
  44. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/rest.py +1 -1
  45. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd.egg-info/PKG-INFO +1 -1
  46. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd.egg-info/SOURCES.txt +10 -0
  47. {cbbd-1.1.2 → cbbd-1.2.0}/pyproject.toml +1 -1
  48. {cbbd-1.1.2 → cbbd-1.2.0}/setup.py +2 -2
  49. cbbd-1.2.0/test/test_conference_history.py +80 -0
  50. cbbd-1.2.0/test/test_conference_history_teams_inner.py +64 -0
  51. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_conference_info.py +1 -1
  52. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_conferences_api.py +7 -1
  53. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_box_score_players.py +1 -1
  54. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_box_score_players_players_inner.py +1 -1
  55. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_box_score_team.py +1 -1
  56. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_box_score_team_stats.py +1 -1
  57. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_box_score_team_stats_points.py +1 -1
  58. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_info.py +1 -1
  59. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_media_info.py +1 -1
  60. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_media_info_broadcasts_inner.py +1 -1
  61. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_game_status.py +1 -1
  62. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_games_api.py +1 -1
  63. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_play_info.py +1 -1
  64. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_play_info_participants_inner.py +1 -1
  65. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_play_type_info.py +1 -1
  66. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_player_season_stats.py +1 -1
  67. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_plays_api.py +1 -1
  68. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_season_type.py +1 -1
  69. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_stats_api.py +1 -1
  70. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_info.py +1 -1
  71. cbbd-1.2.0/test/test_team_roster.py +100 -0
  72. cbbd-1.2.0/test/test_team_roster_player.py +84 -0
  73. cbbd-1.2.0/test/test_team_roster_player_hometown.py +58 -0
  74. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_stats.py +1 -1
  75. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats.py +1 -1
  76. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_field_goals.py +1 -1
  77. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_fouls.py +1 -1
  78. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_four_factors.py +1 -1
  79. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_points.py +1 -1
  80. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_rebounds.py +1 -1
  81. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_team_season_unit_stats_turnovers.py +1 -1
  82. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_teams_api.py +7 -1
  83. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_venue_info.py +1 -1
  84. {cbbd-1.1.2 → cbbd-1.2.0}/test/test_venues_api.py +1 -1
  85. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api/__init__.py +0 -0
  86. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/api_response.py +0 -0
  87. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd/py.typed +0 -0
  88. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd.egg-info/dependency_links.txt +0 -0
  89. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd.egg-info/requires.txt +0 -0
  90. {cbbd-1.1.2 → cbbd-1.2.0}/cbbd.egg-info/top_level.txt +0 -0
  91. {cbbd-1.1.2 → cbbd-1.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cbbd
3
- Version: 1.1.2
3
+ Version: 1.2.0
4
4
  Summary: College Basketball Data API
5
5
  Home-page: https://github.com/CFBD/cbbd-python
6
6
  Author-email: admin@collegefootballdata.com
@@ -3,8 +3,8 @@ This API is in limited Beta for Patreon subscribers. It may have bugs and is sub
3
3
 
4
4
  This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5
5
 
6
- - API version: 1.1.2
7
- - Package version: 1.1.2
6
+ - API version: 1.2.0
7
+ - Package version: 1.2.0
8
8
  - Generator version: 7.11.0
9
9
  - Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
10
10
 
@@ -16,9 +16,9 @@ Python 3.7+
16
16
  ### pip install
17
17
 
18
18
  ```sh
19
- pip install cbbd@1.1.2
19
+ pip install cbbd@1.2.0
20
20
  ```
21
- (you may need to run `pip` with root permission: `sudo pip install cbbd@1.1.2`)
21
+ (you may need to run `pip` with root permission: `sudo pip install cbbd@1.2.0`)
22
22
 
23
23
  Then import the package:
24
24
  ```python
@@ -57,13 +57,14 @@ configuration = cbbd.Configuration(
57
57
  with cbbd.ApiClient(configuration) as api_client:
58
58
  # Create an instance of the API class
59
59
  api_instance = cbbd.ConferencesApi(api_client)
60
+ conference = 'conference_example' # str | Optional conference abbreviation filter (optional)
60
61
 
61
62
  try:
62
- api_response = api_instance.get_conferences()
63
- print("The response of ConferencesApi->get_conferences:\n")
63
+ api_response = api_instance.get_conference_history(conference=conference)
64
+ print("The response of ConferencesApi->get_conference_history:\n")
64
65
  pprint(api_response)
65
66
  except ApiException as e:
66
- print("Exception when calling ConferencesApi->get_conferences: %s\n" % e)
67
+ print("Exception when calling ConferencesApi->get_conference_history: %s\n" % e)
67
68
 
68
69
  ```
69
70
 
@@ -73,6 +74,7 @@ All URIs are relative to *https://api.collegebasketballdata.com*
73
74
 
74
75
  Class | Method | HTTP request | Description
75
76
  ------------ | ------------- | ------------- | -------------
77
+ *ConferencesApi* | [**get_conference_history**](docs/ConferencesApi.md#get_conference_history) | **GET** /conferences/history |
76
78
  *ConferencesApi* | [**get_conferences**](docs/ConferencesApi.md#get_conferences) | **GET** /conferences |
77
79
  *GamesApi* | [**get_broadcasts**](docs/GamesApi.md#get_broadcasts) | **GET** /games/media |
78
80
  *GamesApi* | [**get_game_players**](docs/GamesApi.md#get_game_players) | **GET** /games/players |
@@ -85,12 +87,15 @@ Class | Method | HTTP request | Description
85
87
  *PlaysApi* | [**get_plays_by_team**](docs/PlaysApi.md#get_plays_by_team) | **GET** /plays/team |
86
88
  *StatsApi* | [**get_player_season_stats**](docs/StatsApi.md#get_player_season_stats) | **GET** /stats/player/season |
87
89
  *StatsApi* | [**get_team_season_stats**](docs/StatsApi.md#get_team_season_stats) | **GET** /stats/team/season |
90
+ *TeamsApi* | [**get_team_roster**](docs/TeamsApi.md#get_team_roster) | **GET** /teams/roster |
88
91
  *TeamsApi* | [**get_teams**](docs/TeamsApi.md#get_teams) | **GET** /teams |
89
92
  *VenuesApi* | [**get_venues**](docs/VenuesApi.md#get_venues) | **GET** /venues |
90
93
 
91
94
 
92
95
  ## Documentation For Models
93
96
 
97
+ - [ConferenceHistory](docs/ConferenceHistory.md)
98
+ - [ConferenceHistoryTeamsInner](docs/ConferenceHistoryTeamsInner.md)
94
99
  - [ConferenceInfo](docs/ConferenceInfo.md)
95
100
  - [GameBoxScorePlayers](docs/GameBoxScorePlayers.md)
96
101
  - [GameBoxScorePlayersPlayersInner](docs/GameBoxScorePlayersPlayersInner.md)
@@ -107,6 +112,9 @@ Class | Method | HTTP request | Description
107
112
  - [PlayerSeasonStats](docs/PlayerSeasonStats.md)
108
113
  - [SeasonType](docs/SeasonType.md)
109
114
  - [TeamInfo](docs/TeamInfo.md)
115
+ - [TeamRoster](docs/TeamRoster.md)
116
+ - [TeamRosterPlayer](docs/TeamRosterPlayer.md)
117
+ - [TeamRosterPlayerHometown](docs/TeamRosterPlayerHometown.md)
110
118
  - [TeamSeasonStats](docs/TeamSeasonStats.md)
111
119
  - [TeamSeasonUnitStats](docs/TeamSeasonUnitStats.md)
112
120
  - [TeamSeasonUnitStatsFieldGoals](docs/TeamSeasonUnitStatsFieldGoals.md)
@@ -7,7 +7,7 @@
7
7
 
8
8
  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.
9
9
 
10
- The version of the OpenAPI document: 1.1.2
10
+ The version of the OpenAPI document: 1.2.0
11
11
  Contact: admin@collegefootballdata.com
12
12
  Generated by OpenAPI Generator (https://openapi-generator.tech)
13
13
 
@@ -15,7 +15,7 @@
15
15
  """ # noqa: E501
16
16
 
17
17
 
18
- __version__ = "1.1.2"
18
+ __version__ = "1.2.0"
19
19
 
20
20
  # import apis into sdk package
21
21
  from cbbd.api.conferences_api import ConferencesApi
@@ -37,6 +37,8 @@ from cbbd.exceptions import ApiAttributeError
37
37
  from cbbd.exceptions import ApiException
38
38
 
39
39
  # import models into sdk package
40
+ from cbbd.models.conference_history import ConferenceHistory
41
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
40
42
  from cbbd.models.conference_info import ConferenceInfo
41
43
  from cbbd.models.game_box_score_players import GameBoxScorePlayers
42
44
  from cbbd.models.game_box_score_players_players_inner import GameBoxScorePlayersPlayersInner
@@ -53,6 +55,9 @@ from cbbd.models.play_type_info import PlayTypeInfo
53
55
  from cbbd.models.player_season_stats import PlayerSeasonStats
54
56
  from cbbd.models.season_type import SeasonType
55
57
  from cbbd.models.team_info import TeamInfo
58
+ from cbbd.models.team_roster import TeamRoster
59
+ from cbbd.models.team_roster_player import TeamRosterPlayer
60
+ from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
56
61
  from cbbd.models.team_season_stats import TeamSeasonStats
57
62
  from cbbd.models.team_season_unit_stats import TeamSeasonUnitStats
58
63
  from cbbd.models.team_season_unit_stats_field_goals import TeamSeasonUnitStatsFieldGoals
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -19,8 +19,12 @@ import warnings
19
19
 
20
20
  from pydantic import validate_arguments, ValidationError
21
21
 
22
- from typing import List
22
+ from typing_extensions import Annotated
23
+ from pydantic import Field, StrictStr
23
24
 
25
+ from typing import List, Optional
26
+
27
+ from cbbd.models.conference_history import ConferenceHistory
24
28
  from cbbd.models.conference_info import ConferenceInfo
25
29
 
26
30
  from cbbd.api_client import ApiClient
@@ -43,6 +47,146 @@ class ConferencesApi:
43
47
  api_client = ApiClient.get_default()
44
48
  self.api_client = api_client
45
49
 
50
+ @validate_arguments
51
+ def get_conference_history(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> List[ConferenceHistory]: # noqa: E501
52
+ """get_conference_history # noqa: E501
53
+
54
+ Retrieves historical conference membership information # 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_conference_history(conference, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param conference: Optional conference abbreviation filter
62
+ :type conference: str
63
+ :param async_req: Whether to execute the request asynchronously.
64
+ :type async_req: bool, optional
65
+ :param _request_timeout: timeout setting for this request.
66
+ If one number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :return: Returns the result object.
70
+ If the method is called asynchronously,
71
+ returns the request thread.
72
+ :rtype: List[ConferenceHistory]
73
+ """
74
+ kwargs['_return_http_data_only'] = True
75
+ if '_preload_content' in kwargs:
76
+ message = "Error! Please call the get_conference_history_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
77
+ raise ValueError(message)
78
+ return self.get_conference_history_with_http_info(conference, **kwargs) # noqa: E501
79
+
80
+ @validate_arguments
81
+ def get_conference_history_with_http_info(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
82
+ """get_conference_history # noqa: E501
83
+
84
+ Retrieves historical conference membership information # noqa: E501
85
+ This method makes a synchronous HTTP request by default. To make an
86
+ asynchronous HTTP request, please pass async_req=True
87
+
88
+ >>> thread = api.get_conference_history_with_http_info(conference, async_req=True)
89
+ >>> result = thread.get()
90
+
91
+ :param conference: Optional conference abbreviation filter
92
+ :type conference: str
93
+ :param async_req: Whether to execute the request asynchronously.
94
+ :type async_req: bool, optional
95
+ :param _preload_content: if False, the ApiResponse.data will
96
+ be set to none and raw_data will store the
97
+ HTTP response body without reading/decoding.
98
+ Default is True.
99
+ :type _preload_content: bool, optional
100
+ :param _return_http_data_only: response data instead of ApiResponse
101
+ object with status code, headers, etc
102
+ :type _return_http_data_only: bool, optional
103
+ :param _request_timeout: timeout setting for this request. If one
104
+ number provided, it will be total request
105
+ timeout. It can also be a pair (tuple) of
106
+ (connection, read) timeouts.
107
+ :param _request_auth: set to override the auth_settings for an a single
108
+ request; this effectively ignores the authentication
109
+ in the spec for a single request.
110
+ :type _request_auth: dict, optional
111
+ :type _content_type: string, optional: force content-type for the request
112
+ :return: Returns the result object.
113
+ If the method is called asynchronously,
114
+ returns the request thread.
115
+ :rtype: tuple(List[ConferenceHistory], status_code(int), headers(HTTPHeaderDict))
116
+ """
117
+
118
+ _params = locals()
119
+
120
+ _all_params = [
121
+ 'conference'
122
+ ]
123
+ _all_params.extend(
124
+ [
125
+ 'async_req',
126
+ '_return_http_data_only',
127
+ '_preload_content',
128
+ '_request_timeout',
129
+ '_request_auth',
130
+ '_content_type',
131
+ '_headers'
132
+ ]
133
+ )
134
+
135
+ # validate the arguments
136
+ for _key, _val in _params['kwargs'].items():
137
+ if _key not in _all_params:
138
+ raise ApiTypeError(
139
+ "Got an unexpected keyword argument '%s'"
140
+ " to method get_conference_history" % _key
141
+ )
142
+ _params[_key] = _val
143
+ del _params['kwargs']
144
+
145
+ _collection_formats = {}
146
+
147
+ # process the path parameters
148
+ _path_params = {}
149
+
150
+ # process the query parameters
151
+ _query_params = []
152
+ if _params.get('conference') is not None: # noqa: E501
153
+ _query_params.append(('conference', _params['conference']))
154
+
155
+ # process the header parameters
156
+ _header_params = dict(_params.get('_headers', {}))
157
+ # process the form parameters
158
+ _form_params = []
159
+ _files = {}
160
+ # process the body parameter
161
+ _body_params = None
162
+ # set the HTTP header `Accept`
163
+ _header_params['Accept'] = self.api_client.select_header_accept(
164
+ ['application/json']) # noqa: E501
165
+
166
+ # authentication setting
167
+ _auth_settings = ['apiKey'] # noqa: E501
168
+
169
+ _response_types_map = {
170
+ '200': "List[ConferenceHistory]",
171
+ }
172
+
173
+ return self.api_client.call_api(
174
+ '/conferences/history', 'GET',
175
+ _path_params,
176
+ _query_params,
177
+ _header_params,
178
+ body=_body_params,
179
+ post_params=_form_params,
180
+ files=_files,
181
+ response_types_map=_response_types_map,
182
+ auth_settings=_auth_settings,
183
+ async_req=_params.get('async_req'),
184
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
185
+ _preload_content=_params.get('_preload_content', True),
186
+ _request_timeout=_params.get('_request_timeout'),
187
+ collection_formats=_collection_formats,
188
+ _request_auth=_params.get('_request_auth'))
189
+
46
190
  @validate_arguments
47
191
  def get_conferences(self, **kwargs) -> List[ConferenceInfo]: # noqa: E501
48
192
  """get_conferences # noqa: E501
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -25,6 +25,7 @@ from pydantic import Field, StrictInt, StrictStr
25
25
  from typing import List, Optional
26
26
 
27
27
  from cbbd.models.team_info import TeamInfo
28
+ from cbbd.models.team_roster import TeamRoster
28
29
 
29
30
  from cbbd.api_client import ApiClient
30
31
  from cbbd.api_response import ApiResponse
@@ -46,6 +47,154 @@ class TeamsApi:
46
47
  api_client = ApiClient.get_default()
47
48
  self.api_client = api_client
48
49
 
50
+ @validate_arguments
51
+ def get_team_roster(self, season : Annotated[StrictInt, Field(..., description="Season filter")], team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, **kwargs) -> List[TeamRoster]: # noqa: E501
52
+ """get_team_roster # noqa: E501
53
+
54
+ Retrieves team roster information # 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_team_roster(season, team, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param season: Season filter (required)
62
+ :type season: int
63
+ :param team: Optional team filter
64
+ :type team: str
65
+ :param async_req: Whether to execute the request asynchronously.
66
+ :type async_req: bool, optional
67
+ :param _request_timeout: timeout setting for this request.
68
+ If one number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :return: Returns the result object.
72
+ If the method is called asynchronously,
73
+ returns the request thread.
74
+ :rtype: List[TeamRoster]
75
+ """
76
+ kwargs['_return_http_data_only'] = True
77
+ if '_preload_content' in kwargs:
78
+ message = "Error! Please call the get_team_roster_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
79
+ raise ValueError(message)
80
+ return self.get_team_roster_with_http_info(season, team, **kwargs) # noqa: E501
81
+
82
+ @validate_arguments
83
+ def get_team_roster_with_http_info(self, season : Annotated[StrictInt, Field(..., description="Season filter")], team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
84
+ """get_team_roster # noqa: E501
85
+
86
+ Retrieves team roster information # noqa: E501
87
+ This method makes a synchronous HTTP request by default. To make an
88
+ asynchronous HTTP request, please pass async_req=True
89
+
90
+ >>> thread = api.get_team_roster_with_http_info(season, team, async_req=True)
91
+ >>> result = thread.get()
92
+
93
+ :param season: Season filter (required)
94
+ :type season: int
95
+ :param team: Optional team filter
96
+ :type team: str
97
+ :param async_req: Whether to execute the request asynchronously.
98
+ :type async_req: bool, optional
99
+ :param _preload_content: if False, the ApiResponse.data will
100
+ be set to none and raw_data will store the
101
+ HTTP response body without reading/decoding.
102
+ Default is True.
103
+ :type _preload_content: bool, optional
104
+ :param _return_http_data_only: response data instead of ApiResponse
105
+ object with status code, headers, etc
106
+ :type _return_http_data_only: bool, optional
107
+ :param _request_timeout: timeout setting for this request. If one
108
+ number provided, it will be total request
109
+ timeout. It can also be a pair (tuple) of
110
+ (connection, read) timeouts.
111
+ :param _request_auth: set to override the auth_settings for an a single
112
+ request; this effectively ignores the authentication
113
+ in the spec for a single request.
114
+ :type _request_auth: dict, optional
115
+ :type _content_type: string, optional: force content-type for the request
116
+ :return: Returns the result object.
117
+ If the method is called asynchronously,
118
+ returns the request thread.
119
+ :rtype: tuple(List[TeamRoster], status_code(int), headers(HTTPHeaderDict))
120
+ """
121
+
122
+ _params = locals()
123
+
124
+ _all_params = [
125
+ 'season',
126
+ 'team'
127
+ ]
128
+ _all_params.extend(
129
+ [
130
+ 'async_req',
131
+ '_return_http_data_only',
132
+ '_preload_content',
133
+ '_request_timeout',
134
+ '_request_auth',
135
+ '_content_type',
136
+ '_headers'
137
+ ]
138
+ )
139
+
140
+ # validate the arguments
141
+ for _key, _val in _params['kwargs'].items():
142
+ if _key not in _all_params:
143
+ raise ApiTypeError(
144
+ "Got an unexpected keyword argument '%s'"
145
+ " to method get_team_roster" % _key
146
+ )
147
+ _params[_key] = _val
148
+ del _params['kwargs']
149
+
150
+ _collection_formats = {}
151
+
152
+ # process the path parameters
153
+ _path_params = {}
154
+
155
+ # process the query parameters
156
+ _query_params = []
157
+ if _params.get('season') is not None: # noqa: E501
158
+ _query_params.append(('season', _params['season']))
159
+
160
+ if _params.get('team') is not None: # noqa: E501
161
+ _query_params.append(('team', _params['team']))
162
+
163
+ # process the header parameters
164
+ _header_params = dict(_params.get('_headers', {}))
165
+ # process the form parameters
166
+ _form_params = []
167
+ _files = {}
168
+ # process the body parameter
169
+ _body_params = None
170
+ # set the HTTP header `Accept`
171
+ _header_params['Accept'] = self.api_client.select_header_accept(
172
+ ['application/json']) # noqa: E501
173
+
174
+ # authentication setting
175
+ _auth_settings = ['apiKey'] # noqa: E501
176
+
177
+ _response_types_map = {
178
+ '200': "List[TeamRoster]",
179
+ }
180
+
181
+ return self.api_client.call_api(
182
+ '/teams/roster', 'GET',
183
+ _path_params,
184
+ _query_params,
185
+ _header_params,
186
+ body=_body_params,
187
+ post_params=_form_params,
188
+ files=_files,
189
+ response_types_map=_response_types_map,
190
+ auth_settings=_auth_settings,
191
+ async_req=_params.get('async_req'),
192
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
193
+ _preload_content=_params.get('_preload_content', True),
194
+ _request_timeout=_params.get('_request_timeout'),
195
+ collection_formats=_collection_formats,
196
+ _request_auth=_params.get('_request_auth'))
197
+
49
198
  @validate_arguments
50
199
  def get_teams(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference filter")] = None, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, **kwargs) -> List[TeamInfo]: # noqa: E501
51
200
  """get_teams # noqa: E501
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -78,7 +78,7 @@ class ApiClient:
78
78
  self.default_headers[header_name] = header_value
79
79
  self.cookie = cookie
80
80
  # Set default User-Agent.
81
- self.user_agent = 'OpenAPI-Generator/1.1.2/python'
81
+ self.user_agent = 'OpenAPI-Generator/1.2.0/python'
82
82
  self.client_side_validation = configuration.client_side_validation
83
83
 
84
84
  def __enter__(self):
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -376,8 +376,8 @@ class Configuration:
376
376
  return "Python SDK Debug Report:\n"\
377
377
  "OS: {env}\n"\
378
378
  "Python Version: {pyversion}\n"\
379
- "Version of the API: 1.1.2\n"\
380
- "SDK Package Version: 1.1.2".\
379
+ "Version of the API: 1.2.0\n"\
380
+ "SDK Package Version: 1.2.0".\
381
381
  format(env=sys.platform, pyversion=sys.version)
382
382
 
383
383
  def get_host_settings(self):
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.2
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  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.
8
8
 
9
- The version of the OpenAPI document: 1.1.2
9
+ The version of the OpenAPI document: 1.2.0
10
10
  Contact: admin@collegefootballdata.com
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
@@ -15,6 +15,8 @@
15
15
 
16
16
 
17
17
  # import models into model package
18
+ from cbbd.models.conference_history import ConferenceHistory
19
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
18
20
  from cbbd.models.conference_info import ConferenceInfo
19
21
  from cbbd.models.game_box_score_players import GameBoxScorePlayers
20
22
  from cbbd.models.game_box_score_players_players_inner import GameBoxScorePlayersPlayersInner
@@ -31,6 +33,9 @@ from cbbd.models.play_type_info import PlayTypeInfo
31
33
  from cbbd.models.player_season_stats import PlayerSeasonStats
32
34
  from cbbd.models.season_type import SeasonType
33
35
  from cbbd.models.team_info import TeamInfo
36
+ from cbbd.models.team_roster import TeamRoster
37
+ from cbbd.models.team_roster_player import TeamRosterPlayer
38
+ from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
34
39
  from cbbd.models.team_season_stats import TeamSeasonStats
35
40
  from cbbd.models.team_season_unit_stats import TeamSeasonUnitStats
36
41
  from cbbd.models.team_season_unit_stats_field_goals import TeamSeasonUnitStatsFieldGoals
@@ -0,0 +1,90 @@
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.2.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
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+
22
+ from typing import List
23
+ from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
24
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
25
+
26
+ class ConferenceHistory(BaseModel):
27
+ """
28
+ ConferenceHistory
29
+ """
30
+ id: StrictInt = Field(...)
31
+ source_id: StrictStr = Field(default=..., alias="sourceId")
32
+ name: StrictStr = Field(...)
33
+ abbreviation: StrictStr = Field(...)
34
+ short_name: StrictStr = Field(default=..., alias="shortName")
35
+ teams: conlist(ConferenceHistoryTeamsInner) = Field(...)
36
+ __properties = ["id", "sourceId", "name", "abbreviation", "shortName", "teams"]
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> ConferenceHistory:
53
+ """Create an instance of ConferenceHistory from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ # override the default output from pydantic by calling `to_dict()` of each item in teams (list)
63
+ _items = []
64
+ if self.teams:
65
+ for _item in self.teams:
66
+ if _item:
67
+ _items.append(_item.to_dict())
68
+ _dict['teams'] = _items
69
+ return _dict
70
+
71
+ @classmethod
72
+ def from_dict(cls, obj: dict) -> ConferenceHistory:
73
+ """Create an instance of ConferenceHistory from a dict"""
74
+ if obj is None:
75
+ return None
76
+
77
+ if not isinstance(obj, dict):
78
+ return ConferenceHistory.parse_obj(obj)
79
+
80
+ _obj = ConferenceHistory.parse_obj({
81
+ "id": obj.get("id"),
82
+ "source_id": obj.get("sourceId"),
83
+ "name": obj.get("name"),
84
+ "abbreviation": obj.get("abbreviation"),
85
+ "short_name": obj.get("shortName"),
86
+ "teams": [ConferenceHistoryTeamsInner.from_dict(_item) for _item in obj.get("teams")] if obj.get("teams") is not None else None
87
+ })
88
+ return _obj
89
+
90
+