-
Notifications
You must be signed in to change notification settings - Fork 4
/
domain.clj
32 lines (29 loc) · 916 Bytes
/
domain.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.domainsrdap.domain
"Domains RDAP API: domain.
Read-only public API that lets users search for information about domain names.
See: https://developers.google.com/domains/rdap/api/reference/rest/v1/domain"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn get$
"https://developers.google.com/domains/rdap/api/reference/rest/v1/domain/get
Required parameters: domainName
Optional parameters: none
Look up RDAP information for a domain by name."
{:scopes nil}
[auth args]
{:pre [(util/has-keys? args #{:domainName})]}
(util/get-response
(http/get
(util/get-url
"https://domainsrdap.googleapis.com/"
"v1/domain/{+domainName}"
#{:domainName}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))