-
Notifications
You must be signed in to change notification settings - Fork 4
/
reportTypes.clj
33 lines (30 loc) · 1.14 KB
/
reportTypes.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.youtubereporting.reportTypes
"YouTube Reporting API: reportTypes.
Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.
See: https://developers.google.com/youtube/reporting/v1/reports/api/reference/rest/v1/reportTypes"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn list$
"https://developers.google.com/youtube/reporting/v1/reports/api/reference/rest/v1/reportTypes/list
Required parameters: none
Optional parameters: onBehalfOfContentOwner, pageToken, includeSystemManaged, pageSize
Lists report types."
{:scopes ["https://www.googleapis.com/auth/yt-analytics-monetary.readonly"
"https://www.googleapis.com/auth/yt-analytics.readonly"]}
[auth args]
{:pre [(util/has-keys? args #{})]}
(util/get-response
(http/get
(util/get-url
"https://youtubereporting.googleapis.com/"
"v1/reportTypes"
#{}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))