diff --git a/atlassian/confluence.py b/atlassian/confluence.py index 0bea94f6b..dbaa1f22b 100644 --- a/atlassian/confluence.py +++ b/atlassian/confluence.py @@ -136,6 +136,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)