-
Notifications
You must be signed in to change notification settings - Fork 4
/
internalappsharingartifacts.clj
57 lines (51 loc) · 2.34 KB
/
internalappsharingartifacts.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.androidpublisher.internalappsharingartifacts
"Google Play Developer API: internalappsharingartifacts.
Accesses Android application developers' Google Play accounts.
See: https://developers.google.com/android-publisherapi/reference/rest/v3/internalappsharingartifacts"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn uploadapk$
"https://developers.google.com/android-publisherapi/reference/rest/v3/internalappsharingartifacts/uploadapk
Required parameters: packageName
Optional parameters: none
Uploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See: https://developers.google.com/api-client-library/java/google-api-java-client/errors for an example in java."
{:scopes ["https://www.googleapis.com/auth/androidpublisher"]}
[auth args]
{:pre [(util/has-keys? args #{:packageName})]}
(util/get-response
(http/post
(util/get-url
"https://www.googleapis.com/androidpublisher/v3/applications/"
"internalappsharing/{packageName}/artifacts/apk"
#{:packageName}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))
(defn uploadbundle$
"https://developers.google.com/android-publisherapi/reference/rest/v3/internalappsharingartifacts/uploadbundle
Required parameters: packageName
Optional parameters: none
Uploads an app bundle to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See: https://developers.google.com/api-client-library/java/google-api-java-client/errors for an example in java."
{:scopes ["https://www.googleapis.com/auth/androidpublisher"]}
[auth args]
{:pre [(util/has-keys? args #{:packageName})]}
(util/get-response
(http/post
(util/get-url
"https://www.googleapis.com/androidpublisher/v3/applications/"
"internalappsharing/{packageName}/artifacts/bundle"
#{:packageName}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))