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