-
Notifications
You must be signed in to change notification settings - Fork 4
/
nameserver.clj
33 lines (30 loc) · 1 KB
/
nameserver.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.domainsrdap.nameserver
"Domains RDAP API: nameserver.
Read-only public API that lets users search for information about domain names.
See: https://developers.google.com/domains/rdap/api/reference/rest/v1/nameserver"
(: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/nameserver/get
Required parameters: nameserverId
Optional parameters: none
The RDAP API recognizes this command from the RDAP specification but
does not support it. The response is a formatted 501 error."
{:scopes nil}
[auth args]
{:pre [(util/has-keys? args #{:nameserverId})]}
(util/get-response
(http/get
(util/get-url
"https://domainsrdap.googleapis.com/"
"v1/nameserver/{nameserverId}"
#{:nameserverId}
args)
(merge-with
merge
{:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))