-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Confluence: update_page_property method + example (#536)
- Loading branch information
Dmitrij Djachkov
authored
Jul 16, 2020
1 parent
12793dd
commit 2161198
Showing
2 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# coding=utf-8 | ||
from atlassian import Confluence | ||
|
||
"""This example shows how to export pages""" | ||
|
||
confluence = Confluence( | ||
url='http://localhost:8090', | ||
username='admin', | ||
password='admin') | ||
|
||
# Set page property | ||
data = { | ||
"key": "newprp", | ||
"value": { | ||
"anything": "goes" | ||
} | ||
} | ||
print("SET") | ||
print(confluence.set_page_property(242793586, data)) | ||
|
||
# # Get page property | ||
print("GET") | ||
print(confluence.get_page_property(242793586, "newprp")) | ||
|
||
|
||
# Update page property | ||
data = { | ||
"key": "newprp", | ||
"value": { | ||
"anything": "goes around" | ||
}, | ||
"version": { | ||
"number": 2, | ||
"minorEdit": False, | ||
"hidden": False | ||
} | ||
} | ||
print("UPDATE") | ||
print(confluence.update_page_property(242793586, data)) | ||
|
||
# Delete page property | ||
print("DELETE") | ||
print(confluence.delete_page_property(242793586, "newprp")) |