-
Notifications
You must be signed in to change notification settings - Fork 4
/
operations.clj
34 lines (30 loc) · 1.08 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
34
(ns happygapi.apikeys.operations
"API Keys API: operations.
Manages the API keys associated with developer projects.
See: https://cloud.google.com/api-keys/docsapi/reference/rest/v2/operations"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn get$
"https://cloud.google.com/api-keys/docsapi/reference/rest/v2/operations/get
Required parameters: name
Optional parameters: none
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service."
{:scopes ["https://www.googleapis.com/auth/cloud-platform"
"https://www.googleapis.com/auth/cloud-platform.read-only"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:name})]}
(util/get-response
(http/get
(util/get-url
"https://apikeys.googleapis.com/"
"v2/{+name}"
#{:name}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))