Class: DNSDB::Clients::Summarize
- Defined in:
- lib/dnsdb/clients/summarize.rb
Constant Summary
Constants inherited from Client
Client::BASE_URL, Client::HOST
Instance Method Summary collapse
- #rdata(type:, value:, rrtype: "ANY", **params) ⇒ Object
- #rrset(owner_name:, rrtype: nil, bailiwick: nil, **params) ⇒ Object
Methods inherited from Client
Constructor Details
This class inherits a constructor from DNSDB::Clients::Client
Instance Method Details
#rdata(type:, value:, rrtype: "ANY", **params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/dnsdb/clients/summarize.rb', line 6 def rdata(type:, value:, rrtype: "ANY", **params) path = if type == "ip" "/summarize/rdata/ip/#{value}" elsif rrtype "/summarize/rdata/name/#{value}/#{rrtype}" else "/summarize/rdata/name/#{value}" end _get(path, params, &:first) end |
#rrset(owner_name:, rrtype: nil, bailiwick: nil, **params) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dnsdb/clients/summarize.rb', line 18 def rrset(owner_name:, rrtype: nil, bailiwick: nil, **params) path = if bailiwick rrtype ||= "ANY" "/summarize/rrset/name/#{owner_name}/#{rrtype}/#{bailiwick}" elsif rrtype "/summarize/rrset/name/#{owner_name}/#{rrtype}" else "/summarize/rrset/name/#{owner_name}" end _get(path, params, &:first) end |