pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.94k stars 859 forks source link

Added raw api_get, api_put, api_post methods #1711

Closed dja852 closed 8 months ago

dja852 commented 1 year ago

Added 3 new methods to the JIRA class (get, put, and post) to enable a user to send a raw API call leveraging the established JIRA session and return a Response object for further handling.

This is useful to interact with an API endpoint not yet supported by this package.

github-actions[bot] commented 8 months ago

Label error. Requires exactly 1 of: bug, enhancement, major, minor, patch, skip-changelog. Found: feature

adehad commented 8 months ago

I'm hesitant to add this, we have the existing self._session which would give more flexibility to users who do want to create their own methods.

I think this example works best for the GET requests but for the others where there are other keyword arguments that could be added it is unfortunately limiting.

Perhaps we can add some documentation on how to add custom methods, eg via subclassing to highlight the recommended way to handle unsupported endpoints?

Thank you for the effort of this contribution, sorry it didn't work out this time, but look forward to more!