16
16
from typing import Any , Dict , List , Optional , Tuple , Union
17
17
from typing_extensions import Annotated
18
18
19
- from pydantic import Field , StrictStr , field_validator
19
+ from pydantic import Field , field_validator
20
20
from typing_extensions import Annotated
21
21
22
22
from sonarr .api_client import ApiClient , RequestSerialized
@@ -37,258 +37,6 @@ def __init__(self, api_client=None) -> None:
37
37
self .api_client = api_client
38
38
39
39
40
- @validate_call
41
- def get (
42
- self ,
43
- path : StrictStr ,
44
- _request_timeout : Union [
45
- None ,
46
- Annotated [StrictFloat , Field (gt = 0 )],
47
- Tuple [
48
- Annotated [StrictFloat , Field (gt = 0 )],
49
- Annotated [StrictFloat , Field (gt = 0 )]
50
- ]
51
- ] = None ,
52
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
53
- _content_type : Optional [StrictStr ] = None ,
54
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
55
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
56
- ) -> None :
57
- """get
58
-
59
-
60
- :param path: (required)
61
- :type path: str
62
- :param _request_timeout: timeout setting for this request. If one
63
- number provided, it will be total request
64
- timeout. It can also be a pair (tuple) of
65
- (connection, read) timeouts.
66
- :type _request_timeout: int, tuple(int, int), optional
67
- :param _request_auth: set to override the auth_settings for an a single
68
- request; this effectively ignores the
69
- authentication in the spec for a single request.
70
- :type _request_auth: dict, optional
71
- :param _content_type: force content-type for the request.
72
- :type _content_type: str, Optional
73
- :param _headers: set to override the headers for a single
74
- request; this effectively ignores the headers
75
- in the spec for a single request.
76
- :type _headers: dict, optional
77
- :param _host_index: set to override the host_index for a single
78
- request; this effectively ignores the host_index
79
- in the spec for a single request.
80
- :type _host_index: int, optional
81
- :return: Returns the result object.
82
- """ # noqa: E501
83
-
84
- _param = self ._get_serialize (
85
- path = path ,
86
- _request_auth = _request_auth ,
87
- _content_type = _content_type ,
88
- _headers = _headers ,
89
- _host_index = _host_index
90
- )
91
-
92
- _response_types_map : Dict [str , Optional [str ]] = {
93
- '2XX' : None ,
94
- }
95
- response_data = self .api_client .call_api (
96
- * _param ,
97
- _request_timeout = _request_timeout
98
- )
99
- response_data .read ()
100
- return self .api_client .response_deserialize (
101
- response_data = response_data ,
102
- response_types_map = _response_types_map ,
103
- ).data
104
-
105
-
106
- @validate_call
107
- def get_with_http_info (
108
- self ,
109
- path : StrictStr ,
110
- _request_timeout : Union [
111
- None ,
112
- Annotated [StrictFloat , Field (gt = 0 )],
113
- Tuple [
114
- Annotated [StrictFloat , Field (gt = 0 )],
115
- Annotated [StrictFloat , Field (gt = 0 )]
116
- ]
117
- ] = None ,
118
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
119
- _content_type : Optional [StrictStr ] = None ,
120
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
121
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
122
- ) -> ApiResponse [None ]:
123
- """get
124
-
125
-
126
- :param path: (required)
127
- :type path: str
128
- :param _request_timeout: timeout setting for this request. If one
129
- number provided, it will be total request
130
- timeout. It can also be a pair (tuple) of
131
- (connection, read) timeouts.
132
- :type _request_timeout: int, tuple(int, int), optional
133
- :param _request_auth: set to override the auth_settings for an a single
134
- request; this effectively ignores the
135
- authentication in the spec for a single request.
136
- :type _request_auth: dict, optional
137
- :param _content_type: force content-type for the request.
138
- :type _content_type: str, Optional
139
- :param _headers: set to override the headers for a single
140
- request; this effectively ignores the headers
141
- in the spec for a single request.
142
- :type _headers: dict, optional
143
- :param _host_index: set to override the host_index for a single
144
- request; this effectively ignores the host_index
145
- in the spec for a single request.
146
- :type _host_index: int, optional
147
- :return: Returns the result object.
148
- """ # noqa: E501
149
-
150
- _param = self ._get_serialize (
151
- path = path ,
152
- _request_auth = _request_auth ,
153
- _content_type = _content_type ,
154
- _headers = _headers ,
155
- _host_index = _host_index
156
- )
157
-
158
- _response_types_map : Dict [str , Optional [str ]] = {
159
- '2XX' : None ,
160
- }
161
- response_data = self .api_client .call_api (
162
- * _param ,
163
- _request_timeout = _request_timeout
164
- )
165
- response_data .read ()
166
- return self .api_client .response_deserialize (
167
- response_data = response_data ,
168
- response_types_map = _response_types_map ,
169
- )
170
-
171
-
172
- @validate_call
173
- def get_without_preload_content (
174
- self ,
175
- path : StrictStr ,
176
- _request_timeout : Union [
177
- None ,
178
- Annotated [StrictFloat , Field (gt = 0 )],
179
- Tuple [
180
- Annotated [StrictFloat , Field (gt = 0 )],
181
- Annotated [StrictFloat , Field (gt = 0 )]
182
- ]
183
- ] = None ,
184
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
185
- _content_type : Optional [StrictStr ] = None ,
186
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
187
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
188
- ) -> RESTResponseType :
189
- """get
190
-
191
-
192
- :param path: (required)
193
- :type path: 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_serialize (
217
- path = path ,
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
- '2XX' : None ,
226
- }
227
- response_data = self .api_client .call_api (
228
- * _param ,
229
- _request_timeout = _request_timeout
230
- )
231
- return response_data .response
232
-
233
-
234
- def _get_serialize (
235
- self ,
236
- path ,
237
- _request_auth ,
238
- _content_type ,
239
- _headers ,
240
- _host_index ,
241
- ) -> RequestSerialized :
242
-
243
- _host = None
244
-
245
- _collection_formats : Dict [str , str ] = {
246
- }
247
-
248
- _path_params : Dict [str , str ] = {}
249
- _query_params : List [Tuple [str , str ]] = []
250
- _header_params : Dict [str , Optional [str ]] = _headers or {}
251
- _form_params : List [Tuple [str , str ]] = []
252
- _files : Dict [
253
- str , Union [str , bytes , List [str ], List [bytes ], List [Tuple [str , bytes ]]]
254
- ] = {}
255
- _body_params : Optional [bytes ] = None
256
-
257
- # process the path parameters
258
- if path is not None :
259
- _path_params ['path' ] = path
260
- # process the query parameters
261
- # process the header parameters
262
- # process the form parameters
263
- # process the body parameter
264
-
265
-
266
-
267
-
268
- # authentication setting
269
- _auth_settings : List [str ] = [
270
- 'apikey' ,
271
- 'X-Api-Key'
272
- ]
273
-
274
- return self .api_client .param_serialize (
275
- method = 'GET' ,
276
- resource_path = '/' ,
277
- path_params = _path_params ,
278
- query_params = _query_params ,
279
- header_params = _header_params ,
280
- body = _body_params ,
281
- post_params = _form_params ,
282
- files = _files ,
283
- auth_settings = _auth_settings ,
284
- collection_formats = _collection_formats ,
285
- _host = _host ,
286
- _request_auth = _request_auth
287
- )
288
-
289
-
290
-
291
-
292
40
@validate_call
293
41
def get_by_path (
294
42
self ,
0 commit comments