Method: Censys::API#view
- Defined in:
- lib/censys/api.rb
#view(resource, id) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Requests the document of the given type.
140 141 142 143 144 145 146 |
# File 'lib/censys/api.rb', line 140 def view(resource, id) document_class = DOCUMENTS.fetch(resource) get("/view/#{resource}/#{id}") do |attributes| document_class.new(attributes) end end |