-
Notifications
You must be signed in to change notification settings - Fork 4
/
archive.clj
32 lines (29 loc) · 967 Bytes
/
archive.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
(ns happygapi.groupsmigration.archive
"Groups Migration API: archive.
Groups Migration Api.
See: https://developers.google.com/google-apps/groups-migration/api/reference/rest/v1/archive"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn insert$
"https://developers.google.com/google-apps/groups-migration/api/reference/rest/v1/archive/insert
Required parameters: groupId
Optional parameters: none
Inserts a new mail into the archive of the Google group."
{:scopes ["https://www.googleapis.com/auth/apps.groups.migration"]}
[auth args]
{:pre [(util/has-keys? args #{:groupId})]}
(util/get-response
(http/post
(util/get-url
"https://www.googleapis.com/groups/v1/groups/"
"{groupId}/archive"
#{:groupId}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))