-
Notifications
You must be signed in to change notification settings - Fork 4
/
v1beta1.clj
64 lines (55 loc) · 1.63 KB
/
v1beta1.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
58
59
60
61
62
63
64
(ns happygapi.alertcenter.v1beta1
"G Suite Alert Center API: v1beta1.
Manages alerts on issues affecting your domain.
See: https://developers.google.com/admin-sdk/alertcenter/api/reference/rest/v1beta1/v1beta1"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn $
"https://developers.google.com/admin-sdk/alertcenter/api/reference/rest/v1beta1/getSettings
Required parameters: none
Optional parameters: customerId
Returns customer-level settings."
{:scopes ["https://www.googleapis.com/auth/apps.alerts"]}
[auth args]
{:pre [(util/has-keys? args #{})]}
(util/get-response
(http/get
(util/get-url
"https://alertcenter.googleapis.com/"
"v1beta1/settings"
#{}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))
(defn $
"https://developers.google.com/admin-sdk/alertcenter/api/reference/rest/v1beta1/updateSettings
Required parameters: none
Optional parameters: customerId
Body:
{:notifications [{:cloudPubsubTopic CloudPubsubTopic}]}
Updates the customer-level settings."
{:scopes ["https://www.googleapis.com/auth/apps.alerts"]}
[auth args body]
{:pre [(util/has-keys? args #{})]}
(util/get-response
(http/patch
(util/get-url
"https://alertcenter.googleapis.com/"
"v1beta1/settings"
#{}
args)
(merge-with
merge
{:content-type :json,
:body (json/generate-string body),
:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))