diff options
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r-- | gitlab/v4/objects.py | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 8852a1e..281d3c7 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -4097,36 +4097,9 @@ class ProjectWikiManager(CRUDMixin, RESTManager): _list_filters = ("with_content",) -class ProjectExport(RefreshMixin, RESTObject): +class ProjectExport(ExportMixin, RefreshMixin, RESTObject): _id_attr = None - @cli.register_custom_action("ProjectExport") - @exc.on_http_error(exc.GitlabGetError) - def download(self, streamed=False, action=None, chunk_size=1024, **kwargs): - """Download the archive of a project export. - - Args: - streamed (bool): If True the data will be processed by chunks of - `chunk_size` and each chunk is passed to `action` for - reatment - action (callable): Callable responsible of dealing with chunk of - data - chunk_size (int): Size of each chunk - **kwargs: Extra options to send to the server (e.g. sudo) - - Raises: - GitlabAuthenticationError: If authentication is not correct - GitlabGetError: If the server failed to perform the request - - Returns: - str: The blob content if streamed is False, None otherwise - """ - path = "/projects/%s/export/download" % self.project_id - result = self.manager.gitlab.http_get( - path, streamed=streamed, raw=True, **kwargs - ) - return utils.response_content(result, streamed, action, chunk_size) - class ProjectExportManager(GetWithoutIdMixin, CreateMixin, RESTManager): _path = "/projects/%(project_id)s/export" |