-
Notifications
You must be signed in to change notification settings - Fork 4
/
operations.clj
33 lines (29 loc) · 1.26 KB
/
operations.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(ns happygapi.documentai.operations
"Cloud Document AI API: operations.
Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.
See: https://cloud.google.com/document-ai/docs/api/reference/rest/v1/operations"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn delete$
"https://cloud.google.com/document-ai/docs/api/reference/rest/v1/operations/delete
Required parameters: name
Optional parameters: none
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`."
{:scopes ["https://www.googleapis.com/auth/cloud-platform"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:name})]}
(util/get-response
(http/delete
(util/get-url
"https://documentai.googleapis.com/"
"v1/{+name}"
#{:name}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))