Skip to content
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

GH-13 Wrapping Adobe I/O Events Publishing API #15

Merged
merged 5 commits into from
Jun 15, 2021

Conversation

francoisledroff
Copy link
Collaborator

@francoisledroff francoisledroff commented Jun 11, 2021

added the Publish API wrapper service

import java.util.UUID;
import org.apache.commons.lang3.StringUtils;

public class CloudEvent {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can use the Cloud event java SDK instead. https://github.com/cloudevents/sdk-java

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes I guess we could ... but that would require quite a bit of work
let me add this to the project backlog for now: #16

String apiUrl = StringUtils.isEmpty(url) ? PublishApi.DEFAULT_URL : url;
if (authInterceptor == null) {
throw new IllegalArgumentException(
"RegistrationService is missing a authentication interceptor");
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be publish service is missing ....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

*/
@RequestLine("POST ")
@Headers({"Content-Type: application/cloudevents+json"})
void post(CloudEvent body);
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can rename it to publish?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

*
* @param body your CloudEvent Input Model
*/
@RequestLine("POST ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

there is a space here. not sure if its intentional "POST"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes extra space was not harmful but not needed either

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.

2 participants