victorycode-sdk 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- victorycode_sdk/__init__.py +260 -0
- victorycode_sdk/api/__init__.py +13 -0
- victorycode_sdk/api/authentication_api.py +285 -0
- victorycode_sdk/api/classification_api.py +1203 -0
- victorycode_sdk/api/game_recap_api.py +1395 -0
- victorycode_sdk/api/games_api.py +1497 -0
- victorycode_sdk/api/mascot_api.py +1203 -0
- victorycode_sdk/api/plays_events_api.py +1057 -0
- victorycode_sdk/api/teams_api.py +1220 -0
- victorycode_sdk/api/uploads_api.py +872 -0
- victorycode_sdk/api/venue_api.py +1203 -0
- victorycode_sdk/api_client.py +833 -0
- victorycode_sdk/api_response.py +21 -0
- victorycode_sdk/configuration.py +698 -0
- victorycode_sdk/exceptions.py +218 -0
- victorycode_sdk/models/__init__.py +114 -0
- victorycode_sdk/models/add_video_to_game_with_s3_link_dto.py +90 -0
- victorycode_sdk/models/address.py +96 -0
- victorycode_sdk/models/address_dto.py +96 -0
- victorycode_sdk/models/bad_request_error_response_dto.py +90 -0
- victorycode_sdk/models/classification.py +90 -0
- victorycode_sdk/models/client_create_game_with_video_url_dto.py +130 -0
- victorycode_sdk/models/complete_multipart_upload_dto.py +97 -0
- victorycode_sdk/models/complete_multipart_upload_response.py +90 -0
- victorycode_sdk/models/complete_multipart_upload_response_dto.py +94 -0
- victorycode_sdk/models/completed_part_dto.py +90 -0
- victorycode_sdk/models/conflict_error_response_dto.py +90 -0
- victorycode_sdk/models/coordinates.py +90 -0
- victorycode_sdk/models/coordinates_dto.py +90 -0
- victorycode_sdk/models/create_classification_dto.py +90 -0
- victorycode_sdk/models/create_mascot_dto.py +90 -0
- victorycode_sdk/models/create_team_dto.py +108 -0
- victorycode_sdk/models/create_team_response_dto.py +106 -0
- victorycode_sdk/models/create_venue_dto.py +102 -0
- victorycode_sdk/models/defense_section_dto.py +101 -0
- victorycode_sdk/models/defense_stats_dto.py +106 -0
- victorycode_sdk/models/defense_totals_dto.py +100 -0
- victorycode_sdk/models/delete_response_dto.py +90 -0
- victorycode_sdk/models/down_efficiency_dto.py +90 -0
- victorycode_sdk/models/fetch_team_response_dto.py +117 -0
- victorycode_sdk/models/fumble_section_dto.py +101 -0
- victorycode_sdk/models/fumble_stats_dto.py +98 -0
- victorycode_sdk/models/fumble_totals_dto.py +92 -0
- victorycode_sdk/models/game_all_play_list_item_dto.py +106 -0
- victorycode_sdk/models/game_box_score_meta_dto.py +104 -0
- victorycode_sdk/models/game_box_score_response_dto.py +98 -0
- victorycode_sdk/models/game_box_score_teams_dto.py +97 -0
- victorycode_sdk/models/game_details_response.py +108 -0
- victorycode_sdk/models/game_recap_scoring_summary_pro_response.py +101 -0
- victorycode_sdk/models/game_recap_scoring_summary_response.py +101 -0
- victorycode_sdk/models/game_recap_team_stats_response.py +101 -0
- victorycode_sdk/models/game_score_response.py +101 -0
- victorycode_sdk/models/game_scoring_summary_data_dto.py +104 -0
- victorycode_sdk/models/get_parts_presign_url_response.py +88 -0
- victorycode_sdk/models/get_parts_presign_url_response_dto.py +94 -0
- victorycode_sdk/models/initiate_multipart_upload_dto.py +92 -0
- victorycode_sdk/models/initiate_multipart_upload_response.py +88 -0
- victorycode_sdk/models/initiate_multipart_upload_response_dto.py +94 -0
- victorycode_sdk/models/interception_section_dto.py +101 -0
- victorycode_sdk/models/interception_stats_dto.py +98 -0
- victorycode_sdk/models/interception_totals_dto.py +92 -0
- victorycode_sdk/models/kicking_section_dto.py +101 -0
- victorycode_sdk/models/kicking_stats_dto.py +106 -0
- victorycode_sdk/models/kicking_totals_dto.py +100 -0
- victorycode_sdk/models/line_of_scrimmage_dto.py +90 -0
- victorycode_sdk/models/list_classification_paginated_response_dto.py +101 -0
- victorycode_sdk/models/list_game_all_plays_response_dto.py +103 -0
- victorycode_sdk/models/list_games_paginated_response_dto.py +101 -0
- victorycode_sdk/models/list_mascot_paginated_response_dto.py +101 -0
- victorycode_sdk/models/list_play_clips_response_dto.py +105 -0
- victorycode_sdk/models/list_team_paginated_response_dto.py +101 -0
- victorycode_sdk/models/list_venue_paginated_response_dto.py +101 -0
- victorycode_sdk/models/list_video_paginated_response_dto.py +103 -0
- victorycode_sdk/models/mascot.py +90 -0
- victorycode_sdk/models/mascot_response_dto.py +96 -0
- victorycode_sdk/models/not_found_error_response_dto.py +90 -0
- victorycode_sdk/models/offense_dto.py +92 -0
- victorycode_sdk/models/passing_dto.py +98 -0
- victorycode_sdk/models/passing_section_dto.py +101 -0
- victorycode_sdk/models/passing_stats_dto.py +117 -0
- victorycode_sdk/models/passing_totals_dto.py +111 -0
- victorycode_sdk/models/period_score_dto.py +94 -0
- victorycode_sdk/models/play_attributes_list_dto.py +106 -0
- victorycode_sdk/models/play_clip_list_details_dto.py +104 -0
- victorycode_sdk/models/play_clip_list_item_dto.py +104 -0
- victorycode_sdk/models/pro_scoring_play_dto.py +202 -0
- victorycode_sdk/models/receiving_section_dto.py +101 -0
- victorycode_sdk/models/receiving_stats_dto.py +104 -0
- victorycode_sdk/models/receiving_totals_dto.py +98 -0
- victorycode_sdk/models/red_zone_dto.py +90 -0
- victorycode_sdk/models/rushing_dto.py +92 -0
- victorycode_sdk/models/rushing_section_dto.py +101 -0
- victorycode_sdk/models/rushing_stats_dto.py +102 -0
- victorycode_sdk/models/rushing_totals_dto.py +96 -0
- victorycode_sdk/models/scoring_play_player_involved_dto.py +106 -0
- victorycode_sdk/models/scoring_summary_pro_team_dto.py +90 -0
- victorycode_sdk/models/single_classification_response_dto.py +94 -0
- victorycode_sdk/models/single_mascot_response_dto.py +94 -0
- victorycode_sdk/models/single_team_response_dto.py +94 -0
- victorycode_sdk/models/single_venue_response_dto.py +99 -0
- victorycode_sdk/models/single_video_response_dto.py +94 -0
- victorycode_sdk/models/team_basic_info_dto.py +96 -0
- victorycode_sdk/models/team_box_score_dto.py +139 -0
- victorycode_sdk/models/team_score_dto.py +109 -0
- victorycode_sdk/models/team_stats_dto.py +137 -0
- victorycode_sdk/models/token_response.py +92 -0
- victorycode_sdk/models/turnovers_dto.py +92 -0
- victorycode_sdk/models/unauthorized_error_response_dto.py +90 -0
- victorycode_sdk/models/update_classification_dto.py +90 -0
- victorycode_sdk/models/update_mascot_dto.py +90 -0
- victorycode_sdk/models/update_team_dto.py +108 -0
- victorycode_sdk/models/update_venue_dto.py +102 -0
- victorycode_sdk/models/venue.py +102 -0
- victorycode_sdk/models/video_list_item_dto.py +96 -0
- victorycode_sdk/py.typed +0 -0
- victorycode_sdk/rest.py +334 -0
- victorycode_sdk-1.0.0.dist-info/METADATA +288 -0
- victorycode_sdk-1.0.0.dist-info/RECORD +121 -0
- victorycode_sdk-1.0.0.dist-info/WHEEL +5 -0
- victorycode_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
- victorycode_sdk-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1220 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Victory Code Client API
|
|
3
|
+
|
|
4
|
+
Client APIs for Tactix partners: authenticate, upload game video, and retrieve games, plays, game recaps and team metadata.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from victorycode_sdk.models.create_team_dto import CreateTeamDto
|
|
22
|
+
from victorycode_sdk.models.delete_response_dto import DeleteResponseDto
|
|
23
|
+
from victorycode_sdk.models.list_team_paginated_response_dto import ListTeamPaginatedResponseDto
|
|
24
|
+
from victorycode_sdk.models.single_team_response_dto import SingleTeamResponseDto
|
|
25
|
+
from victorycode_sdk.models.update_team_dto import UpdateTeamDto
|
|
26
|
+
|
|
27
|
+
from victorycode_sdk.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from victorycode_sdk.api_response import ApiResponse
|
|
29
|
+
from victorycode_sdk.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TeamsApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def create_team(
|
|
47
|
+
self,
|
|
48
|
+
create_team_dto: CreateTeamDto,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> SingleTeamResponseDto:
|
|
62
|
+
"""Create a new team
|
|
63
|
+
|
|
64
|
+
Registers a new team in the system, including its name, short name, sport, mascots, classification.
|
|
65
|
+
|
|
66
|
+
:param create_team_dto: (required)
|
|
67
|
+
:type create_team_dto: CreateTeamDto
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._create_team_serialize(
|
|
91
|
+
create_team_dto=create_team_dto,
|
|
92
|
+
_request_auth=_request_auth,
|
|
93
|
+
_content_type=_content_type,
|
|
94
|
+
_headers=_headers,
|
|
95
|
+
_host_index=_host_index
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
+
'201': "SingleTeamResponseDto",
|
|
100
|
+
'400': "BadRequestErrorResponseDto",
|
|
101
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
102
|
+
'409': "ConflictErrorResponseDto",
|
|
103
|
+
}
|
|
104
|
+
response_data = self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
def create_team_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
create_team_dto: CreateTeamDto,
|
|
119
|
+
_request_timeout: Union[
|
|
120
|
+
None,
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Tuple[
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
|
+
) -> ApiResponse[SingleTeamResponseDto]:
|
|
132
|
+
"""Create a new team
|
|
133
|
+
|
|
134
|
+
Registers a new team in the system, including its name, short name, sport, mascots, classification.
|
|
135
|
+
|
|
136
|
+
:param create_team_dto: (required)
|
|
137
|
+
:type create_team_dto: CreateTeamDto
|
|
138
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
139
|
+
number provided, it will be total request
|
|
140
|
+
timeout. It can also be a pair (tuple) of
|
|
141
|
+
(connection, read) timeouts.
|
|
142
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
143
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
144
|
+
request; this effectively ignores the
|
|
145
|
+
authentication in the spec for a single request.
|
|
146
|
+
:type _request_auth: dict, optional
|
|
147
|
+
:param _content_type: force content-type for the request.
|
|
148
|
+
:type _content_type: str, Optional
|
|
149
|
+
:param _headers: set to override the headers for a single
|
|
150
|
+
request; this effectively ignores the headers
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _headers: dict, optional
|
|
153
|
+
:param _host_index: set to override the host_index for a single
|
|
154
|
+
request; this effectively ignores the host_index
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _host_index: int, optional
|
|
157
|
+
:return: Returns the result object.
|
|
158
|
+
""" # noqa: E501
|
|
159
|
+
|
|
160
|
+
_param = self._create_team_serialize(
|
|
161
|
+
create_team_dto=create_team_dto,
|
|
162
|
+
_request_auth=_request_auth,
|
|
163
|
+
_content_type=_content_type,
|
|
164
|
+
_headers=_headers,
|
|
165
|
+
_host_index=_host_index
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
169
|
+
'201': "SingleTeamResponseDto",
|
|
170
|
+
'400': "BadRequestErrorResponseDto",
|
|
171
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
172
|
+
'409': "ConflictErrorResponseDto",
|
|
173
|
+
}
|
|
174
|
+
response_data = self.api_client.call_api(
|
|
175
|
+
*_param,
|
|
176
|
+
_request_timeout=_request_timeout
|
|
177
|
+
)
|
|
178
|
+
response_data.read()
|
|
179
|
+
return self.api_client.response_deserialize(
|
|
180
|
+
response_data=response_data,
|
|
181
|
+
response_types_map=_response_types_map,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@validate_call
|
|
186
|
+
def create_team_without_preload_content(
|
|
187
|
+
self,
|
|
188
|
+
create_team_dto: CreateTeamDto,
|
|
189
|
+
_request_timeout: Union[
|
|
190
|
+
None,
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Tuple[
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_content_type: Optional[StrictStr] = None,
|
|
199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
201
|
+
) -> RESTResponseType:
|
|
202
|
+
"""Create a new team
|
|
203
|
+
|
|
204
|
+
Registers a new team in the system, including its name, short name, sport, mascots, classification.
|
|
205
|
+
|
|
206
|
+
:param create_team_dto: (required)
|
|
207
|
+
:type create_team_dto: CreateTeamDto
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._create_team_serialize(
|
|
231
|
+
create_team_dto=create_team_dto,
|
|
232
|
+
_request_auth=_request_auth,
|
|
233
|
+
_content_type=_content_type,
|
|
234
|
+
_headers=_headers,
|
|
235
|
+
_host_index=_host_index
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
+
'201': "SingleTeamResponseDto",
|
|
240
|
+
'400': "BadRequestErrorResponseDto",
|
|
241
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
242
|
+
'409': "ConflictErrorResponseDto",
|
|
243
|
+
}
|
|
244
|
+
response_data = self.api_client.call_api(
|
|
245
|
+
*_param,
|
|
246
|
+
_request_timeout=_request_timeout
|
|
247
|
+
)
|
|
248
|
+
return response_data.response
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def _create_team_serialize(
|
|
252
|
+
self,
|
|
253
|
+
create_team_dto,
|
|
254
|
+
_request_auth,
|
|
255
|
+
_content_type,
|
|
256
|
+
_headers,
|
|
257
|
+
_host_index,
|
|
258
|
+
) -> RequestSerialized:
|
|
259
|
+
|
|
260
|
+
_host = None
|
|
261
|
+
|
|
262
|
+
_collection_formats: Dict[str, str] = {
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_path_params: Dict[str, str] = {}
|
|
266
|
+
_query_params: List[Tuple[str, str]] = []
|
|
267
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
268
|
+
_form_params: List[Tuple[str, str]] = []
|
|
269
|
+
_files: Dict[
|
|
270
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
271
|
+
] = {}
|
|
272
|
+
_body_params: Optional[bytes] = None
|
|
273
|
+
|
|
274
|
+
# process the path parameters
|
|
275
|
+
# process the query parameters
|
|
276
|
+
# process the header parameters
|
|
277
|
+
# process the form parameters
|
|
278
|
+
# process the body parameter
|
|
279
|
+
if create_team_dto is not None:
|
|
280
|
+
_body_params = create_team_dto
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
# set the HTTP header `Accept`
|
|
284
|
+
if 'Accept' not in _header_params:
|
|
285
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
286
|
+
[
|
|
287
|
+
'application/json'
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
# set the HTTP header `Content-Type`
|
|
292
|
+
if _content_type:
|
|
293
|
+
_header_params['Content-Type'] = _content_type
|
|
294
|
+
else:
|
|
295
|
+
_default_content_type = (
|
|
296
|
+
self.api_client.select_header_content_type(
|
|
297
|
+
[
|
|
298
|
+
'application/json'
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
)
|
|
302
|
+
if _default_content_type is not None:
|
|
303
|
+
_header_params['Content-Type'] = _default_content_type
|
|
304
|
+
|
|
305
|
+
# authentication setting
|
|
306
|
+
_auth_settings: List[str] = [
|
|
307
|
+
'Client-App-Token',
|
|
308
|
+
'Client-App-Id'
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
return self.api_client.param_serialize(
|
|
312
|
+
method='POST',
|
|
313
|
+
resource_path='/api/v1/client/teams',
|
|
314
|
+
path_params=_path_params,
|
|
315
|
+
query_params=_query_params,
|
|
316
|
+
header_params=_header_params,
|
|
317
|
+
body=_body_params,
|
|
318
|
+
post_params=_form_params,
|
|
319
|
+
files=_files,
|
|
320
|
+
auth_settings=_auth_settings,
|
|
321
|
+
collection_formats=_collection_formats,
|
|
322
|
+
_host=_host,
|
|
323
|
+
_request_auth=_request_auth
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@validate_call
|
|
330
|
+
def delete_team(
|
|
331
|
+
self,
|
|
332
|
+
id: StrictStr,
|
|
333
|
+
_request_timeout: Union[
|
|
334
|
+
None,
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Tuple[
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
339
|
+
]
|
|
340
|
+
] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
) -> DeleteResponseDto:
|
|
346
|
+
"""Delete a team
|
|
347
|
+
|
|
348
|
+
Permanently deletes a team record from the system.
|
|
349
|
+
|
|
350
|
+
:param id: (required)
|
|
351
|
+
:type id: str
|
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
353
|
+
number provided, it will be total request
|
|
354
|
+
timeout. It can also be a pair (tuple) of
|
|
355
|
+
(connection, read) timeouts.
|
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
358
|
+
request; this effectively ignores the
|
|
359
|
+
authentication in the spec for a single request.
|
|
360
|
+
:type _request_auth: dict, optional
|
|
361
|
+
:param _content_type: force content-type for the request.
|
|
362
|
+
:type _content_type: str, Optional
|
|
363
|
+
:param _headers: set to override the headers for a single
|
|
364
|
+
request; this effectively ignores the headers
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _headers: dict, optional
|
|
367
|
+
:param _host_index: set to override the host_index for a single
|
|
368
|
+
request; this effectively ignores the host_index
|
|
369
|
+
in the spec for a single request.
|
|
370
|
+
:type _host_index: int, optional
|
|
371
|
+
:return: Returns the result object.
|
|
372
|
+
""" # noqa: E501
|
|
373
|
+
|
|
374
|
+
_param = self._delete_team_serialize(
|
|
375
|
+
id=id,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'200': "DeleteResponseDto",
|
|
384
|
+
'400': "BadRequestErrorResponseDto",
|
|
385
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
386
|
+
'404': "NotFoundErrorResponseDto",
|
|
387
|
+
}
|
|
388
|
+
response_data = self.api_client.call_api(
|
|
389
|
+
*_param,
|
|
390
|
+
_request_timeout=_request_timeout
|
|
391
|
+
)
|
|
392
|
+
response_data.read()
|
|
393
|
+
return self.api_client.response_deserialize(
|
|
394
|
+
response_data=response_data,
|
|
395
|
+
response_types_map=_response_types_map,
|
|
396
|
+
).data
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
@validate_call
|
|
400
|
+
def delete_team_with_http_info(
|
|
401
|
+
self,
|
|
402
|
+
id: StrictStr,
|
|
403
|
+
_request_timeout: Union[
|
|
404
|
+
None,
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Tuple[
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
409
|
+
]
|
|
410
|
+
] = None,
|
|
411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_content_type: Optional[StrictStr] = None,
|
|
413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
415
|
+
) -> ApiResponse[DeleteResponseDto]:
|
|
416
|
+
"""Delete a team
|
|
417
|
+
|
|
418
|
+
Permanently deletes a team record from the system.
|
|
419
|
+
|
|
420
|
+
:param id: (required)
|
|
421
|
+
:type id: str
|
|
422
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
423
|
+
number provided, it will be total request
|
|
424
|
+
timeout. It can also be a pair (tuple) of
|
|
425
|
+
(connection, read) timeouts.
|
|
426
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
427
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
428
|
+
request; this effectively ignores the
|
|
429
|
+
authentication in the spec for a single request.
|
|
430
|
+
:type _request_auth: dict, optional
|
|
431
|
+
:param _content_type: force content-type for the request.
|
|
432
|
+
:type _content_type: str, Optional
|
|
433
|
+
:param _headers: set to override the headers for a single
|
|
434
|
+
request; this effectively ignores the headers
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _headers: dict, optional
|
|
437
|
+
:param _host_index: set to override the host_index for a single
|
|
438
|
+
request; this effectively ignores the host_index
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _host_index: int, optional
|
|
441
|
+
:return: Returns the result object.
|
|
442
|
+
""" # noqa: E501
|
|
443
|
+
|
|
444
|
+
_param = self._delete_team_serialize(
|
|
445
|
+
id=id,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'200': "DeleteResponseDto",
|
|
454
|
+
'400': "BadRequestErrorResponseDto",
|
|
455
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
456
|
+
'404': "NotFoundErrorResponseDto",
|
|
457
|
+
}
|
|
458
|
+
response_data = self.api_client.call_api(
|
|
459
|
+
*_param,
|
|
460
|
+
_request_timeout=_request_timeout
|
|
461
|
+
)
|
|
462
|
+
response_data.read()
|
|
463
|
+
return self.api_client.response_deserialize(
|
|
464
|
+
response_data=response_data,
|
|
465
|
+
response_types_map=_response_types_map,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
@validate_call
|
|
470
|
+
def delete_team_without_preload_content(
|
|
471
|
+
self,
|
|
472
|
+
id: StrictStr,
|
|
473
|
+
_request_timeout: Union[
|
|
474
|
+
None,
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Tuple[
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
479
|
+
]
|
|
480
|
+
] = None,
|
|
481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_content_type: Optional[StrictStr] = None,
|
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
485
|
+
) -> RESTResponseType:
|
|
486
|
+
"""Delete a team
|
|
487
|
+
|
|
488
|
+
Permanently deletes a team record from the system.
|
|
489
|
+
|
|
490
|
+
:param id: (required)
|
|
491
|
+
:type id: str
|
|
492
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
493
|
+
number provided, it will be total request
|
|
494
|
+
timeout. It can also be a pair (tuple) of
|
|
495
|
+
(connection, read) timeouts.
|
|
496
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
497
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
498
|
+
request; this effectively ignores the
|
|
499
|
+
authentication in the spec for a single request.
|
|
500
|
+
:type _request_auth: dict, optional
|
|
501
|
+
:param _content_type: force content-type for the request.
|
|
502
|
+
:type _content_type: str, Optional
|
|
503
|
+
:param _headers: set to override the headers for a single
|
|
504
|
+
request; this effectively ignores the headers
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _headers: dict, optional
|
|
507
|
+
:param _host_index: set to override the host_index for a single
|
|
508
|
+
request; this effectively ignores the host_index
|
|
509
|
+
in the spec for a single request.
|
|
510
|
+
:type _host_index: int, optional
|
|
511
|
+
:return: Returns the result object.
|
|
512
|
+
""" # noqa: E501
|
|
513
|
+
|
|
514
|
+
_param = self._delete_team_serialize(
|
|
515
|
+
id=id,
|
|
516
|
+
_request_auth=_request_auth,
|
|
517
|
+
_content_type=_content_type,
|
|
518
|
+
_headers=_headers,
|
|
519
|
+
_host_index=_host_index
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
523
|
+
'200': "DeleteResponseDto",
|
|
524
|
+
'400': "BadRequestErrorResponseDto",
|
|
525
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
526
|
+
'404': "NotFoundErrorResponseDto",
|
|
527
|
+
}
|
|
528
|
+
response_data = self.api_client.call_api(
|
|
529
|
+
*_param,
|
|
530
|
+
_request_timeout=_request_timeout
|
|
531
|
+
)
|
|
532
|
+
return response_data.response
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
def _delete_team_serialize(
|
|
536
|
+
self,
|
|
537
|
+
id,
|
|
538
|
+
_request_auth,
|
|
539
|
+
_content_type,
|
|
540
|
+
_headers,
|
|
541
|
+
_host_index,
|
|
542
|
+
) -> RequestSerialized:
|
|
543
|
+
|
|
544
|
+
_host = None
|
|
545
|
+
|
|
546
|
+
_collection_formats: Dict[str, str] = {
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
_path_params: Dict[str, str] = {}
|
|
550
|
+
_query_params: List[Tuple[str, str]] = []
|
|
551
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
552
|
+
_form_params: List[Tuple[str, str]] = []
|
|
553
|
+
_files: Dict[
|
|
554
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
555
|
+
] = {}
|
|
556
|
+
_body_params: Optional[bytes] = None
|
|
557
|
+
|
|
558
|
+
# process the path parameters
|
|
559
|
+
if id is not None:
|
|
560
|
+
_path_params['id'] = id
|
|
561
|
+
# process the query parameters
|
|
562
|
+
# process the header parameters
|
|
563
|
+
# process the form parameters
|
|
564
|
+
# process the body parameter
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
# set the HTTP header `Accept`
|
|
568
|
+
if 'Accept' not in _header_params:
|
|
569
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
570
|
+
[
|
|
571
|
+
'application/json'
|
|
572
|
+
]
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
# authentication setting
|
|
577
|
+
_auth_settings: List[str] = [
|
|
578
|
+
'Client-App-Token',
|
|
579
|
+
'Client-App-Id'
|
|
580
|
+
]
|
|
581
|
+
|
|
582
|
+
return self.api_client.param_serialize(
|
|
583
|
+
method='DELETE',
|
|
584
|
+
resource_path='/api/v1/client/teams/{id}',
|
|
585
|
+
path_params=_path_params,
|
|
586
|
+
query_params=_query_params,
|
|
587
|
+
header_params=_header_params,
|
|
588
|
+
body=_body_params,
|
|
589
|
+
post_params=_form_params,
|
|
590
|
+
files=_files,
|
|
591
|
+
auth_settings=_auth_settings,
|
|
592
|
+
collection_formats=_collection_formats,
|
|
593
|
+
_host=_host,
|
|
594
|
+
_request_auth=_request_auth
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
@validate_call
|
|
601
|
+
def get_teams(
|
|
602
|
+
self,
|
|
603
|
+
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to return per page.")] = None,
|
|
604
|
+
offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to skip for pagination.")] = None,
|
|
605
|
+
search: Optional[StrictStr] = None,
|
|
606
|
+
state: Optional[StrictStr] = None,
|
|
607
|
+
_request_timeout: Union[
|
|
608
|
+
None,
|
|
609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
610
|
+
Tuple[
|
|
611
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
612
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
613
|
+
]
|
|
614
|
+
] = None,
|
|
615
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
616
|
+
_content_type: Optional[StrictStr] = None,
|
|
617
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
618
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
619
|
+
) -> ListTeamPaginatedResponseDto:
|
|
620
|
+
"""Get teams
|
|
621
|
+
|
|
622
|
+
Retrieves a paginated list of all teams belonging to the client. Supports filters for search, sport, and state.
|
|
623
|
+
|
|
624
|
+
:param limit: The number of results to return per page.
|
|
625
|
+
:type limit: float
|
|
626
|
+
:param offset: The number of results to skip for pagination.
|
|
627
|
+
:type offset: float
|
|
628
|
+
:param search:
|
|
629
|
+
:type search: str
|
|
630
|
+
:param state:
|
|
631
|
+
:type state: str
|
|
632
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
633
|
+
number provided, it will be total request
|
|
634
|
+
timeout. It can also be a pair (tuple) of
|
|
635
|
+
(connection, read) timeouts.
|
|
636
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
637
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
638
|
+
request; this effectively ignores the
|
|
639
|
+
authentication in the spec for a single request.
|
|
640
|
+
:type _request_auth: dict, optional
|
|
641
|
+
:param _content_type: force content-type for the request.
|
|
642
|
+
:type _content_type: str, Optional
|
|
643
|
+
:param _headers: set to override the headers for a single
|
|
644
|
+
request; this effectively ignores the headers
|
|
645
|
+
in the spec for a single request.
|
|
646
|
+
:type _headers: dict, optional
|
|
647
|
+
:param _host_index: set to override the host_index for a single
|
|
648
|
+
request; this effectively ignores the host_index
|
|
649
|
+
in the spec for a single request.
|
|
650
|
+
:type _host_index: int, optional
|
|
651
|
+
:return: Returns the result object.
|
|
652
|
+
""" # noqa: E501
|
|
653
|
+
|
|
654
|
+
_param = self._get_teams_serialize(
|
|
655
|
+
limit=limit,
|
|
656
|
+
offset=offset,
|
|
657
|
+
search=search,
|
|
658
|
+
state=state,
|
|
659
|
+
_request_auth=_request_auth,
|
|
660
|
+
_content_type=_content_type,
|
|
661
|
+
_headers=_headers,
|
|
662
|
+
_host_index=_host_index
|
|
663
|
+
)
|
|
664
|
+
|
|
665
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
666
|
+
'200': "ListTeamPaginatedResponseDto",
|
|
667
|
+
'400': "BadRequestErrorResponseDto",
|
|
668
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
669
|
+
}
|
|
670
|
+
response_data = self.api_client.call_api(
|
|
671
|
+
*_param,
|
|
672
|
+
_request_timeout=_request_timeout
|
|
673
|
+
)
|
|
674
|
+
response_data.read()
|
|
675
|
+
return self.api_client.response_deserialize(
|
|
676
|
+
response_data=response_data,
|
|
677
|
+
response_types_map=_response_types_map,
|
|
678
|
+
).data
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
@validate_call
|
|
682
|
+
def get_teams_with_http_info(
|
|
683
|
+
self,
|
|
684
|
+
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to return per page.")] = None,
|
|
685
|
+
offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to skip for pagination.")] = None,
|
|
686
|
+
search: Optional[StrictStr] = None,
|
|
687
|
+
state: Optional[StrictStr] = None,
|
|
688
|
+
_request_timeout: Union[
|
|
689
|
+
None,
|
|
690
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
691
|
+
Tuple[
|
|
692
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
694
|
+
]
|
|
695
|
+
] = None,
|
|
696
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
697
|
+
_content_type: Optional[StrictStr] = None,
|
|
698
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
699
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
700
|
+
) -> ApiResponse[ListTeamPaginatedResponseDto]:
|
|
701
|
+
"""Get teams
|
|
702
|
+
|
|
703
|
+
Retrieves a paginated list of all teams belonging to the client. Supports filters for search, sport, and state.
|
|
704
|
+
|
|
705
|
+
:param limit: The number of results to return per page.
|
|
706
|
+
:type limit: float
|
|
707
|
+
:param offset: The number of results to skip for pagination.
|
|
708
|
+
:type offset: float
|
|
709
|
+
:param search:
|
|
710
|
+
:type search: str
|
|
711
|
+
:param state:
|
|
712
|
+
:type state: str
|
|
713
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
714
|
+
number provided, it will be total request
|
|
715
|
+
timeout. It can also be a pair (tuple) of
|
|
716
|
+
(connection, read) timeouts.
|
|
717
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
718
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
719
|
+
request; this effectively ignores the
|
|
720
|
+
authentication in the spec for a single request.
|
|
721
|
+
:type _request_auth: dict, optional
|
|
722
|
+
:param _content_type: force content-type for the request.
|
|
723
|
+
:type _content_type: str, Optional
|
|
724
|
+
:param _headers: set to override the headers for a single
|
|
725
|
+
request; this effectively ignores the headers
|
|
726
|
+
in the spec for a single request.
|
|
727
|
+
:type _headers: dict, optional
|
|
728
|
+
:param _host_index: set to override the host_index for a single
|
|
729
|
+
request; this effectively ignores the host_index
|
|
730
|
+
in the spec for a single request.
|
|
731
|
+
:type _host_index: int, optional
|
|
732
|
+
:return: Returns the result object.
|
|
733
|
+
""" # noqa: E501
|
|
734
|
+
|
|
735
|
+
_param = self._get_teams_serialize(
|
|
736
|
+
limit=limit,
|
|
737
|
+
offset=offset,
|
|
738
|
+
search=search,
|
|
739
|
+
state=state,
|
|
740
|
+
_request_auth=_request_auth,
|
|
741
|
+
_content_type=_content_type,
|
|
742
|
+
_headers=_headers,
|
|
743
|
+
_host_index=_host_index
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
747
|
+
'200': "ListTeamPaginatedResponseDto",
|
|
748
|
+
'400': "BadRequestErrorResponseDto",
|
|
749
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
750
|
+
}
|
|
751
|
+
response_data = self.api_client.call_api(
|
|
752
|
+
*_param,
|
|
753
|
+
_request_timeout=_request_timeout
|
|
754
|
+
)
|
|
755
|
+
response_data.read()
|
|
756
|
+
return self.api_client.response_deserialize(
|
|
757
|
+
response_data=response_data,
|
|
758
|
+
response_types_map=_response_types_map,
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
@validate_call
|
|
763
|
+
def get_teams_without_preload_content(
|
|
764
|
+
self,
|
|
765
|
+
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to return per page.")] = None,
|
|
766
|
+
offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The number of results to skip for pagination.")] = None,
|
|
767
|
+
search: Optional[StrictStr] = None,
|
|
768
|
+
state: Optional[StrictStr] = None,
|
|
769
|
+
_request_timeout: Union[
|
|
770
|
+
None,
|
|
771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
772
|
+
Tuple[
|
|
773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
774
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
775
|
+
]
|
|
776
|
+
] = None,
|
|
777
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
778
|
+
_content_type: Optional[StrictStr] = None,
|
|
779
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
780
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
781
|
+
) -> RESTResponseType:
|
|
782
|
+
"""Get teams
|
|
783
|
+
|
|
784
|
+
Retrieves a paginated list of all teams belonging to the client. Supports filters for search, sport, and state.
|
|
785
|
+
|
|
786
|
+
:param limit: The number of results to return per page.
|
|
787
|
+
:type limit: float
|
|
788
|
+
:param offset: The number of results to skip for pagination.
|
|
789
|
+
:type offset: float
|
|
790
|
+
:param search:
|
|
791
|
+
:type search: str
|
|
792
|
+
:param state:
|
|
793
|
+
:type state: str
|
|
794
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
795
|
+
number provided, it will be total request
|
|
796
|
+
timeout. It can also be a pair (tuple) of
|
|
797
|
+
(connection, read) timeouts.
|
|
798
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
799
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
800
|
+
request; this effectively ignores the
|
|
801
|
+
authentication in the spec for a single request.
|
|
802
|
+
:type _request_auth: dict, optional
|
|
803
|
+
:param _content_type: force content-type for the request.
|
|
804
|
+
:type _content_type: str, Optional
|
|
805
|
+
:param _headers: set to override the headers for a single
|
|
806
|
+
request; this effectively ignores the headers
|
|
807
|
+
in the spec for a single request.
|
|
808
|
+
:type _headers: dict, optional
|
|
809
|
+
:param _host_index: set to override the host_index for a single
|
|
810
|
+
request; this effectively ignores the host_index
|
|
811
|
+
in the spec for a single request.
|
|
812
|
+
:type _host_index: int, optional
|
|
813
|
+
:return: Returns the result object.
|
|
814
|
+
""" # noqa: E501
|
|
815
|
+
|
|
816
|
+
_param = self._get_teams_serialize(
|
|
817
|
+
limit=limit,
|
|
818
|
+
offset=offset,
|
|
819
|
+
search=search,
|
|
820
|
+
state=state,
|
|
821
|
+
_request_auth=_request_auth,
|
|
822
|
+
_content_type=_content_type,
|
|
823
|
+
_headers=_headers,
|
|
824
|
+
_host_index=_host_index
|
|
825
|
+
)
|
|
826
|
+
|
|
827
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
828
|
+
'200': "ListTeamPaginatedResponseDto",
|
|
829
|
+
'400': "BadRequestErrorResponseDto",
|
|
830
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
831
|
+
}
|
|
832
|
+
response_data = self.api_client.call_api(
|
|
833
|
+
*_param,
|
|
834
|
+
_request_timeout=_request_timeout
|
|
835
|
+
)
|
|
836
|
+
return response_data.response
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
def _get_teams_serialize(
|
|
840
|
+
self,
|
|
841
|
+
limit,
|
|
842
|
+
offset,
|
|
843
|
+
search,
|
|
844
|
+
state,
|
|
845
|
+
_request_auth,
|
|
846
|
+
_content_type,
|
|
847
|
+
_headers,
|
|
848
|
+
_host_index,
|
|
849
|
+
) -> RequestSerialized:
|
|
850
|
+
|
|
851
|
+
_host = None
|
|
852
|
+
|
|
853
|
+
_collection_formats: Dict[str, str] = {
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
_path_params: Dict[str, str] = {}
|
|
857
|
+
_query_params: List[Tuple[str, str]] = []
|
|
858
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
859
|
+
_form_params: List[Tuple[str, str]] = []
|
|
860
|
+
_files: Dict[
|
|
861
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
862
|
+
] = {}
|
|
863
|
+
_body_params: Optional[bytes] = None
|
|
864
|
+
|
|
865
|
+
# process the path parameters
|
|
866
|
+
# process the query parameters
|
|
867
|
+
if limit is not None:
|
|
868
|
+
|
|
869
|
+
_query_params.append(('limit', limit))
|
|
870
|
+
|
|
871
|
+
if offset is not None:
|
|
872
|
+
|
|
873
|
+
_query_params.append(('offset', offset))
|
|
874
|
+
|
|
875
|
+
if search is not None:
|
|
876
|
+
|
|
877
|
+
_query_params.append(('search', search))
|
|
878
|
+
|
|
879
|
+
if state is not None:
|
|
880
|
+
|
|
881
|
+
_query_params.append(('state', state))
|
|
882
|
+
|
|
883
|
+
# process the header parameters
|
|
884
|
+
# process the form parameters
|
|
885
|
+
# process the body parameter
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
# set the HTTP header `Accept`
|
|
889
|
+
if 'Accept' not in _header_params:
|
|
890
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
891
|
+
[
|
|
892
|
+
'application/json'
|
|
893
|
+
]
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
# authentication setting
|
|
898
|
+
_auth_settings: List[str] = [
|
|
899
|
+
'Client-App-Token',
|
|
900
|
+
'Client-App-Id'
|
|
901
|
+
]
|
|
902
|
+
|
|
903
|
+
return self.api_client.param_serialize(
|
|
904
|
+
method='GET',
|
|
905
|
+
resource_path='/api/v1/client/teams',
|
|
906
|
+
path_params=_path_params,
|
|
907
|
+
query_params=_query_params,
|
|
908
|
+
header_params=_header_params,
|
|
909
|
+
body=_body_params,
|
|
910
|
+
post_params=_form_params,
|
|
911
|
+
files=_files,
|
|
912
|
+
auth_settings=_auth_settings,
|
|
913
|
+
collection_formats=_collection_formats,
|
|
914
|
+
_host=_host,
|
|
915
|
+
_request_auth=_request_auth
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
@validate_call
|
|
922
|
+
def update_team(
|
|
923
|
+
self,
|
|
924
|
+
id: StrictStr,
|
|
925
|
+
update_team_dto: UpdateTeamDto,
|
|
926
|
+
_request_timeout: Union[
|
|
927
|
+
None,
|
|
928
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
929
|
+
Tuple[
|
|
930
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
931
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
932
|
+
]
|
|
933
|
+
] = None,
|
|
934
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
935
|
+
_content_type: Optional[StrictStr] = None,
|
|
936
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
937
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
938
|
+
) -> SingleTeamResponseDto:
|
|
939
|
+
"""Update a team
|
|
940
|
+
|
|
941
|
+
Updates the details of an existing team identified by its ID. Allows updating the name, short name, coach, logo, and other details.
|
|
942
|
+
|
|
943
|
+
:param id: (required)
|
|
944
|
+
:type id: str
|
|
945
|
+
:param update_team_dto: (required)
|
|
946
|
+
:type update_team_dto: UpdateTeamDto
|
|
947
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
948
|
+
number provided, it will be total request
|
|
949
|
+
timeout. It can also be a pair (tuple) of
|
|
950
|
+
(connection, read) timeouts.
|
|
951
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
952
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
953
|
+
request; this effectively ignores the
|
|
954
|
+
authentication in the spec for a single request.
|
|
955
|
+
:type _request_auth: dict, optional
|
|
956
|
+
:param _content_type: force content-type for the request.
|
|
957
|
+
:type _content_type: str, Optional
|
|
958
|
+
:param _headers: set to override the headers for a single
|
|
959
|
+
request; this effectively ignores the headers
|
|
960
|
+
in the spec for a single request.
|
|
961
|
+
:type _headers: dict, optional
|
|
962
|
+
:param _host_index: set to override the host_index for a single
|
|
963
|
+
request; this effectively ignores the host_index
|
|
964
|
+
in the spec for a single request.
|
|
965
|
+
:type _host_index: int, optional
|
|
966
|
+
:return: Returns the result object.
|
|
967
|
+
""" # noqa: E501
|
|
968
|
+
|
|
969
|
+
_param = self._update_team_serialize(
|
|
970
|
+
id=id,
|
|
971
|
+
update_team_dto=update_team_dto,
|
|
972
|
+
_request_auth=_request_auth,
|
|
973
|
+
_content_type=_content_type,
|
|
974
|
+
_headers=_headers,
|
|
975
|
+
_host_index=_host_index
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
979
|
+
'200': "SingleTeamResponseDto",
|
|
980
|
+
'400': "BadRequestErrorResponseDto",
|
|
981
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
982
|
+
'404': "NotFoundErrorResponseDto",
|
|
983
|
+
'409': "ConflictErrorResponseDto",
|
|
984
|
+
}
|
|
985
|
+
response_data = self.api_client.call_api(
|
|
986
|
+
*_param,
|
|
987
|
+
_request_timeout=_request_timeout
|
|
988
|
+
)
|
|
989
|
+
response_data.read()
|
|
990
|
+
return self.api_client.response_deserialize(
|
|
991
|
+
response_data=response_data,
|
|
992
|
+
response_types_map=_response_types_map,
|
|
993
|
+
).data
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
@validate_call
|
|
997
|
+
def update_team_with_http_info(
|
|
998
|
+
self,
|
|
999
|
+
id: StrictStr,
|
|
1000
|
+
update_team_dto: UpdateTeamDto,
|
|
1001
|
+
_request_timeout: Union[
|
|
1002
|
+
None,
|
|
1003
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1004
|
+
Tuple[
|
|
1005
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1006
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1007
|
+
]
|
|
1008
|
+
] = None,
|
|
1009
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1010
|
+
_content_type: Optional[StrictStr] = None,
|
|
1011
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1012
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1013
|
+
) -> ApiResponse[SingleTeamResponseDto]:
|
|
1014
|
+
"""Update a team
|
|
1015
|
+
|
|
1016
|
+
Updates the details of an existing team identified by its ID. Allows updating the name, short name, coach, logo, and other details.
|
|
1017
|
+
|
|
1018
|
+
:param id: (required)
|
|
1019
|
+
:type id: str
|
|
1020
|
+
:param update_team_dto: (required)
|
|
1021
|
+
:type update_team_dto: UpdateTeamDto
|
|
1022
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1023
|
+
number provided, it will be total request
|
|
1024
|
+
timeout. It can also be a pair (tuple) of
|
|
1025
|
+
(connection, read) timeouts.
|
|
1026
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1027
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1028
|
+
request; this effectively ignores the
|
|
1029
|
+
authentication in the spec for a single request.
|
|
1030
|
+
:type _request_auth: dict, optional
|
|
1031
|
+
:param _content_type: force content-type for the request.
|
|
1032
|
+
:type _content_type: str, Optional
|
|
1033
|
+
:param _headers: set to override the headers for a single
|
|
1034
|
+
request; this effectively ignores the headers
|
|
1035
|
+
in the spec for a single request.
|
|
1036
|
+
:type _headers: dict, optional
|
|
1037
|
+
:param _host_index: set to override the host_index for a single
|
|
1038
|
+
request; this effectively ignores the host_index
|
|
1039
|
+
in the spec for a single request.
|
|
1040
|
+
:type _host_index: int, optional
|
|
1041
|
+
:return: Returns the result object.
|
|
1042
|
+
""" # noqa: E501
|
|
1043
|
+
|
|
1044
|
+
_param = self._update_team_serialize(
|
|
1045
|
+
id=id,
|
|
1046
|
+
update_team_dto=update_team_dto,
|
|
1047
|
+
_request_auth=_request_auth,
|
|
1048
|
+
_content_type=_content_type,
|
|
1049
|
+
_headers=_headers,
|
|
1050
|
+
_host_index=_host_index
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1054
|
+
'200': "SingleTeamResponseDto",
|
|
1055
|
+
'400': "BadRequestErrorResponseDto",
|
|
1056
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
1057
|
+
'404': "NotFoundErrorResponseDto",
|
|
1058
|
+
'409': "ConflictErrorResponseDto",
|
|
1059
|
+
}
|
|
1060
|
+
response_data = self.api_client.call_api(
|
|
1061
|
+
*_param,
|
|
1062
|
+
_request_timeout=_request_timeout
|
|
1063
|
+
)
|
|
1064
|
+
response_data.read()
|
|
1065
|
+
return self.api_client.response_deserialize(
|
|
1066
|
+
response_data=response_data,
|
|
1067
|
+
response_types_map=_response_types_map,
|
|
1068
|
+
)
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
@validate_call
|
|
1072
|
+
def update_team_without_preload_content(
|
|
1073
|
+
self,
|
|
1074
|
+
id: StrictStr,
|
|
1075
|
+
update_team_dto: UpdateTeamDto,
|
|
1076
|
+
_request_timeout: Union[
|
|
1077
|
+
None,
|
|
1078
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1079
|
+
Tuple[
|
|
1080
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1081
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1082
|
+
]
|
|
1083
|
+
] = None,
|
|
1084
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1085
|
+
_content_type: Optional[StrictStr] = None,
|
|
1086
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1087
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1088
|
+
) -> RESTResponseType:
|
|
1089
|
+
"""Update a team
|
|
1090
|
+
|
|
1091
|
+
Updates the details of an existing team identified by its ID. Allows updating the name, short name, coach, logo, and other details.
|
|
1092
|
+
|
|
1093
|
+
:param id: (required)
|
|
1094
|
+
:type id: str
|
|
1095
|
+
:param update_team_dto: (required)
|
|
1096
|
+
:type update_team_dto: UpdateTeamDto
|
|
1097
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1098
|
+
number provided, it will be total request
|
|
1099
|
+
timeout. It can also be a pair (tuple) of
|
|
1100
|
+
(connection, read) timeouts.
|
|
1101
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1102
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1103
|
+
request; this effectively ignores the
|
|
1104
|
+
authentication in the spec for a single request.
|
|
1105
|
+
:type _request_auth: dict, optional
|
|
1106
|
+
:param _content_type: force content-type for the request.
|
|
1107
|
+
:type _content_type: str, Optional
|
|
1108
|
+
:param _headers: set to override the headers for a single
|
|
1109
|
+
request; this effectively ignores the headers
|
|
1110
|
+
in the spec for a single request.
|
|
1111
|
+
:type _headers: dict, optional
|
|
1112
|
+
:param _host_index: set to override the host_index for a single
|
|
1113
|
+
request; this effectively ignores the host_index
|
|
1114
|
+
in the spec for a single request.
|
|
1115
|
+
:type _host_index: int, optional
|
|
1116
|
+
:return: Returns the result object.
|
|
1117
|
+
""" # noqa: E501
|
|
1118
|
+
|
|
1119
|
+
_param = self._update_team_serialize(
|
|
1120
|
+
id=id,
|
|
1121
|
+
update_team_dto=update_team_dto,
|
|
1122
|
+
_request_auth=_request_auth,
|
|
1123
|
+
_content_type=_content_type,
|
|
1124
|
+
_headers=_headers,
|
|
1125
|
+
_host_index=_host_index
|
|
1126
|
+
)
|
|
1127
|
+
|
|
1128
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1129
|
+
'200': "SingleTeamResponseDto",
|
|
1130
|
+
'400': "BadRequestErrorResponseDto",
|
|
1131
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
1132
|
+
'404': "NotFoundErrorResponseDto",
|
|
1133
|
+
'409': "ConflictErrorResponseDto",
|
|
1134
|
+
}
|
|
1135
|
+
response_data = self.api_client.call_api(
|
|
1136
|
+
*_param,
|
|
1137
|
+
_request_timeout=_request_timeout
|
|
1138
|
+
)
|
|
1139
|
+
return response_data.response
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
def _update_team_serialize(
|
|
1143
|
+
self,
|
|
1144
|
+
id,
|
|
1145
|
+
update_team_dto,
|
|
1146
|
+
_request_auth,
|
|
1147
|
+
_content_type,
|
|
1148
|
+
_headers,
|
|
1149
|
+
_host_index,
|
|
1150
|
+
) -> RequestSerialized:
|
|
1151
|
+
|
|
1152
|
+
_host = None
|
|
1153
|
+
|
|
1154
|
+
_collection_formats: Dict[str, str] = {
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
_path_params: Dict[str, str] = {}
|
|
1158
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1159
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1160
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1161
|
+
_files: Dict[
|
|
1162
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1163
|
+
] = {}
|
|
1164
|
+
_body_params: Optional[bytes] = None
|
|
1165
|
+
|
|
1166
|
+
# process the path parameters
|
|
1167
|
+
if id is not None:
|
|
1168
|
+
_path_params['id'] = id
|
|
1169
|
+
# process the query parameters
|
|
1170
|
+
# process the header parameters
|
|
1171
|
+
# process the form parameters
|
|
1172
|
+
# process the body parameter
|
|
1173
|
+
if update_team_dto is not None:
|
|
1174
|
+
_body_params = update_team_dto
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
# set the HTTP header `Accept`
|
|
1178
|
+
if 'Accept' not in _header_params:
|
|
1179
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1180
|
+
[
|
|
1181
|
+
'application/json'
|
|
1182
|
+
]
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
# set the HTTP header `Content-Type`
|
|
1186
|
+
if _content_type:
|
|
1187
|
+
_header_params['Content-Type'] = _content_type
|
|
1188
|
+
else:
|
|
1189
|
+
_default_content_type = (
|
|
1190
|
+
self.api_client.select_header_content_type(
|
|
1191
|
+
[
|
|
1192
|
+
'application/json'
|
|
1193
|
+
]
|
|
1194
|
+
)
|
|
1195
|
+
)
|
|
1196
|
+
if _default_content_type is not None:
|
|
1197
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1198
|
+
|
|
1199
|
+
# authentication setting
|
|
1200
|
+
_auth_settings: List[str] = [
|
|
1201
|
+
'Client-App-Token',
|
|
1202
|
+
'Client-App-Id'
|
|
1203
|
+
]
|
|
1204
|
+
|
|
1205
|
+
return self.api_client.param_serialize(
|
|
1206
|
+
method='PATCH',
|
|
1207
|
+
resource_path='/api/v1/client/teams/{id}',
|
|
1208
|
+
path_params=_path_params,
|
|
1209
|
+
query_params=_query_params,
|
|
1210
|
+
header_params=_header_params,
|
|
1211
|
+
body=_body_params,
|
|
1212
|
+
post_params=_form_params,
|
|
1213
|
+
files=_files,
|
|
1214
|
+
auth_settings=_auth_settings,
|
|
1215
|
+
collection_formats=_collection_formats,
|
|
1216
|
+
_host=_host,
|
|
1217
|
+
_request_auth=_request_auth
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
|