/
pubprofiles.clj
33 lines (29 loc) · 1.11 KB
/
pubprofiles.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.adexchangebuyer.pubprofiles
"Ad Exchange Buyer API: pubprofiles.
Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
See: https://developers.google.com/ad-exchange/buyer-restapi/reference/rest/v1.4/pubprofiles"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn list$
"https://developers.google.com/ad-exchange/buyer-restapi/reference/rest/v1.4/pubprofiles/list
Required parameters: accountId
Optional parameters: none
Gets the requested publisher profile(s) by publisher accountId."
{:scopes ["https://www.googleapis.com/auth/adexchange.buyer"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:accountId})]}
(util/get-response
(http/get
(util/get-url
"https://www.googleapis.com/adexchangebuyer/v1.4/"
"publisher/{accountId}/profiles"
#{:accountId}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))