Skip to content

Commit

Permalink
added example
Browse files Browse the repository at this point in the history
  • Loading branch information
gkowalc committed Dec 12, 2023
1 parent db3a4b0 commit 47dff27
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from atlassian import Confluence
import os
host="<cloud_instance_url/wiki>"

host = "<cloud_instance_url/wiki>"
username = "<user_email>"
password = "<API_TOKEN>"
confluence = Confluence(
Expand All @@ -13,8 +14,8 @@
# In this example we use current working directory where script is executed + subdirectory 'attachment_tests'

current_dir = os.getcwd()
my_path = current_dir + '/attachment_tests'
page = 393464 # make sure the page id exists and has attachments
my_path = current_dir + "/attachment_tests"
page = 393464 # make sure the page id exists and has attachments

confluence.download_attachments_from_page(page)
# Directory 'attachment_tests' should include saved attachment. If directory deosn't exist or if there is permission issue function should raise an error.

0 comments on commit 47dff27

Please sign in to comment.