Skip to content

Conversation

dephekt
Copy link
Contributor

@dephekt dephekt commented Feb 25, 2021

Confluence template API transitioned to a stable version. Some things in our module are no longer in line with reality. The endpoint URL has changed to wiki/rest/api/template and some parameters have changed behavior. When getting templates or blueprints, a space is not required. If it's not given, all templates in the scope will be returned. I updated the parameters to not be required. The limit has also been updated to a default of 25. I switched those limit parameters to have a default "None" type, so if they're not specified, we don't pass them and we'll get the default API behavior.

We don't currently support deleting templates or creating/updating new content templates but there are REST API methods for that, so now is a good time to write that support.

Fixes #715

@dephekt
Copy link
Contributor Author

dephekt commented Feb 25, 2021

Drafting this until I finish writing the support for the three extra methods we don't support yet: create, update, and delete.

Edit: That's done, moving this to ready for review.

@dephekt dephekt marked this pull request as ready for review February 25, 2021 13:18
@dephekt
Copy link
Contributor Author

dephekt commented Feb 25, 2021

This needs tested before merging. I don't use or have Confluence in my org so if someone could test the new methods and confirm the old methods that I touched here are working that would be awesome 🎉

I left instructions here on what exactly needs checked: #715 (comment)

@dephekt
Copy link
Contributor Author

dephekt commented Feb 25, 2021

I also want to refactor the method names to be in-line with the upstream API methods, see this comment since I posted it in the issue instead of here by accident: #715 (comment)

@dephekt
Copy link
Contributor Author

dephekt commented Feb 26, 2021

This is ready to be merged as soon as someone is able to test the template methods.

@dephekt
Copy link
Contributor Author

dephekt commented Feb 26, 2021

Just rebasing off the current master. This is still ready to merge.

@codecov-io
Copy link

Codecov Report

Merging #731 (e628308) into master (f9ba354) will decrease coverage by 0.04%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #731      +/-   ##
==========================================
- Coverage   36.71%   36.67%   -0.05%     
==========================================
  Files          32       32              
  Lines        5556     5571      +15     
  Branches      794      798       +4     
==========================================
+ Hits         2040     2043       +3     
- Misses       3433     3445      +12     
  Partials       83       83              
Impacted Files Coverage Δ
atlassian/confluence.py 12.82% <28.57%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9ba354...e628308. Read the comment docs.

@dephekt dephekt marked this pull request as draft February 27, 2021 01:56
@dephekt
Copy link
Contributor Author

dephekt commented Feb 27, 2021

Need to readd old method names and add depreciation notice.

@gonchik
Copy link
Member

gonchik commented Mar 12, 2021

@dephekt Thank you! 👍🏽

@gonchik gonchik marked this pull request as ready for review March 13, 2021 11:05
@gonchik gonchik merged commit c9ef927 into atlassian-api:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template REST API endpoint not experimental anymore
3 participants