From dd26de5133d4c4c1e41f921e18570f60214bff2f Mon Sep 17 00:00:00 2001 From: jzonthemtn Date: Fri, 17 Nov 2023 09:38:14 -0500 Subject: [PATCH] Renaming functions. --- src/main/java/ai/philterd/airlock/AirlockClient.java | 8 ++++---- .../java/ai/philterd/airlock/services/AirlockService.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ai/philterd/airlock/AirlockClient.java b/src/main/java/ai/philterd/airlock/AirlockClient.java index 655b9d0..361d227 100644 --- a/src/main/java/ai/philterd/airlock/AirlockClient.java +++ b/src/main/java/ai/philterd/airlock/AirlockClient.java @@ -148,9 +148,9 @@ private void configureSSL(final OkHttpClient.Builder okHttpClientBuilder, String * @return The filter {@link ApplyResponse}. * @throws IOException Thrown if the request can not be completed. */ - public ApplyResponse explain(String context, String documentId, String policyName, String text) throws IOException { + public ApplyResponse apply(String context, String documentId, String policyName, String text) throws IOException { - final Response response = service.apply(context, policyName, text).execute(); + final Response response = service.apply(context, documentId, policyName, text).execute(); if(response.isSuccessful()) { @@ -212,7 +212,7 @@ public StatusResponse status() throws IOException { */ public List getPolicies() throws IOException { - final Response> response = service.Policy().execute(); + final Response> response = service.policy().execute(); if(response.isSuccessful()) { @@ -246,7 +246,7 @@ public List getPolicies() throws IOException { */ public String Policy(String policyName) throws IOException { - final Response response = service.Policy(policyName).execute(); + final Response response = service.policy(policyName).execute(); if(response.isSuccessful()) { diff --git a/src/main/java/ai/philterd/airlock/services/AirlockService.java b/src/main/java/ai/philterd/airlock/services/AirlockService.java index d8954d6..e3023c7 100644 --- a/src/main/java/ai/philterd/airlock/services/AirlockService.java +++ b/src/main/java/ai/philterd/airlock/services/AirlockService.java @@ -30,15 +30,15 @@ public interface AirlockService { @Headers({"Accept: text/plain", "Content-Type: text/plain"}) @POST("/api/policies/apply") - Call apply(@Query("c") String context, @Query("p") String policyName, @Body String text); + Call apply(@Query("c") String context, @Query("d") String documentId, @Query("p") String policyName, @Body String text); @Headers({"Accept: application/json"}) @GET("/api/policies") - Call> Policy(); + Call> policy(); @Headers({"Accept: text/plain"}) @GET("/api/policies/{name}") - Call Policy(@Path("name") String policyName); + Call policy(@Path("name") String policyName); @Headers({"Content-Type: application/json"}) @POST("/api/policies")