@@ -180,11 +180,7 @@ def parse(
180
180
raise ApiError (status_code = _response .status_code , body = _response_json )
181
181
182
182
def constants (
183
- self ,
184
- * ,
185
- file : core .File ,
186
- constants : typing .Optional [typing .Union [str , typing .Sequence [str ]]] = None ,
187
- request_options : typing .Optional [RequestOptions ] = None ,
183
+ self , * , file : core .File , constants : typing .List [str ], request_options : typing .Optional [RequestOptions ] = None
188
184
) -> ExtractConstantsResponse :
189
185
"""
190
186
Extracts specific constants from documents
@@ -194,8 +190,7 @@ def constants(
194
190
file : core.File
195
191
See core.File for more documentation
196
192
197
- constants : typing.Optional[typing.Union[str, typing.Sequence[str]]]
198
- List of constants to extract
193
+ constants : typing.List[str]
199
194
200
195
request_options : typing.Optional[RequestOptions]
201
196
Request-specific configuration.
@@ -204,14 +199,24 @@ def constants(
204
199
-------
205
200
ExtractConstantsResponse
206
201
Successful Response
202
+
203
+ Examples
204
+ --------
205
+ from axiomatic import Axiomatic
206
+
207
+ client = Axiomatic(
208
+ api_key="YOUR_API_KEY",
209
+ )
210
+ client.document.constants(
211
+ constants=["constants"],
212
+ )
207
213
"""
208
214
_response = self ._client_wrapper .httpx_client .request (
209
215
"document/constants" ,
210
216
method = "POST" ,
211
- params = {
217
+ data = {
212
218
"constants" : constants ,
213
219
},
214
- data = {},
215
220
files = {
216
221
"file" : file ,
217
222
},
@@ -419,11 +424,7 @@ async def main() -> None:
419
424
raise ApiError (status_code = _response .status_code , body = _response_json )
420
425
421
426
async def constants (
422
- self ,
423
- * ,
424
- file : core .File ,
425
- constants : typing .Optional [typing .Union [str , typing .Sequence [str ]]] = None ,
426
- request_options : typing .Optional [RequestOptions ] = None ,
427
+ self , * , file : core .File , constants : typing .List [str ], request_options : typing .Optional [RequestOptions ] = None
427
428
) -> ExtractConstantsResponse :
428
429
"""
429
430
Extracts specific constants from documents
@@ -433,8 +434,7 @@ async def constants(
433
434
file : core.File
434
435
See core.File for more documentation
435
436
436
- constants : typing.Optional[typing.Union[str, typing.Sequence[str]]]
437
- List of constants to extract
437
+ constants : typing.List[str]
438
438
439
439
request_options : typing.Optional[RequestOptions]
440
440
Request-specific configuration.
@@ -443,14 +443,32 @@ async def constants(
443
443
-------
444
444
ExtractConstantsResponse
445
445
Successful Response
446
+
447
+ Examples
448
+ --------
449
+ import asyncio
450
+
451
+ from axiomatic import AsyncAxiomatic
452
+
453
+ client = AsyncAxiomatic(
454
+ api_key="YOUR_API_KEY",
455
+ )
456
+
457
+
458
+ async def main() -> None:
459
+ await client.document.constants(
460
+ constants=["constants"],
461
+ )
462
+
463
+
464
+ asyncio.run(main())
446
465
"""
447
466
_response = await self ._client_wrapper .httpx_client .request (
448
467
"document/constants" ,
449
468
method = "POST" ,
450
- params = {
469
+ data = {
451
470
"constants" : constants ,
452
471
},
453
- data = {},
454
472
files = {
455
473
"file" : file ,
456
474
},
0 commit comments