kalshi-python-sync 3.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.
Files changed (149) hide show
  1. kalshi_python_sync/__init__.py +272 -0
  2. kalshi_python_sync/api/__init__.py +19 -0
  3. kalshi_python_sync/api/api_keys_api.py +1098 -0
  4. kalshi_python_sync/api/communications_api.py +3216 -0
  5. kalshi_python_sync/api/events_api.py +1941 -0
  6. kalshi_python_sync/api/exchange_api.py +1263 -0
  7. kalshi_python_sync/api/fcm_api.py +792 -0
  8. kalshi_python_sync/api/incentive_programs_api.py +346 -0
  9. kalshi_python_sync/api/live_data_api.py +564 -0
  10. kalshi_python_sync/api/market_api.py +2568 -0
  11. kalshi_python_sync/api/milestone_api.py +689 -0
  12. kalshi_python_sync/api/multivariate_api.py +1486 -0
  13. kalshi_python_sync/api/order_groups_api.py +1375 -0
  14. kalshi_python_sync/api/orders_api.py +2913 -0
  15. kalshi_python_sync/api/portfolio_api.py +1572 -0
  16. kalshi_python_sync/api/search_api.py +516 -0
  17. kalshi_python_sync/api/structured_targets_api.py +605 -0
  18. kalshi_python_sync/api_client.py +830 -0
  19. kalshi_python_sync/api_response.py +21 -0
  20. kalshi_python_sync/auth.py +89 -0
  21. kalshi_python_sync/configuration.py +626 -0
  22. kalshi_python_sync/exceptions.py +216 -0
  23. kalshi_python_sync/models/__init__.py +136 -0
  24. kalshi_python_sync/models/accept_quote_request.py +94 -0
  25. kalshi_python_sync/models/amend_order_request.py +120 -0
  26. kalshi_python_sync/models/amend_order_response.py +96 -0
  27. kalshi_python_sync/models/announcement.py +108 -0
  28. kalshi_python_sync/models/api_key.py +89 -0
  29. kalshi_python_sync/models/associated_event.py +105 -0
  30. kalshi_python_sync/models/batch_cancel_orders_individual_response.py +111 -0
  31. kalshi_python_sync/models/batch_cancel_orders_request.py +87 -0
  32. kalshi_python_sync/models/batch_cancel_orders_response.py +95 -0
  33. kalshi_python_sync/models/batch_create_orders_individual_response.py +114 -0
  34. kalshi_python_sync/models/batch_create_orders_request.py +95 -0
  35. kalshi_python_sync/models/batch_create_orders_response.py +95 -0
  36. kalshi_python_sync/models/batch_get_market_candlesticks_response.py +95 -0
  37. kalshi_python_sync/models/bid_ask_distribution.py +101 -0
  38. kalshi_python_sync/models/cancel_order_response.py +93 -0
  39. kalshi_python_sync/models/create_api_key_request.py +89 -0
  40. kalshi_python_sync/models/create_api_key_response.py +87 -0
  41. kalshi_python_sync/models/create_market_in_multivariate_event_collection_request.py +95 -0
  42. kalshi_python_sync/models/create_market_in_multivariate_event_collection_response.py +89 -0
  43. kalshi_python_sync/models/create_order_group_request.py +88 -0
  44. kalshi_python_sync/models/create_order_group_response.py +87 -0
  45. kalshi_python_sync/models/create_order_request.py +159 -0
  46. kalshi_python_sync/models/create_order_response.py +91 -0
  47. kalshi_python_sync/models/create_quote_request.py +93 -0
  48. kalshi_python_sync/models/create_quote_response.py +87 -0
  49. kalshi_python_sync/models/create_rfq_request.py +97 -0
  50. kalshi_python_sync/models/create_rfq_response.py +87 -0
  51. kalshi_python_sync/models/daily_schedule.py +89 -0
  52. kalshi_python_sync/models/decrease_order_request.py +90 -0
  53. kalshi_python_sync/models/decrease_order_response.py +91 -0
  54. kalshi_python_sync/models/error_response.py +93 -0
  55. kalshi_python_sync/models/event_data.py +133 -0
  56. kalshi_python_sync/models/event_position.py +105 -0
  57. kalshi_python_sync/models/exchange_status.py +97 -0
  58. kalshi_python_sync/models/fill.py +134 -0
  59. kalshi_python_sync/models/forecast_percentiles_point.py +101 -0
  60. kalshi_python_sync/models/generate_api_key_request.py +87 -0
  61. kalshi_python_sync/models/generate_api_key_response.py +89 -0
  62. kalshi_python_sync/models/get_api_keys_response.py +95 -0
  63. kalshi_python_sync/models/get_balance_response.py +91 -0
  64. kalshi_python_sync/models/get_communications_id_response.py +87 -0
  65. kalshi_python_sync/models/get_event_candlesticks_response.py +104 -0
  66. kalshi_python_sync/models/get_event_forecast_percentiles_history_response.py +95 -0
  67. kalshi_python_sync/models/get_event_metadata_response.py +123 -0
  68. kalshi_python_sync/models/get_event_response.py +101 -0
  69. kalshi_python_sync/models/get_events_response.py +107 -0
  70. kalshi_python_sync/models/get_exchange_announcements_response.py +95 -0
  71. kalshi_python_sync/models/get_exchange_schedule_response.py +91 -0
  72. kalshi_python_sync/models/get_fills_response.py +97 -0
  73. kalshi_python_sync/models/get_filters_by_sports_response.py +102 -0
  74. kalshi_python_sync/models/get_incentive_programs_response.py +97 -0
  75. kalshi_python_sync/models/get_live_data_response.py +91 -0
  76. kalshi_python_sync/models/get_live_datas_response.py +95 -0
  77. kalshi_python_sync/models/get_market_candlesticks_response.py +97 -0
  78. kalshi_python_sync/models/get_market_orderbook_response.py +91 -0
  79. kalshi_python_sync/models/get_market_response.py +91 -0
  80. kalshi_python_sync/models/get_markets_response.py +97 -0
  81. kalshi_python_sync/models/get_milestone_response.py +91 -0
  82. kalshi_python_sync/models/get_milestones_response.py +97 -0
  83. kalshi_python_sync/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
  84. kalshi_python_sync/models/get_multivariate_event_collection_response.py +91 -0
  85. kalshi_python_sync/models/get_multivariate_event_collections_response.py +97 -0
  86. kalshi_python_sync/models/get_multivariate_events_response.py +97 -0
  87. kalshi_python_sync/models/get_order_group_response.py +89 -0
  88. kalshi_python_sync/models/get_order_groups_response.py +95 -0
  89. kalshi_python_sync/models/get_order_queue_position_response.py +87 -0
  90. kalshi_python_sync/models/get_order_queue_positions_response.py +95 -0
  91. kalshi_python_sync/models/get_order_response.py +91 -0
  92. kalshi_python_sync/models/get_orders_response.py +97 -0
  93. kalshi_python_sync/models/get_portfolio_resting_order_total_value_response.py +87 -0
  94. kalshi_python_sync/models/get_positions_response.py +107 -0
  95. kalshi_python_sync/models/get_quote_response.py +91 -0
  96. kalshi_python_sync/models/get_quotes_response.py +97 -0
  97. kalshi_python_sync/models/get_rfq_response.py +91 -0
  98. kalshi_python_sync/models/get_rfqs_response.py +97 -0
  99. kalshi_python_sync/models/get_series_fee_changes_response.py +95 -0
  100. kalshi_python_sync/models/get_series_list_response.py +95 -0
  101. kalshi_python_sync/models/get_series_response.py +91 -0
  102. kalshi_python_sync/models/get_settlements_response.py +97 -0
  103. kalshi_python_sync/models/get_structured_target_response.py +91 -0
  104. kalshi_python_sync/models/get_structured_targets_response.py +97 -0
  105. kalshi_python_sync/models/get_tags_for_series_categories_response.py +87 -0
  106. kalshi_python_sync/models/get_trades_response.py +97 -0
  107. kalshi_python_sync/models/get_user_data_timestamp_response.py +88 -0
  108. kalshi_python_sync/models/incentive_program.py +121 -0
  109. kalshi_python_sync/models/live_data.py +91 -0
  110. kalshi_python_sync/models/lookup_point.py +102 -0
  111. kalshi_python_sync/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
  112. kalshi_python_sync/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
  113. kalshi_python_sync/models/maintenance_window.py +90 -0
  114. kalshi_python_sync/models/market.py +307 -0
  115. kalshi_python_sync/models/market_candlestick.py +108 -0
  116. kalshi_python_sync/models/market_candlesticks_response.py +97 -0
  117. kalshi_python_sync/models/market_metadata.py +91 -0
  118. kalshi_python_sync/models/market_position.py +110 -0
  119. kalshi_python_sync/models/milestone.py +120 -0
  120. kalshi_python_sync/models/multivariate_event_collection.py +122 -0
  121. kalshi_python_sync/models/mve_selected_leg.py +91 -0
  122. kalshi_python_sync/models/order.py +189 -0
  123. kalshi_python_sync/models/order_group.py +89 -0
  124. kalshi_python_sync/models/order_queue_position.py +91 -0
  125. kalshi_python_sync/models/order_status.py +38 -0
  126. kalshi_python_sync/models/orderbook.py +94 -0
  127. kalshi_python_sync/models/percentile_point.py +93 -0
  128. kalshi_python_sync/models/price_distribution.py +157 -0
  129. kalshi_python_sync/models/price_range.py +91 -0
  130. kalshi_python_sync/models/quote.py +153 -0
  131. kalshi_python_sync/models/rfq.py +129 -0
  132. kalshi_python_sync/models/schedule.py +105 -0
  133. kalshi_python_sync/models/scope_list.py +87 -0
  134. kalshi_python_sync/models/self_trade_prevention_type.py +37 -0
  135. kalshi_python_sync/models/series.py +129 -0
  136. kalshi_python_sync/models/series_fee_change.py +103 -0
  137. kalshi_python_sync/models/settlement.py +118 -0
  138. kalshi_python_sync/models/settlement_source.py +89 -0
  139. kalshi_python_sync/models/sport_filter_details.py +102 -0
  140. kalshi_python_sync/models/structured_target.py +98 -0
  141. kalshi_python_sync/models/ticker_pair.py +98 -0
  142. kalshi_python_sync/models/trade.py +113 -0
  143. kalshi_python_sync/models/weekly_schedule.py +154 -0
  144. kalshi_python_sync/py.typed +0 -0
  145. kalshi_python_sync/rest.py +258 -0
  146. kalshi_python_sync-3.0.0.dist-info/METADATA +77 -0
  147. kalshi_python_sync-3.0.0.dist-info/RECORD +149 -0
  148. kalshi_python_sync-3.0.0.dist-info/WHEEL +5 -0
  149. kalshi_python_sync-3.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,605 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Kalshi Trade API Manual Endpoints
5
+
6
+ Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt, StrictBool
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
20
+ from typing_extensions import Annotated
21
+ from kalshi_python_sync.models.get_structured_target_response import GetStructuredTargetResponse
22
+ from kalshi_python_sync.models.get_structured_targets_response import GetStructuredTargetsResponse
23
+
24
+ from kalshi_python_sync.api_client import ApiClient, RequestSerialized
25
+ from kalshi_python_sync.api_response import ApiResponse
26
+ from kalshi_python_sync.rest import RESTResponseType
27
+
28
+
29
+ class StructuredTargetsApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def get_structured_target(
44
+ self,
45
+ structured_target_id: StrictStr,
46
+ ) -> GetStructuredTargetResponse:
47
+ """Get Structured Target
48
+
49
+ Endpoint for getting data about a specific structured target by its ID.
50
+
51
+ :param structured_target_id: Structured target ID (required)
52
+ :type structured_target_id: str
53
+ :param _request_timeout: timeout setting for this request. If one
54
+ number provided, it will be total request
55
+ timeout. It can also be a pair (tuple) of
56
+ (connection, read) timeouts.
57
+ :type _request_timeout: int, tuple(int, int), optional
58
+ :param _request_auth: set to override the auth_settings for an a single
59
+ request; this effectively ignores the
60
+ authentication in the spec for a single request.
61
+ :type _request_auth: dict, optional
62
+ :param _content_type: force content-type for the request.
63
+ :type _content_type: str, Optional
64
+ :param _headers: set to override the headers for a single
65
+ request; this effectively ignores the headers
66
+ in the spec for a single request.
67
+ :type _headers: dict, optional
68
+ :param _host_index: set to override the host_index for a single
69
+ request; this effectively ignores the host_index
70
+ in the spec for a single request.
71
+ :type _host_index: int, optional
72
+ :return: Returns the result object.
73
+ """ # noqa: E501
74
+
75
+
76
+ _param = self._get_structured_target_serialize(
77
+ structured_target_id=structured_target_id,
78
+ _request_auth=None,
79
+ _content_type=None,
80
+ _headers=None,
81
+ _host_index=0
82
+ )
83
+
84
+ _response_types_map: Dict[str, Optional[str]] = {
85
+ '200': "GetStructuredTargetResponse",
86
+ '401': None,
87
+ '404': None,
88
+ '500': None,
89
+ }
90
+ response_data = self.api_client.call_api(
91
+ *_param,
92
+ _request_timeout=None,
93
+ )
94
+ response_data.read()
95
+ return self.api_client.response_deserialize(
96
+ response_data=response_data,
97
+ response_types_map=_response_types_map,
98
+ ).data
99
+
100
+
101
+ @validate_call
102
+ def get_structured_target_with_http_info(
103
+ self,
104
+ structured_target_id: Annotated[StrictStr, Field(description="Structured target ID")],
105
+ _request_timeout: Union[
106
+ None,
107
+ Annotated[StrictFloat, Field(gt=0)],
108
+ Tuple[
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Annotated[StrictFloat, Field(gt=0)]
111
+ ]
112
+ ] = None,
113
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
114
+ _content_type: Optional[StrictStr] = None,
115
+ _headers: Optional[Dict[StrictStr, Any]] = None,
116
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
117
+ ) -> ApiResponse[GetStructuredTargetResponse]:
118
+ """Get Structured Target
119
+
120
+ Endpoint for getting data about a specific structured target by its ID.
121
+
122
+ :param structured_target_id: Structured target ID (required)
123
+ :type structured_target_id: str
124
+ :param _request_timeout: timeout setting for this request. If one
125
+ number provided, it will be total request
126
+ timeout. It can also be a pair (tuple) of
127
+ (connection, read) timeouts.
128
+ :type _request_timeout: int, tuple(int, int), optional
129
+ :param _request_auth: set to override the auth_settings for an a single
130
+ request; this effectively ignores the
131
+ authentication in the spec for a single request.
132
+ :type _request_auth: dict, optional
133
+ :param _content_type: force content-type for the request.
134
+ :type _content_type: str, Optional
135
+ :param _headers: set to override the headers for a single
136
+ request; this effectively ignores the headers
137
+ in the spec for a single request.
138
+ :type _headers: dict, optional
139
+ :param _host_index: set to override the host_index for a single
140
+ request; this effectively ignores the host_index
141
+ in the spec for a single request.
142
+ :type _host_index: int, optional
143
+ :return: Returns the result object.
144
+ """ # noqa: E501
145
+
146
+ _param = self._get_structured_target_serialize(
147
+ structured_target_id=structured_target_id,
148
+ _request_auth=_request_auth,
149
+ _content_type=_content_type,
150
+ _headers=_headers,
151
+ _host_index=_host_index
152
+ )
153
+
154
+ _response_types_map: Dict[str, Optional[str]] = {
155
+ '200': "GetStructuredTargetResponse",
156
+ '401': None,
157
+ '404': None,
158
+ '500': None,
159
+ }
160
+ response_data = self.api_client.call_api(
161
+ *_param,
162
+ _request_timeout=_request_timeout
163
+ )
164
+ response_data.read()
165
+ return self.api_client.response_deserialize(
166
+ response_data=response_data,
167
+ response_types_map=_response_types_map,
168
+ )
169
+
170
+
171
+ @validate_call
172
+ def get_structured_target_without_preload_content(
173
+ self,
174
+ structured_target_id: Annotated[StrictStr, Field(description="Structured target ID")],
175
+ _request_timeout: Union[
176
+ None,
177
+ Annotated[StrictFloat, Field(gt=0)],
178
+ Tuple[
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Annotated[StrictFloat, Field(gt=0)]
181
+ ]
182
+ ] = None,
183
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
184
+ _content_type: Optional[StrictStr] = None,
185
+ _headers: Optional[Dict[StrictStr, Any]] = None,
186
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
187
+ ) -> RESTResponseType:
188
+ """Get Structured Target
189
+
190
+ Endpoint for getting data about a specific structured target by its ID.
191
+
192
+ :param structured_target_id: Structured target ID (required)
193
+ :type structured_target_id: str
194
+ :param _request_timeout: timeout setting for this request. If one
195
+ number provided, it will be total request
196
+ timeout. It can also be a pair (tuple) of
197
+ (connection, read) timeouts.
198
+ :type _request_timeout: int, tuple(int, int), optional
199
+ :param _request_auth: set to override the auth_settings for an a single
200
+ request; this effectively ignores the
201
+ authentication in the spec for a single request.
202
+ :type _request_auth: dict, optional
203
+ :param _content_type: force content-type for the request.
204
+ :type _content_type: str, Optional
205
+ :param _headers: set to override the headers for a single
206
+ request; this effectively ignores the headers
207
+ in the spec for a single request.
208
+ :type _headers: dict, optional
209
+ :param _host_index: set to override the host_index for a single
210
+ request; this effectively ignores the host_index
211
+ in the spec for a single request.
212
+ :type _host_index: int, optional
213
+ :return: Returns the result object.
214
+ """ # noqa: E501
215
+
216
+ _param = self._get_structured_target_serialize(
217
+ structured_target_id=structured_target_id,
218
+ _request_auth=_request_auth,
219
+ _content_type=_content_type,
220
+ _headers=_headers,
221
+ _host_index=_host_index
222
+ )
223
+
224
+ _response_types_map: Dict[str, Optional[str]] = {
225
+ '200': "GetStructuredTargetResponse",
226
+ '401': None,
227
+ '404': None,
228
+ '500': None,
229
+ }
230
+ response_data = self.api_client.call_api(
231
+ *_param,
232
+ _request_timeout=_request_timeout
233
+ )
234
+ return response_data.response
235
+
236
+
237
+ def _get_structured_target_serialize(
238
+ self,
239
+ structured_target_id,
240
+ _request_auth,
241
+ _content_type,
242
+ _headers,
243
+ _host_index,
244
+ ) -> RequestSerialized:
245
+
246
+ _host = None
247
+
248
+ _collection_formats: Dict[str, str] = {
249
+ }
250
+
251
+ _path_params: Dict[str, str] = {}
252
+ _query_params: List[Tuple[str, str]] = []
253
+ _header_params: Dict[str, Optional[str]] = _headers or {}
254
+ _form_params: List[Tuple[str, str]] = []
255
+ _files: Dict[
256
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
257
+ ] = {}
258
+ _body_params: Optional[bytes] = None
259
+
260
+ # process the path parameters
261
+ if structured_target_id is not None:
262
+ _path_params['structured_target_id'] = structured_target_id
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+
268
+
269
+ # set the HTTP header `Accept`
270
+ if 'Accept' not in _header_params:
271
+ _header_params['Accept'] = self.api_client.select_header_accept(
272
+ [
273
+ 'application/json'
274
+ ]
275
+ )
276
+
277
+
278
+ # authentication setting
279
+ _auth_settings: List[str] = [
280
+ ]
281
+
282
+ return self.api_client.param_serialize(
283
+ method='GET',
284
+ resource_path='/structured_targets/{structured_target_id}',
285
+ path_params=_path_params,
286
+ query_params=_query_params,
287
+ header_params=_header_params,
288
+ body=_body_params,
289
+ post_params=_form_params,
290
+ files=_files,
291
+ auth_settings=_auth_settings,
292
+ collection_formats=_collection_formats,
293
+ _host=_host,
294
+ _request_auth=_request_auth
295
+ )
296
+
297
+
298
+
299
+
300
+ @validate_call
301
+ def get_structured_targets(
302
+ self,
303
+ type: Any = None,
304
+ competition: Any = None,
305
+ page_size: Any = None,
306
+ cursor: Any = None,
307
+ ) -> GetStructuredTargetsResponse:
308
+ """Get Structured Targets
309
+
310
+ Page size (min: 1, max: 2000)
311
+
312
+ :param type: Filter by structured target type
313
+ :type type: str
314
+ :param competition: Filter by competition
315
+ :type competition: str
316
+ :param page_size: Number of items per page (min 1, max 2000, default 100)
317
+ :type page_size: int
318
+ :param cursor: Pagination cursor
319
+ :type cursor: str
320
+ :param _request_timeout: timeout setting for this request. If one
321
+ number provided, it will be total request
322
+ timeout. It can also be a pair (tuple) of
323
+ (connection, read) timeouts.
324
+ :type _request_timeout: int, tuple(int, int), optional
325
+ :param _request_auth: set to override the auth_settings for an a single
326
+ request; this effectively ignores the
327
+ authentication in the spec for a single request.
328
+ :type _request_auth: dict, optional
329
+ :param _content_type: force content-type for the request.
330
+ :type _content_type: str, Optional
331
+ :param _headers: set to override the headers for a single
332
+ request; this effectively ignores the headers
333
+ in the spec for a single request.
334
+ :type _headers: dict, optional
335
+ :param _host_index: set to override the host_index for a single
336
+ request; this effectively ignores the host_index
337
+ in the spec for a single request.
338
+ :type _host_index: int, optional
339
+ :return: Returns the result object.
340
+ """ # noqa: E501
341
+
342
+
343
+ _param = self._get_structured_targets_serialize(
344
+ type=type,
345
+ competition=competition,
346
+ page_size=page_size,
347
+ cursor=cursor,
348
+ _request_auth=None,
349
+ _content_type=None,
350
+ _headers=None,
351
+ _host_index=0
352
+ )
353
+
354
+ _response_types_map: Dict[str, Optional[str]] = {
355
+ '200': "GetStructuredTargetsResponse",
356
+ '401': None,
357
+ '500': None,
358
+ }
359
+ response_data = self.api_client.call_api(
360
+ *_param,
361
+ _request_timeout=None,
362
+ )
363
+ response_data.read()
364
+ return self.api_client.response_deserialize(
365
+ response_data=response_data,
366
+ response_types_map=_response_types_map,
367
+ ).data
368
+
369
+
370
+ @validate_call
371
+ def get_structured_targets_with_http_info(
372
+ self,
373
+ type: Annotated[Optional[StrictStr], Field(description="Filter by structured target type")] = None,
374
+ competition: Annotated[Optional[StrictStr], Field(description="Filter by competition")] = None,
375
+ page_size: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Number of items per page (min 1, max 2000, default 100)")] = None,
376
+ cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None,
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Annotated[StrictFloat, Field(gt=0)]
383
+ ]
384
+ ] = None,
385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
386
+ _content_type: Optional[StrictStr] = None,
387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
389
+ ) -> ApiResponse[GetStructuredTargetsResponse]:
390
+ """Get Structured Targets
391
+
392
+ Page size (min: 1, max: 2000)
393
+
394
+ :param type: Filter by structured target type
395
+ :type type: str
396
+ :param competition: Filter by competition
397
+ :type competition: str
398
+ :param page_size: Number of items per page (min 1, max 2000, default 100)
399
+ :type page_size: int
400
+ :param cursor: Pagination cursor
401
+ :type cursor: str
402
+ :param _request_timeout: timeout setting for this request. If one
403
+ number provided, it will be total request
404
+ timeout. It can also be a pair (tuple) of
405
+ (connection, read) timeouts.
406
+ :type _request_timeout: int, tuple(int, int), optional
407
+ :param _request_auth: set to override the auth_settings for an a single
408
+ request; this effectively ignores the
409
+ authentication in the spec for a single request.
410
+ :type _request_auth: dict, optional
411
+ :param _content_type: force content-type for the request.
412
+ :type _content_type: str, Optional
413
+ :param _headers: set to override the headers for a single
414
+ request; this effectively ignores the headers
415
+ in the spec for a single request.
416
+ :type _headers: dict, optional
417
+ :param _host_index: set to override the host_index for a single
418
+ request; this effectively ignores the host_index
419
+ in the spec for a single request.
420
+ :type _host_index: int, optional
421
+ :return: Returns the result object.
422
+ """ # noqa: E501
423
+
424
+ _param = self._get_structured_targets_serialize(
425
+ type=type,
426
+ competition=competition,
427
+ page_size=page_size,
428
+ cursor=cursor,
429
+ _request_auth=_request_auth,
430
+ _content_type=_content_type,
431
+ _headers=_headers,
432
+ _host_index=_host_index
433
+ )
434
+
435
+ _response_types_map: Dict[str, Optional[str]] = {
436
+ '200': "GetStructuredTargetsResponse",
437
+ '401': None,
438
+ '500': None,
439
+ }
440
+ response_data = self.api_client.call_api(
441
+ *_param,
442
+ _request_timeout=_request_timeout
443
+ )
444
+ response_data.read()
445
+ return self.api_client.response_deserialize(
446
+ response_data=response_data,
447
+ response_types_map=_response_types_map,
448
+ )
449
+
450
+
451
+ @validate_call
452
+ def get_structured_targets_without_preload_content(
453
+ self,
454
+ type: Annotated[Optional[StrictStr], Field(description="Filter by structured target type")] = None,
455
+ competition: Annotated[Optional[StrictStr], Field(description="Filter by competition")] = None,
456
+ page_size: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Number of items per page (min 1, max 2000, default 100)")] = None,
457
+ cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None,
458
+ _request_timeout: Union[
459
+ None,
460
+ Annotated[StrictFloat, Field(gt=0)],
461
+ Tuple[
462
+ Annotated[StrictFloat, Field(gt=0)],
463
+ Annotated[StrictFloat, Field(gt=0)]
464
+ ]
465
+ ] = None,
466
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
467
+ _content_type: Optional[StrictStr] = None,
468
+ _headers: Optional[Dict[StrictStr, Any]] = None,
469
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
470
+ ) -> RESTResponseType:
471
+ """Get Structured Targets
472
+
473
+ Page size (min: 1, max: 2000)
474
+
475
+ :param type: Filter by structured target type
476
+ :type type: str
477
+ :param competition: Filter by competition
478
+ :type competition: str
479
+ :param page_size: Number of items per page (min 1, max 2000, default 100)
480
+ :type page_size: int
481
+ :param cursor: Pagination cursor
482
+ :type cursor: str
483
+ :param _request_timeout: timeout setting for this request. If one
484
+ number provided, it will be total request
485
+ timeout. It can also be a pair (tuple) of
486
+ (connection, read) timeouts.
487
+ :type _request_timeout: int, tuple(int, int), optional
488
+ :param _request_auth: set to override the auth_settings for an a single
489
+ request; this effectively ignores the
490
+ authentication in the spec for a single request.
491
+ :type _request_auth: dict, optional
492
+ :param _content_type: force content-type for the request.
493
+ :type _content_type: str, Optional
494
+ :param _headers: set to override the headers for a single
495
+ request; this effectively ignores the headers
496
+ in the spec for a single request.
497
+ :type _headers: dict, optional
498
+ :param _host_index: set to override the host_index for a single
499
+ request; this effectively ignores the host_index
500
+ in the spec for a single request.
501
+ :type _host_index: int, optional
502
+ :return: Returns the result object.
503
+ """ # noqa: E501
504
+
505
+ _param = self._get_structured_targets_serialize(
506
+ type=type,
507
+ competition=competition,
508
+ page_size=page_size,
509
+ cursor=cursor,
510
+ _request_auth=_request_auth,
511
+ _content_type=_content_type,
512
+ _headers=_headers,
513
+ _host_index=_host_index
514
+ )
515
+
516
+ _response_types_map: Dict[str, Optional[str]] = {
517
+ '200': "GetStructuredTargetsResponse",
518
+ '401': None,
519
+ '500': None,
520
+ }
521
+ response_data = self.api_client.call_api(
522
+ *_param,
523
+ _request_timeout=_request_timeout
524
+ )
525
+ return response_data.response
526
+
527
+
528
+ def _get_structured_targets_serialize(
529
+ self,
530
+ type,
531
+ competition,
532
+ page_size,
533
+ cursor,
534
+ _request_auth,
535
+ _content_type,
536
+ _headers,
537
+ _host_index,
538
+ ) -> RequestSerialized:
539
+
540
+ _host = None
541
+
542
+ _collection_formats: Dict[str, str] = {
543
+ }
544
+
545
+ _path_params: Dict[str, str] = {}
546
+ _query_params: List[Tuple[str, str]] = []
547
+ _header_params: Dict[str, Optional[str]] = _headers or {}
548
+ _form_params: List[Tuple[str, str]] = []
549
+ _files: Dict[
550
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
551
+ ] = {}
552
+ _body_params: Optional[bytes] = None
553
+
554
+ # process the path parameters
555
+ # process the query parameters
556
+ if type is not None:
557
+
558
+ _query_params.append(('type', type))
559
+
560
+ if competition is not None:
561
+
562
+ _query_params.append(('competition', competition))
563
+
564
+ if page_size is not None:
565
+
566
+ _query_params.append(('page_size', page_size))
567
+
568
+ if cursor is not None:
569
+
570
+ _query_params.append(('cursor', cursor))
571
+
572
+ # process the header parameters
573
+ # process the form parameters
574
+ # process the body parameter
575
+
576
+
577
+ # set the HTTP header `Accept`
578
+ if 'Accept' not in _header_params:
579
+ _header_params['Accept'] = self.api_client.select_header_accept(
580
+ [
581
+ 'application/json'
582
+ ]
583
+ )
584
+
585
+
586
+ # authentication setting
587
+ _auth_settings: List[str] = [
588
+ ]
589
+
590
+ return self.api_client.param_serialize(
591
+ method='GET',
592
+ resource_path='/structured_targets',
593
+ path_params=_path_params,
594
+ query_params=_query_params,
595
+ header_params=_header_params,
596
+ body=_body_params,
597
+ post_params=_form_params,
598
+ files=_files,
599
+ auth_settings=_auth_settings,
600
+ collection_formats=_collection_formats,
601
+ _host=_host,
602
+ _request_auth=_request_auth
603
+ )
604
+
605
+