Skip to content

Commit 4599a94

Browse files
[Confluence] Add expand option to get_all_pages_by_label (#1454)
1 parent f9d7faa commit 4599a94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

atlassian/confluence.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,14 @@ def get_draft_page_by_id(self, page_id, status="draft", expand=None):
522522
# operate differently between different collaborative modes
523523
return self.get_page_by_id(page_id=page_id, expand=expand, status=status)
524524

525-
def get_all_pages_by_label(self, label, start=0, limit=50):
525+
def get_all_pages_by_label(self, label, start=0, limit=50, expand=None):
526526
"""
527527
Get all page by label
528528
:param label:
529529
:param start: OPTIONAL: The start point of the collection to return. Default: None (0).
530530
:param limit: OPTIONAL: The limit of the number of pages to return, this may be restricted by
531531
fixed system limits. Default: 50
532+
:param expand: OPTIONAL: a comma separated list of properties to expand on the content
532533
:return:
533534
"""
534535
url = "rest/api/content/search"
@@ -539,6 +540,8 @@ def get_all_pages_by_label(self, label, start=0, limit=50):
539540
params["start"] = start
540541
if limit:
541542
params["limit"] = limit
543+
if expand:
544+
params["expand"] = expand
542545

543546
try:
544547
response = self.get(url, params=params)

0 commit comments

Comments
 (0)