From 5a891c7be458324cd3e58662247ec217792eb017 Mon Sep 17 00:00:00 2001 From: Gonchik Tsymzhitov Date: Tue, 3 Jan 2023 15:26:27 +0200 Subject: [PATCH] Confuence: add workaround #1090 --- atlassian/confluence.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/atlassian/confluence.py b/atlassian/confluence.py index 2a767f89a..e246c55ff 100644 --- a/atlassian/confluence.py +++ b/atlassian/confluence.py @@ -492,7 +492,7 @@ def get_all_pages_by_label(self, label, start=0, limit=50): return response.get("results") - def get_all_pages_from_space( + def get_all_pages_from_space_raw( self, space, start=0, @@ -545,6 +545,35 @@ def get_all_pages_from_space( return response + def get_all_pages_from_space( + self, + space, + start=0, + limit=50, + status=None, + expand=None, + content_type="page", + ): + """ + Get all pages from space + + :param space: + :param start: OPTIONAL: The start point of the collection to return. Default: None (0). + :param limit: OPTIONAL: The limit of the number of pages to return, this may be restricted by + fixed system limits. Default: 50 + :param status: OPTIONAL: list of statuses the content to be found is in. + Defaults to current is not specified. + If set to 'any', content in 'current' and 'trashed' status will be fetched. + Does not support 'historical' status for now. + :param expand: OPTIONAL: a comma separated list of properties to expand on the content. + Default value: history,space,version. + :param content_type: the content type to return. Default value: page. Valid values: page, blogpost. + :return: + """ + return self.get_all_pages_from_space_raw( + space=space, start=start, limit=limit, status=status, expand=expand, content_type=content_type + ).get("results") + def get_all_pages_from_space_trash(self, space, start=0, limit=500, status="trashed", content_type="page"): """ Get list of pages from trash