-
Notifications
You must be signed in to change notification settings - Fork 4
/
accounts.clj
39 lines (33 loc) · 1.12 KB
/
accounts.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
(ns happygapi.playcustomapp.accounts
"Google Play Custom App Publishing API: accounts.
An API to publish custom Android apps.
See: https://developers.google.com/android/work/play/custom-app-apiapi/reference/rest/v1/accounts"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn customApps-create$
"https://developers.google.com/android/work/play/custom-app-apiapi/reference/rest/v1/accounts/customApps/create
Required parameters: account
Optional parameters: none
Body:
{:languageCode string, :title string}
Create and publish a new custom app."
{:scopes ["https://www.googleapis.com/auth/androidpublisher"]}
[auth args body]
{:pre [(util/has-keys? args #{:account})]}
(util/get-response
(http/post
(util/get-url
"https://www.googleapis.com/playcustomapp/v1/accounts/"
"{account}/customApps"
#{:account}
args)
(merge-with
merge
{:content-type :json,
:body (json/generate-string body),
:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))