Skip to content

Commit

Permalink
Confuence: add workaround atlassian-api#1090
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Jan 3, 2023
1 parent 3ef0027 commit 5a891c7
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a891c7

Please sign in to comment.