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,1203 @@
|
|
|
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, StrictStr
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from victorycode_sdk.models.create_mascot_dto import CreateMascotDto
|
|
22
|
+
from victorycode_sdk.models.delete_response_dto import DeleteResponseDto
|
|
23
|
+
from victorycode_sdk.models.list_mascot_paginated_response_dto import ListMascotPaginatedResponseDto
|
|
24
|
+
from victorycode_sdk.models.single_mascot_response_dto import SingleMascotResponseDto
|
|
25
|
+
from victorycode_sdk.models.update_mascot_dto import UpdateMascotDto
|
|
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 MascotApi:
|
|
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_mascot(
|
|
47
|
+
self,
|
|
48
|
+
create_mascot_dto: CreateMascotDto,
|
|
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
|
+
) -> SingleMascotResponseDto:
|
|
62
|
+
"""Create a new mascot
|
|
63
|
+
|
|
64
|
+
Creates a new mascot record with a name and description. An optional mascot image can be uploaded as part of the multipart form data.
|
|
65
|
+
|
|
66
|
+
:param create_mascot_dto: (required)
|
|
67
|
+
:type create_mascot_dto: CreateMascotDto
|
|
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_mascot_serialize(
|
|
91
|
+
create_mascot_dto=create_mascot_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': "SingleMascotResponseDto",
|
|
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_mascot_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
create_mascot_dto: CreateMascotDto,
|
|
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[SingleMascotResponseDto]:
|
|
132
|
+
"""Create a new mascot
|
|
133
|
+
|
|
134
|
+
Creates a new mascot record with a name and description. An optional mascot image can be uploaded as part of the multipart form data.
|
|
135
|
+
|
|
136
|
+
:param create_mascot_dto: (required)
|
|
137
|
+
:type create_mascot_dto: CreateMascotDto
|
|
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_mascot_serialize(
|
|
161
|
+
create_mascot_dto=create_mascot_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': "SingleMascotResponseDto",
|
|
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_mascot_without_preload_content(
|
|
187
|
+
self,
|
|
188
|
+
create_mascot_dto: CreateMascotDto,
|
|
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 mascot
|
|
203
|
+
|
|
204
|
+
Creates a new mascot record with a name and description. An optional mascot image can be uploaded as part of the multipart form data.
|
|
205
|
+
|
|
206
|
+
:param create_mascot_dto: (required)
|
|
207
|
+
:type create_mascot_dto: CreateMascotDto
|
|
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_mascot_serialize(
|
|
231
|
+
create_mascot_dto=create_mascot_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': "SingleMascotResponseDto",
|
|
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_mascot_serialize(
|
|
252
|
+
self,
|
|
253
|
+
create_mascot_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_mascot_dto is not None:
|
|
280
|
+
_body_params = create_mascot_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/mascots',
|
|
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_mascot(
|
|
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 mascot
|
|
347
|
+
|
|
348
|
+
Permanently deletes a mascot 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_mascot_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_mascot_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 mascot
|
|
417
|
+
|
|
418
|
+
Permanently deletes a mascot 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_mascot_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_mascot_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 mascot
|
|
487
|
+
|
|
488
|
+
Permanently deletes a mascot 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_mascot_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_mascot_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/mascots/{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_mascots(
|
|
602
|
+
self,
|
|
603
|
+
limit: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
604
|
+
page: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
605
|
+
search: Optional[StrictStr] = None,
|
|
606
|
+
_request_timeout: Union[
|
|
607
|
+
None,
|
|
608
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
609
|
+
Tuple[
|
|
610
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
611
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
612
|
+
]
|
|
613
|
+
] = None,
|
|
614
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
615
|
+
_content_type: Optional[StrictStr] = None,
|
|
616
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
617
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
618
|
+
) -> ListMascotPaginatedResponseDto:
|
|
619
|
+
"""Get all mascots
|
|
620
|
+
|
|
621
|
+
Retrieves a paginated list of all mascots. Supports searching by name and pagination through query parameters.
|
|
622
|
+
|
|
623
|
+
:param limit:
|
|
624
|
+
:type limit: float
|
|
625
|
+
:param page:
|
|
626
|
+
:type page: float
|
|
627
|
+
:param search:
|
|
628
|
+
:type search: str
|
|
629
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
630
|
+
number provided, it will be total request
|
|
631
|
+
timeout. It can also be a pair (tuple) of
|
|
632
|
+
(connection, read) timeouts.
|
|
633
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
634
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
635
|
+
request; this effectively ignores the
|
|
636
|
+
authentication in the spec for a single request.
|
|
637
|
+
:type _request_auth: dict, optional
|
|
638
|
+
:param _content_type: force content-type for the request.
|
|
639
|
+
:type _content_type: str, Optional
|
|
640
|
+
:param _headers: set to override the headers for a single
|
|
641
|
+
request; this effectively ignores the headers
|
|
642
|
+
in the spec for a single request.
|
|
643
|
+
:type _headers: dict, optional
|
|
644
|
+
:param _host_index: set to override the host_index for a single
|
|
645
|
+
request; this effectively ignores the host_index
|
|
646
|
+
in the spec for a single request.
|
|
647
|
+
:type _host_index: int, optional
|
|
648
|
+
:return: Returns the result object.
|
|
649
|
+
""" # noqa: E501
|
|
650
|
+
|
|
651
|
+
_param = self._get_mascots_serialize(
|
|
652
|
+
limit=limit,
|
|
653
|
+
page=page,
|
|
654
|
+
search=search,
|
|
655
|
+
_request_auth=_request_auth,
|
|
656
|
+
_content_type=_content_type,
|
|
657
|
+
_headers=_headers,
|
|
658
|
+
_host_index=_host_index
|
|
659
|
+
)
|
|
660
|
+
|
|
661
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
662
|
+
'200': "ListMascotPaginatedResponseDto",
|
|
663
|
+
'400': "BadRequestErrorResponseDto",
|
|
664
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
665
|
+
}
|
|
666
|
+
response_data = self.api_client.call_api(
|
|
667
|
+
*_param,
|
|
668
|
+
_request_timeout=_request_timeout
|
|
669
|
+
)
|
|
670
|
+
response_data.read()
|
|
671
|
+
return self.api_client.response_deserialize(
|
|
672
|
+
response_data=response_data,
|
|
673
|
+
response_types_map=_response_types_map,
|
|
674
|
+
).data
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
@validate_call
|
|
678
|
+
def get_mascots_with_http_info(
|
|
679
|
+
self,
|
|
680
|
+
limit: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
681
|
+
page: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
682
|
+
search: Optional[StrictStr] = None,
|
|
683
|
+
_request_timeout: Union[
|
|
684
|
+
None,
|
|
685
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
686
|
+
Tuple[
|
|
687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
688
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
689
|
+
]
|
|
690
|
+
] = None,
|
|
691
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
692
|
+
_content_type: Optional[StrictStr] = None,
|
|
693
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
694
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
695
|
+
) -> ApiResponse[ListMascotPaginatedResponseDto]:
|
|
696
|
+
"""Get all mascots
|
|
697
|
+
|
|
698
|
+
Retrieves a paginated list of all mascots. Supports searching by name and pagination through query parameters.
|
|
699
|
+
|
|
700
|
+
:param limit:
|
|
701
|
+
:type limit: float
|
|
702
|
+
:param page:
|
|
703
|
+
:type page: float
|
|
704
|
+
:param search:
|
|
705
|
+
:type search: str
|
|
706
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
707
|
+
number provided, it will be total request
|
|
708
|
+
timeout. It can also be a pair (tuple) of
|
|
709
|
+
(connection, read) timeouts.
|
|
710
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
711
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
712
|
+
request; this effectively ignores the
|
|
713
|
+
authentication in the spec for a single request.
|
|
714
|
+
:type _request_auth: dict, optional
|
|
715
|
+
:param _content_type: force content-type for the request.
|
|
716
|
+
:type _content_type: str, Optional
|
|
717
|
+
:param _headers: set to override the headers for a single
|
|
718
|
+
request; this effectively ignores the headers
|
|
719
|
+
in the spec for a single request.
|
|
720
|
+
:type _headers: dict, optional
|
|
721
|
+
:param _host_index: set to override the host_index for a single
|
|
722
|
+
request; this effectively ignores the host_index
|
|
723
|
+
in the spec for a single request.
|
|
724
|
+
:type _host_index: int, optional
|
|
725
|
+
:return: Returns the result object.
|
|
726
|
+
""" # noqa: E501
|
|
727
|
+
|
|
728
|
+
_param = self._get_mascots_serialize(
|
|
729
|
+
limit=limit,
|
|
730
|
+
page=page,
|
|
731
|
+
search=search,
|
|
732
|
+
_request_auth=_request_auth,
|
|
733
|
+
_content_type=_content_type,
|
|
734
|
+
_headers=_headers,
|
|
735
|
+
_host_index=_host_index
|
|
736
|
+
)
|
|
737
|
+
|
|
738
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
739
|
+
'200': "ListMascotPaginatedResponseDto",
|
|
740
|
+
'400': "BadRequestErrorResponseDto",
|
|
741
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
742
|
+
}
|
|
743
|
+
response_data = self.api_client.call_api(
|
|
744
|
+
*_param,
|
|
745
|
+
_request_timeout=_request_timeout
|
|
746
|
+
)
|
|
747
|
+
response_data.read()
|
|
748
|
+
return self.api_client.response_deserialize(
|
|
749
|
+
response_data=response_data,
|
|
750
|
+
response_types_map=_response_types_map,
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
@validate_call
|
|
755
|
+
def get_mascots_without_preload_content(
|
|
756
|
+
self,
|
|
757
|
+
limit: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
758
|
+
page: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
|
|
759
|
+
search: Optional[StrictStr] = None,
|
|
760
|
+
_request_timeout: Union[
|
|
761
|
+
None,
|
|
762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
763
|
+
Tuple[
|
|
764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
765
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
766
|
+
]
|
|
767
|
+
] = None,
|
|
768
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
769
|
+
_content_type: Optional[StrictStr] = None,
|
|
770
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
771
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
772
|
+
) -> RESTResponseType:
|
|
773
|
+
"""Get all mascots
|
|
774
|
+
|
|
775
|
+
Retrieves a paginated list of all mascots. Supports searching by name and pagination through query parameters.
|
|
776
|
+
|
|
777
|
+
:param limit:
|
|
778
|
+
:type limit: float
|
|
779
|
+
:param page:
|
|
780
|
+
:type page: float
|
|
781
|
+
:param search:
|
|
782
|
+
:type search: str
|
|
783
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
784
|
+
number provided, it will be total request
|
|
785
|
+
timeout. It can also be a pair (tuple) of
|
|
786
|
+
(connection, read) timeouts.
|
|
787
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
788
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
789
|
+
request; this effectively ignores the
|
|
790
|
+
authentication in the spec for a single request.
|
|
791
|
+
:type _request_auth: dict, optional
|
|
792
|
+
:param _content_type: force content-type for the request.
|
|
793
|
+
:type _content_type: str, Optional
|
|
794
|
+
:param _headers: set to override the headers for a single
|
|
795
|
+
request; this effectively ignores the headers
|
|
796
|
+
in the spec for a single request.
|
|
797
|
+
:type _headers: dict, optional
|
|
798
|
+
:param _host_index: set to override the host_index for a single
|
|
799
|
+
request; this effectively ignores the host_index
|
|
800
|
+
in the spec for a single request.
|
|
801
|
+
:type _host_index: int, optional
|
|
802
|
+
:return: Returns the result object.
|
|
803
|
+
""" # noqa: E501
|
|
804
|
+
|
|
805
|
+
_param = self._get_mascots_serialize(
|
|
806
|
+
limit=limit,
|
|
807
|
+
page=page,
|
|
808
|
+
search=search,
|
|
809
|
+
_request_auth=_request_auth,
|
|
810
|
+
_content_type=_content_type,
|
|
811
|
+
_headers=_headers,
|
|
812
|
+
_host_index=_host_index
|
|
813
|
+
)
|
|
814
|
+
|
|
815
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
816
|
+
'200': "ListMascotPaginatedResponseDto",
|
|
817
|
+
'400': "BadRequestErrorResponseDto",
|
|
818
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
819
|
+
}
|
|
820
|
+
response_data = self.api_client.call_api(
|
|
821
|
+
*_param,
|
|
822
|
+
_request_timeout=_request_timeout
|
|
823
|
+
)
|
|
824
|
+
return response_data.response
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
def _get_mascots_serialize(
|
|
828
|
+
self,
|
|
829
|
+
limit,
|
|
830
|
+
page,
|
|
831
|
+
search,
|
|
832
|
+
_request_auth,
|
|
833
|
+
_content_type,
|
|
834
|
+
_headers,
|
|
835
|
+
_host_index,
|
|
836
|
+
) -> RequestSerialized:
|
|
837
|
+
|
|
838
|
+
_host = None
|
|
839
|
+
|
|
840
|
+
_collection_formats: Dict[str, str] = {
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
_path_params: Dict[str, str] = {}
|
|
844
|
+
_query_params: List[Tuple[str, str]] = []
|
|
845
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
846
|
+
_form_params: List[Tuple[str, str]] = []
|
|
847
|
+
_files: Dict[
|
|
848
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
849
|
+
] = {}
|
|
850
|
+
_body_params: Optional[bytes] = None
|
|
851
|
+
|
|
852
|
+
# process the path parameters
|
|
853
|
+
# process the query parameters
|
|
854
|
+
if limit is not None:
|
|
855
|
+
|
|
856
|
+
_query_params.append(('limit', limit))
|
|
857
|
+
|
|
858
|
+
if page is not None:
|
|
859
|
+
|
|
860
|
+
_query_params.append(('page', page))
|
|
861
|
+
|
|
862
|
+
if search is not None:
|
|
863
|
+
|
|
864
|
+
_query_params.append(('search', search))
|
|
865
|
+
|
|
866
|
+
# process the header parameters
|
|
867
|
+
# process the form parameters
|
|
868
|
+
# process the body parameter
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
# set the HTTP header `Accept`
|
|
872
|
+
if 'Accept' not in _header_params:
|
|
873
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
874
|
+
[
|
|
875
|
+
'application/json'
|
|
876
|
+
]
|
|
877
|
+
)
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
# authentication setting
|
|
881
|
+
_auth_settings: List[str] = [
|
|
882
|
+
'Client-App-Token',
|
|
883
|
+
'Client-App-Id'
|
|
884
|
+
]
|
|
885
|
+
|
|
886
|
+
return self.api_client.param_serialize(
|
|
887
|
+
method='GET',
|
|
888
|
+
resource_path='/api/v1/client/mascots',
|
|
889
|
+
path_params=_path_params,
|
|
890
|
+
query_params=_query_params,
|
|
891
|
+
header_params=_header_params,
|
|
892
|
+
body=_body_params,
|
|
893
|
+
post_params=_form_params,
|
|
894
|
+
files=_files,
|
|
895
|
+
auth_settings=_auth_settings,
|
|
896
|
+
collection_formats=_collection_formats,
|
|
897
|
+
_host=_host,
|
|
898
|
+
_request_auth=_request_auth
|
|
899
|
+
)
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
@validate_call
|
|
905
|
+
def update_mascot(
|
|
906
|
+
self,
|
|
907
|
+
id: StrictStr,
|
|
908
|
+
update_mascot_dto: UpdateMascotDto,
|
|
909
|
+
_request_timeout: Union[
|
|
910
|
+
None,
|
|
911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
912
|
+
Tuple[
|
|
913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
915
|
+
]
|
|
916
|
+
] = None,
|
|
917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
918
|
+
_content_type: Optional[StrictStr] = None,
|
|
919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
921
|
+
) -> SingleMascotResponseDto:
|
|
922
|
+
"""Update a mascot
|
|
923
|
+
|
|
924
|
+
Updates the details of an existing mascot identified by its ID. Allows updating the name, description, and mascot image.
|
|
925
|
+
|
|
926
|
+
:param id: (required)
|
|
927
|
+
:type id: str
|
|
928
|
+
:param update_mascot_dto: (required)
|
|
929
|
+
:type update_mascot_dto: UpdateMascotDto
|
|
930
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
931
|
+
number provided, it will be total request
|
|
932
|
+
timeout. It can also be a pair (tuple) of
|
|
933
|
+
(connection, read) timeouts.
|
|
934
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
935
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
936
|
+
request; this effectively ignores the
|
|
937
|
+
authentication in the spec for a single request.
|
|
938
|
+
:type _request_auth: dict, optional
|
|
939
|
+
:param _content_type: force content-type for the request.
|
|
940
|
+
:type _content_type: str, Optional
|
|
941
|
+
:param _headers: set to override the headers for a single
|
|
942
|
+
request; this effectively ignores the headers
|
|
943
|
+
in the spec for a single request.
|
|
944
|
+
:type _headers: dict, optional
|
|
945
|
+
:param _host_index: set to override the host_index for a single
|
|
946
|
+
request; this effectively ignores the host_index
|
|
947
|
+
in the spec for a single request.
|
|
948
|
+
:type _host_index: int, optional
|
|
949
|
+
:return: Returns the result object.
|
|
950
|
+
""" # noqa: E501
|
|
951
|
+
|
|
952
|
+
_param = self._update_mascot_serialize(
|
|
953
|
+
id=id,
|
|
954
|
+
update_mascot_dto=update_mascot_dto,
|
|
955
|
+
_request_auth=_request_auth,
|
|
956
|
+
_content_type=_content_type,
|
|
957
|
+
_headers=_headers,
|
|
958
|
+
_host_index=_host_index
|
|
959
|
+
)
|
|
960
|
+
|
|
961
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
962
|
+
'200': "SingleMascotResponseDto",
|
|
963
|
+
'400': "BadRequestErrorResponseDto",
|
|
964
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
965
|
+
'404': "NotFoundErrorResponseDto",
|
|
966
|
+
'409': "ConflictErrorResponseDto",
|
|
967
|
+
}
|
|
968
|
+
response_data = self.api_client.call_api(
|
|
969
|
+
*_param,
|
|
970
|
+
_request_timeout=_request_timeout
|
|
971
|
+
)
|
|
972
|
+
response_data.read()
|
|
973
|
+
return self.api_client.response_deserialize(
|
|
974
|
+
response_data=response_data,
|
|
975
|
+
response_types_map=_response_types_map,
|
|
976
|
+
).data
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
@validate_call
|
|
980
|
+
def update_mascot_with_http_info(
|
|
981
|
+
self,
|
|
982
|
+
id: StrictStr,
|
|
983
|
+
update_mascot_dto: UpdateMascotDto,
|
|
984
|
+
_request_timeout: Union[
|
|
985
|
+
None,
|
|
986
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
987
|
+
Tuple[
|
|
988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
990
|
+
]
|
|
991
|
+
] = None,
|
|
992
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
993
|
+
_content_type: Optional[StrictStr] = None,
|
|
994
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
995
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
996
|
+
) -> ApiResponse[SingleMascotResponseDto]:
|
|
997
|
+
"""Update a mascot
|
|
998
|
+
|
|
999
|
+
Updates the details of an existing mascot identified by its ID. Allows updating the name, description, and mascot image.
|
|
1000
|
+
|
|
1001
|
+
:param id: (required)
|
|
1002
|
+
:type id: str
|
|
1003
|
+
:param update_mascot_dto: (required)
|
|
1004
|
+
:type update_mascot_dto: UpdateMascotDto
|
|
1005
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1006
|
+
number provided, it will be total request
|
|
1007
|
+
timeout. It can also be a pair (tuple) of
|
|
1008
|
+
(connection, read) timeouts.
|
|
1009
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1010
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1011
|
+
request; this effectively ignores the
|
|
1012
|
+
authentication in the spec for a single request.
|
|
1013
|
+
:type _request_auth: dict, optional
|
|
1014
|
+
:param _content_type: force content-type for the request.
|
|
1015
|
+
:type _content_type: str, Optional
|
|
1016
|
+
:param _headers: set to override the headers for a single
|
|
1017
|
+
request; this effectively ignores the headers
|
|
1018
|
+
in the spec for a single request.
|
|
1019
|
+
:type _headers: dict, optional
|
|
1020
|
+
:param _host_index: set to override the host_index for a single
|
|
1021
|
+
request; this effectively ignores the host_index
|
|
1022
|
+
in the spec for a single request.
|
|
1023
|
+
:type _host_index: int, optional
|
|
1024
|
+
:return: Returns the result object.
|
|
1025
|
+
""" # noqa: E501
|
|
1026
|
+
|
|
1027
|
+
_param = self._update_mascot_serialize(
|
|
1028
|
+
id=id,
|
|
1029
|
+
update_mascot_dto=update_mascot_dto,
|
|
1030
|
+
_request_auth=_request_auth,
|
|
1031
|
+
_content_type=_content_type,
|
|
1032
|
+
_headers=_headers,
|
|
1033
|
+
_host_index=_host_index
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1037
|
+
'200': "SingleMascotResponseDto",
|
|
1038
|
+
'400': "BadRequestErrorResponseDto",
|
|
1039
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
1040
|
+
'404': "NotFoundErrorResponseDto",
|
|
1041
|
+
'409': "ConflictErrorResponseDto",
|
|
1042
|
+
}
|
|
1043
|
+
response_data = self.api_client.call_api(
|
|
1044
|
+
*_param,
|
|
1045
|
+
_request_timeout=_request_timeout
|
|
1046
|
+
)
|
|
1047
|
+
response_data.read()
|
|
1048
|
+
return self.api_client.response_deserialize(
|
|
1049
|
+
response_data=response_data,
|
|
1050
|
+
response_types_map=_response_types_map,
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
@validate_call
|
|
1055
|
+
def update_mascot_without_preload_content(
|
|
1056
|
+
self,
|
|
1057
|
+
id: StrictStr,
|
|
1058
|
+
update_mascot_dto: UpdateMascotDto,
|
|
1059
|
+
_request_timeout: Union[
|
|
1060
|
+
None,
|
|
1061
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1062
|
+
Tuple[
|
|
1063
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1064
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1065
|
+
]
|
|
1066
|
+
] = None,
|
|
1067
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1068
|
+
_content_type: Optional[StrictStr] = None,
|
|
1069
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1070
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1071
|
+
) -> RESTResponseType:
|
|
1072
|
+
"""Update a mascot
|
|
1073
|
+
|
|
1074
|
+
Updates the details of an existing mascot identified by its ID. Allows updating the name, description, and mascot image.
|
|
1075
|
+
|
|
1076
|
+
:param id: (required)
|
|
1077
|
+
:type id: str
|
|
1078
|
+
:param update_mascot_dto: (required)
|
|
1079
|
+
:type update_mascot_dto: UpdateMascotDto
|
|
1080
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1081
|
+
number provided, it will be total request
|
|
1082
|
+
timeout. It can also be a pair (tuple) of
|
|
1083
|
+
(connection, read) timeouts.
|
|
1084
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1085
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1086
|
+
request; this effectively ignores the
|
|
1087
|
+
authentication in the spec for a single request.
|
|
1088
|
+
:type _request_auth: dict, optional
|
|
1089
|
+
:param _content_type: force content-type for the request.
|
|
1090
|
+
:type _content_type: str, Optional
|
|
1091
|
+
:param _headers: set to override the headers for a single
|
|
1092
|
+
request; this effectively ignores the headers
|
|
1093
|
+
in the spec for a single request.
|
|
1094
|
+
:type _headers: dict, optional
|
|
1095
|
+
:param _host_index: set to override the host_index for a single
|
|
1096
|
+
request; this effectively ignores the host_index
|
|
1097
|
+
in the spec for a single request.
|
|
1098
|
+
:type _host_index: int, optional
|
|
1099
|
+
:return: Returns the result object.
|
|
1100
|
+
""" # noqa: E501
|
|
1101
|
+
|
|
1102
|
+
_param = self._update_mascot_serialize(
|
|
1103
|
+
id=id,
|
|
1104
|
+
update_mascot_dto=update_mascot_dto,
|
|
1105
|
+
_request_auth=_request_auth,
|
|
1106
|
+
_content_type=_content_type,
|
|
1107
|
+
_headers=_headers,
|
|
1108
|
+
_host_index=_host_index
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1112
|
+
'200': "SingleMascotResponseDto",
|
|
1113
|
+
'400': "BadRequestErrorResponseDto",
|
|
1114
|
+
'401': "UnauthorizedErrorResponseDto",
|
|
1115
|
+
'404': "NotFoundErrorResponseDto",
|
|
1116
|
+
'409': "ConflictErrorResponseDto",
|
|
1117
|
+
}
|
|
1118
|
+
response_data = self.api_client.call_api(
|
|
1119
|
+
*_param,
|
|
1120
|
+
_request_timeout=_request_timeout
|
|
1121
|
+
)
|
|
1122
|
+
return response_data.response
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
def _update_mascot_serialize(
|
|
1126
|
+
self,
|
|
1127
|
+
id,
|
|
1128
|
+
update_mascot_dto,
|
|
1129
|
+
_request_auth,
|
|
1130
|
+
_content_type,
|
|
1131
|
+
_headers,
|
|
1132
|
+
_host_index,
|
|
1133
|
+
) -> RequestSerialized:
|
|
1134
|
+
|
|
1135
|
+
_host = None
|
|
1136
|
+
|
|
1137
|
+
_collection_formats: Dict[str, str] = {
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
_path_params: Dict[str, str] = {}
|
|
1141
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1142
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1143
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1144
|
+
_files: Dict[
|
|
1145
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1146
|
+
] = {}
|
|
1147
|
+
_body_params: Optional[bytes] = None
|
|
1148
|
+
|
|
1149
|
+
# process the path parameters
|
|
1150
|
+
if id is not None:
|
|
1151
|
+
_path_params['id'] = id
|
|
1152
|
+
# process the query parameters
|
|
1153
|
+
# process the header parameters
|
|
1154
|
+
# process the form parameters
|
|
1155
|
+
# process the body parameter
|
|
1156
|
+
if update_mascot_dto is not None:
|
|
1157
|
+
_body_params = update_mascot_dto
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
# set the HTTP header `Accept`
|
|
1161
|
+
if 'Accept' not in _header_params:
|
|
1162
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1163
|
+
[
|
|
1164
|
+
'application/json'
|
|
1165
|
+
]
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
# set the HTTP header `Content-Type`
|
|
1169
|
+
if _content_type:
|
|
1170
|
+
_header_params['Content-Type'] = _content_type
|
|
1171
|
+
else:
|
|
1172
|
+
_default_content_type = (
|
|
1173
|
+
self.api_client.select_header_content_type(
|
|
1174
|
+
[
|
|
1175
|
+
'application/json'
|
|
1176
|
+
]
|
|
1177
|
+
)
|
|
1178
|
+
)
|
|
1179
|
+
if _default_content_type is not None:
|
|
1180
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1181
|
+
|
|
1182
|
+
# authentication setting
|
|
1183
|
+
_auth_settings: List[str] = [
|
|
1184
|
+
'Client-App-Token',
|
|
1185
|
+
'Client-App-Id'
|
|
1186
|
+
]
|
|
1187
|
+
|
|
1188
|
+
return self.api_client.param_serialize(
|
|
1189
|
+
method='PATCH',
|
|
1190
|
+
resource_path='/api/v1/client/mascots/{id}',
|
|
1191
|
+
path_params=_path_params,
|
|
1192
|
+
query_params=_query_params,
|
|
1193
|
+
header_params=_header_params,
|
|
1194
|
+
body=_body_params,
|
|
1195
|
+
post_params=_form_params,
|
|
1196
|
+
files=_files,
|
|
1197
|
+
auth_settings=_auth_settings,
|
|
1198
|
+
collection_formats=_collection_formats,
|
|
1199
|
+
_host=_host,
|
|
1200
|
+
_request_auth=_request_auth
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
|