Skip to content

Commit

Permalink
Confluence: added possibility to share news based on a confluence page (
Browse files Browse the repository at this point in the history
#1470)

* added possibility to share news based on a confluence page

* removed f-strings, types and trailing spaces.
  • Loading branch information
hyGeorg authored Jan 7, 2025
1 parent f0a88f2 commit f53db77
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,24 @@ def page_exists(self, space, title, type=None):
else:
return False

def share_with_others(self,page_id, group, message):
"""
Notify members (currently only groups implemented) about something on that page
"""
url = "rest/share-page/latest/share"
params = {
"contextualPageId": page_id,
#"emails": [],
"entityId": page_id,
"entityType": "page",
"groups": group,
"note": message
#"users":[]
}
r = self.post(url, json=params,headers={"contentType":"application/json; charset=utf-8"},advanced_mode=True)
if r.status_code != 200:
raise Exception("failed sharing content {code}: {reason}".format(code=r.status_code,reason=r.text))

def get_page_child_by_type(self, page_id, type="page", start=None, limit=None, expand=None):
"""
Provide content by type (page, blog, comment)
Expand Down

0 comments on commit f53db77

Please sign in to comment.