from ._base import Base, FileType
from typing import Any
__all__ = ["Exports"]
[docs]
class Exports(Base):
[docs]
def list_exports(self):
"""List export files
`Read in Mattermost API docs (exports - ListExports) <https://developers.mattermost.com/api-documentation/#/operations/ListExports>`_
"""
return self.client.get("""/api/v4/exports""")
[docs]
def download_export(self, export_name: str):
"""Download an export file
export_name: The name of the export file to download
`Read in Mattermost API docs (exports - DownloadExport) <https://developers.mattermost.com/api-documentation/#/operations/DownloadExport>`_
"""
return self.client.get(f"/api/v4/exports/{export_name}")
[docs]
def delete_export(self, export_name: str):
"""Delete an export file
export_name: The name of the export file to delete
`Read in Mattermost API docs (exports - DeleteExport) <https://developers.mattermost.com/api-documentation/#/operations/DeleteExport>`_
"""
return self.client.delete(f"/api/v4/exports/{export_name}")
[docs]
def presign_export(self, export_name: str):
"""Create a presigned URL for export download
export_name: The name of the export file
`Read in Mattermost API docs (exports - PresignExport) <https://developers.mattermost.com/api-documentation/#/operations/PresignExport>`_
"""
return self.client.post(f"/api/v4/exports/{export_name}/presign-url")