Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added possibility to share news based on a confluence page #1470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading