Skip to content

Commit

Permalink
add send methods to root (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Nov 4, 2022
1 parent 739af2b commit 9e80c3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

README.md
sample-app
src/main/java/com/raven/api/RavenApiClient.java
13 changes: 13 additions & 0 deletions src/main/java/com/raven/api/RavenApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 <T> Supplier<T> memoize(Supplier<T> delegate) {
AtomicReference<T> value = new AtomicReference<>();
return () -> {
Expand Down

0 comments on commit 9e80c3d

Please sign in to comment.