atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

Download attachments from page #1283

Closed gkowalc closed 6 months ago

gkowalc commented 6 months ago

Created new method Confluence "download_attachments_from_page". Method downloads attachments from given page id and saves them to the current directory (where the script is run) when using default path=None parameter.

It is possible to select other directory path by specifying absolute path. If custom directory doesn't exist or there is a permission error method should raise an error.

I run local tests on macos and linux hosts.

In addition to above, I also added relevant example usage and updated the docs.

codecov-commenter commented 6 months ago

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (3e1ef05) 34.51% compared to head (47dff27) 34.43%.

Files Patch % Lines
atlassian/confluence.py 4.34% 22 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1283 +/- ## ========================================== - Coverage 34.51% 34.43% -0.09% ========================================== Files 45 45 Lines 8184 8207 +23 Branches 1134 1140 +6 ========================================== + Hits 2825 2826 +1 - Misses 5245 5267 +22 Partials 114 114 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.