From 7313e8b074df0056b2caaf5babb7054624a748b8 Mon Sep 17 00:00:00 2001 From: tansuka <37882676+tansuka@users.noreply.github.com> Date: Wed, 20 Oct 2021 15:51:34 +0200 Subject: [PATCH] [Confluence] Expand get_page_child_by_type --- atlassian/confluence.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atlassian/confluence.py b/atlassian/confluence.py index ab09b4ffe..626629ea9 100644 --- a/atlassian/confluence.py +++ b/atlassian/confluence.py @@ -57,13 +57,14 @@ def page_exists(self, space, title): log.info('Page "{title}" does not exist in space "{space}"'.format(space=space, title=title)) return False - def get_page_child_by_type(self, page_id, type="page", start=None, limit=None): + def get_page_child_by_type(self, page_id, type="page", start=None, limit=None, expand=None): """ Provide content by type (page, blog, comment) :param page_id: A string containing the id of the type content container. :param type: :param start: OPTIONAL: The start point of the collection to return. Default: None (0). :param limit: OPTIONAL: how many items should be returned after the start index. Default: Site limit 200. + :param expand: OPTIONAL: expand e.g. history :return: """ params = {} @@ -71,7 +72,9 @@ def get_page_child_by_type(self, page_id, type="page", start=None, limit=None): params["start"] = int(start) if limit is not None: params["limit"] = int(limit) - + if expand is not None: + params["expand"] = expand + url = "rest/api/content/{page_id}/child/{type}".format(page_id=page_id, type=type) log.info(url)