/
accountReports.clj
33 lines (28 loc) · 1.18 KB
/
accountReports.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.localservices.accountReports
"Local Services API: accountReports.
See: https://ads.google.com/local-services-ads/api/reference/rest/v1/accountReports"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn search$
"https://ads.google.com/local-services-ads/api/reference/rest/v1/accountReports/search
Required parameters: none
Optional parameters: startDate.day, pageToken, endDate.month, endDate.day, startDate.year, pageSize, query, startDate.month, endDate.year
Get account reports containing aggregate account data of all linked GLS accounts. Caller needs to provide their manager customer id and the associated auth credential that allows them read permissions on their linked accounts."
{:scopes ["https://www.googleapis.com/auth/adwords"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{})]}
(util/get-response
(http/get
(util/get-url
"https://localservices.googleapis.com/"
"v1/accountReports:search"
#{}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))