code: public String createEvent(FutureAPIResponse response)
        throws ExecutionException, InterruptedException, IOException {
      int status = response.get().getStatus();
      String message = response.get().getMessage();
  
      if (status != HTTP_CREATED) {
        throw new IOException(status + " " + message);
      }
      return ((JsonObject) parser.parse(message)).get("eventId").getAsString();
    }
docs: Synchronize a previously sent asynchronous create event request.
  
  @param response an instance of {@link FutureAPIResponse} returned from {@link
  #createEventAsFuture}
  @return event ID from the server
  @throws ExecutionException indicates an error in the HTTP backend
  @throws InterruptedException indicates an interruption during the HTTP operation
  @throws IOException indicates an error from the API response