Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group API calls into sub-classes #229

Open
aik099 opened this issue Jan 4, 2025 · 0 comments
Open

Group API calls into sub-classes #229

aik099 opened this issue Jan 4, 2025 · 0 comments
Milestone

Comments

@aik099
Copy link
Member

aik099 commented Jan 4, 2025

The Jira API is huge (lots of API calls). With time we could end up having all of them present in the Api class, which would produce a huge class.

Proposing to create the separate classes based on API call groups in Jira REST API itself and move corresponding calls there.

For example:

// Before:
$api->addWorklog(...);

// After:
// $api->worklogs->addWorklog(...)

For BC reasons a __call method could be added, that would forward calls to unknown methods to the corresponding classes.

The properties themselves would be proxy classes (a lightweight proxy class is always present, but a heavy underlying class object is created only when needed).

@aik099 aik099 added this to the v2.1.0 milestone Jan 4, 2025
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

No branches or pull requests

1 participant