-
Notifications
You must be signed in to change notification settings - Fork 4
/
threatLists.clj
32 lines (29 loc) · 1.17 KB
/
threatLists.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
(ns happygapi.safebrowsing.threatLists
"Safe Browsing API: threatLists.
Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
See: https://developers.google.com/safe-browsing/api/reference/rest/v4/threatLists"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn list$
"https://developers.google.com/safe-browsing/api/reference/rest/v4/threatLists/list
Required parameters: none
Optional parameters: none
Lists the Safe Browsing threat lists available for download."
{:scopes nil}
[auth args]
{:pre [(util/has-keys? args #{})]}
(util/get-response
(http/get
(util/get-url
"https://safebrowsing.googleapis.com/"
"v4/threatLists"
#{}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))