Closed cunhazera closed 3 years ago
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 https://github.com/Kentico/kontent-java-packages/issues/109#issuecomment-702618081.
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.
@cunhazera - do you have any update on this?
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!
Fixes #109
Commentary:
toSync
method, because I'd need to return an instance ofDeliveryClient
so the items should be stored in a field, so then I could have andeliveryClient.getItems(Class.class).toSync()
. If I did this, theDeliveryClient
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 atoSync
method.