-
Notifications
You must be signed in to change notification settings - Fork 4
/
operations.clj
34 lines (31 loc) · 1.04 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.androiddeviceprovisioning.operations
"Android Device Provisioning Partner API: operations.
Automates Android zero-touch enrollment for device resellers, customers, and EMMs.
See: https://developers.google.com/zero-touch/api/reference/rest/v1/operations"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn get$
"https://developers.google.com/zero-touch/api/reference/rest/v1/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 nil}
[auth args]
{:pre [(util/has-keys? args #{:name})]}
(util/get-response
(http/get
(util/get-url
"https://androiddeviceprovisioning.googleapis.com/"
"v1/{+name}"
#{:name}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))