update functions;

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-02-27 21:48:13 -08:00
parent 2d90bb61be
commit cbf5f4df6d
16 changed files with 544 additions and 481 deletions

View File

@ -0,0 +1,45 @@
from typing import Any, Dict, Optional, Union
import base64
import httpx
from ...client import AuthenticatedClient
from ...models.file_conversion import FileConversion
from ...types import Response
from ...api.file.file_conversion_status import sync as fc_sync, asyncio as fc_asyncio
def sync(
id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, FileConversion]]:
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
fc = fc_sync(
id=id,
client=client,
)
if fc.output != "":
fc.output = base64.b64decode(fc.output)
return fc
async def asyncio(
id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, FileConversion]]:
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
fc = await fc_asyncio(
id=id,
client=client,
)
if fc.output != "":
fc.output = base64.b64decode(fc.output)
return fc