Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,7 @@ def update_page(
representation="storage",
minor_edit=False,
version_comment=None,
always_update=False,
):
"""
Update page if already exist
Expand All @@ -1267,11 +1268,12 @@ def update_page(
:param minor_edit: Indicates whether to notify watchers about changes.
If False then notifications will be sent.
:param version_comment: Version comment
:param always_update: Whether always to update (suppress content check)
:return:
"""
log.info('Updating {type} "{title}"'.format(title=title, type=type))

if body is not None and self.is_page_content_is_already_updated(page_id, body, title):
if not always_update and body is not None and self.is_page_content_is_already_updated(page_id, body, title):
return self.get_page_by_id(page_id)

try:
Expand Down Expand Up @@ -1768,15 +1770,16 @@ def get_all_members(self, group_name="confluence-users", expand=None):
print("Did not get members from {} group, please check permissions or connectivity".format(group_name))
return members

def get_space(self, space_key, expand="description.plain,homepage"):
def get_space(self, space_key, expand="description.plain,homepage", params=None):
"""
Get information about a space through space key
:param space_key: The unique space key name
:param expand: OPTIONAL: additional info from description, homepage
:param params: OPTIONAL: dictionary of additional URL parameters
:return: Returns the space along with its ID
"""
url = "rest/api/space/{space_key}".format(space_key=space_key)
params = {}
params = params or {}
if expand:
params["expand"] = expand
try:
Expand Down