Skip to content

Adding a get sync getItems method#112

Closed
cunhazera wants to merge 3 commits intokontent-ai:masterfrom
cunhazera:get-items-sync
Closed

Adding a get sync getItems method#112
cunhazera wants to merge 3 commits intokontent-ai:masterfrom
cunhazera:get-items-sync

Conversation

@cunhazera
Copy link
Contributor

Fixes #109

Commentary:

  • It would be little harder to have a toSync method, because I'd need to return an instance of DeliveryClient so the items should be stored in a field, so then I could have an deliveryClient.getItems(Class.class).toSync(). If I did this, the DeliveryClient class would need a generic type at the class level, so that would break a lot of old code. Anyway, if anyone has a better idea we can talk about, to have a toSync method.

@Simply007
Copy link
Contributor

This pull request only covers only the getItems method, but there is a bunch of remaining in the delivery client (i.e. getTypes).

I would like to avoid doubling the method count in the delivery client. I would appreciate a unified approach.
It might be possible to inherit from CompletionStage and extend it with a method called toSync. This would not break any compatibility, because of inheritance and it would allow having nice and fluent syntax as described in #109 (comment).

According to the tests, I would like to not have current tests modified and just add new ones, because the functionality is also just added, not modified.

Mind the Readme - there should be the mention of the functionality too.

@Simply007 Simply007 self-requested a review October 6, 2020 07:42
Copy link
Contributor

@Simply007 Simply007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Simply007
Copy link
Contributor

@cunhazera - do you have any update on this?

@Simply007
Copy link
Contributor

Hi!

This pull request has gone quiet. 👻
It’s been a while since the last update here.

If we missed anything on this issue or if you want to keep it open, feel free to do so.

Thanks for being a part of the Kentico community!

@Simply007 Simply007 closed this Dec 14, 2020
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.

Add synchronous support to the DeliveryClient

3 participants