Skip to content

Commit

Permalink
Renaming functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Nov 17, 2023
1 parent e5544f9 commit dd26de5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/ai/philterd/airlock/AirlockClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ApplyResponse> response = service.apply(context, policyName, text).execute();
final Response<ApplyResponse> response = service.apply(context, documentId, policyName, text).execute();

if(response.isSuccessful()) {

Expand Down Expand Up @@ -212,7 +212,7 @@ public StatusResponse status() throws IOException {
*/
public List<String> getPolicies() throws IOException {

final Response<List<String>> response = service.Policy().execute();
final Response<List<String>> response = service.policy().execute();

if(response.isSuccessful()) {

Expand Down Expand Up @@ -246,7 +246,7 @@ public List<String> getPolicies() throws IOException {
*/
public String Policy(String policyName) throws IOException {

final Response<String> response = service.Policy(policyName).execute();
final Response<String> response = service.policy(policyName).execute();

if(response.isSuccessful()) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public interface AirlockService {

@Headers({"Accept: text/plain", "Content-Type: text/plain"})
@POST("/api/policies/apply")
Call<ApplyResponse> apply(@Query("c") String context, @Query("p") String policyName, @Body String text);
Call<ApplyResponse> apply(@Query("c") String context, @Query("d") String documentId, @Query("p") String policyName, @Body String text);

@Headers({"Accept: application/json"})
@GET("/api/policies")
Call<List<String>> Policy();
Call<List<String>> policy();

@Headers({"Accept: text/plain"})
@GET("/api/policies/{name}")
Call<String> Policy(@Path("name") String policyName);
Call<String> policy(@Path("name") String policyName);

@Headers({"Content-Type: application/json"})
@POST("/api/policies")
Expand Down

0 comments on commit dd26de5

Please sign in to comment.