-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add synchronous support to the DeliveryClient #109
Comments
@Jmathieu3289 can you assign to me? |
@cunhazera - it is yours. Please keep in mind to update the documentation and ideally add a test for the functionality. I would love to see this approach implemented: List<AgencySiteBlogLanding> blogHomepages = deliveryClient.getItems(AgencySiteBlogLanding.class).toSync(); I am still thinking, what is the best approach for the SDK to allow custom logging logic in case of failure so that this what do you think @Jmathieu3289? |
@Simply007 here is the PR: #112 Do you know why this repo is invalid for hacktoberfest? |
you could check the reason on your profile on https://hacktoberfest.digitalocean.com/profile. There have been a bunch of anti-spam initiatives this year. If there is anything I can help you to covert the pull request to a valid one, I am happy to do so. This is a normal and valid contribution if everything does well. I will comment on implementation in the pull request. |
@Simply007 I think you need to add the "hacktoberfest" topic. Thanks for the review, I'll check it out |
Added "hacktoberfest" topic. |
Motivation
After updating a large application to the latest version of the Java SDK, all calls to the DeliveryClient had to wrapped in a synchronous wrapper. It would be helpful if there were a built-in way to call the DeliveryClient synchronously rather than introducing additional code to the project.
Proposed solution
Add alternate methods for working with the DeliveryClient synchronously, for example:
deliveryClient.getItems().toSync()
ordeliveryClient.getItemsSynchronously()
Additional context
Here is the wrapper class that I had to write:
An example call using the wrapper:
An ideal way to use the DeliveryClient
The text was updated successfully, but these errors were encountered: