Skip to content

Group API calls into sub-classes #229

Open
@aik099

Description

@aik099

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions