From 9e80c3d0003547df5c1ec1167b0f0c4dd8b0e294 Mon Sep 17 00:00:00 2001 From: Deep Singhvi Date: Thu, 3 Nov 2022 18:49:32 -0700 Subject: [PATCH] add send methods to root (#4) --- .fernignore | 1 + src/main/java/com/raven/api/RavenApiClient.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/.fernignore b/.fernignore index 945a79d..527e347 100644 --- a/.fernignore +++ b/.fernignore @@ -2,3 +2,4 @@ README.md sample-app +src/main/java/com/raven/api/RavenApiClient.java \ No newline at end of file diff --git a/src/main/java/com/raven/api/RavenApiClient.java b/src/main/java/com/raven/api/RavenApiClient.java index 73b802f..49ae086 100644 --- a/src/main/java/com/raven/api/RavenApiClient.java +++ b/src/main/java/com/raven/api/RavenApiClient.java @@ -3,6 +3,11 @@ import com.raven.api.client.Authorization; import com.raven.api.client.device.DeviceServiceClient; import com.raven.api.client.event.EventServiceClient; +import com.raven.api.client.event.endpoints.Send; +import com.raven.api.client.event.endpoints.SendBulk; +import com.raven.api.client.event.exceptions.SendBulkException; +import com.raven.api.client.event.exceptions.SendException; +import com.raven.api.client.event.types.SendEventResponse; import com.raven.api.client.user.UserServiceClient; import java.lang.String; import java.util.Objects; @@ -40,6 +45,14 @@ public final UserServiceClient user() { return this.userServiceClient.get(); } + public SendEventResponse send(Send.Request request) throws SendException { + return event().send(request); + } + + public SendEventResponse sendBulk(SendBulk.Request request) throws SendBulkException { + return event().sendBulk(request); + } + private static Supplier memoize(Supplier delegate) { AtomicReference value = new AtomicReference<>(); return () -> {