-
Notifications
You must be signed in to change notification settings - Fork 4
/
grouplicenses.clj
57 lines (51 loc) · 1.8 KB
/
grouplicenses.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(ns happygapi.androidenterprise.grouplicenses
"Google Play EMM API: grouplicenses.
Manages the deployment of apps to Android for Work users.
See: https://developers.google.com/android/work/play/emm-apiapi/reference/rest/v1/grouplicenses"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn get$
"https://developers.google.com/android/work/play/emm-apiapi/reference/rest/v1/grouplicenses/get
Required parameters: enterpriseId, groupLicenseId
Optional parameters: none
Retrieves details of an enterprise's group license for a product."
{:scopes ["https://www.googleapis.com/auth/androidenterprise"]}
[auth args]
{:pre [(util/has-keys? args #{:enterpriseId :groupLicenseId})]}
(util/get-response
(http/get
(util/get-url
"https://www.googleapis.com/androidenterprise/v1/"
"enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}"
#{:enterpriseId :groupLicenseId}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))
(defn list$
"https://developers.google.com/android/work/play/emm-apiapi/reference/rest/v1/grouplicenses/list
Required parameters: enterpriseId
Optional parameters: none
Retrieves IDs of all products for which the enterprise has a group license."
{:scopes ["https://www.googleapis.com/auth/androidenterprise"]}
[auth args]
{:pre [(util/has-keys? args #{:enterpriseId})]}
(util/get-response
(http/get
(util/get-url
"https://www.googleapis.com/androidenterprise/v1/"
"enterprises/{enterpriseId}/groupLicenses"
#{:enterpriseId}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))