Provide public method to retrieve data only

Created on 7 April 2024, 3 months ago
Updated 25 April 2024, 2 months ago

Problem/Motivation

The current public method for retrieving content OrangeDamApi::getContentItem(), does not, contrary to method name, only retrieve the data, but it also queues the data, meaning that there is no public method by which a user of this module can simply retrieve the data to be queued without queueing it.

While the default workflow of this module works with queuing, there are circumstances where once might desire to simply retrieve the data without queuing it. For instance, one might want to save an item for reference, or for testing.

Steps to reproduce

Call OrangeDamApi::getContentItem(). Item will be queued, even if you only wanted to retrieve it. Since there are no other public methods that simply retrieve the item, a user has to code their own-reimplementation without the queuing part, which of course is less DRY and is error prone.

Proposed resolution

1. Remove queueing operations from getContentItem()
2. Create new public method queueContentItem() which wraps around getContentItem() and also queues the item.
3. Make sure next release is versioned as a breaking api change (1.7).

Remaining tasks

Create a merge request with the above changes.

API changes

Users will have to convert any existing calls to getContentItem() to use queueContentItem().

Data model changes

na

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States apotek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024