/
permissions.clj
33 lines (29 loc) · 1.06 KB
/
permissions.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.androidenterprise.permissions
"Google Play EMM API: permissions.
Manages the deployment of apps to Android for Work users.
See: https://developers.google.com/android/work/play/emm-apiapi/reference/rest/v1/permissions"
(: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/permissions/get
Required parameters: permissionId
Optional parameters: language
Retrieves details of an Android app permission for display to an enterprise admin."
{:scopes ["https://www.googleapis.com/auth/androidenterprise"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:permissionId})]}
(util/get-response
(http/get
(util/get-url
"https://www.googleapis.com/androidenterprise/v1/"
"permissions/{permissionId}"
#{:permissionId}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))