Class: Censys::API::Resource
- Inherits:
-
Object
- Object
- Censys::API::Resource
- Defined in:
- lib/censys/api.rb
Instance Method Summary collapse
- #[](id) ⇒ Object
-
#initialize(type, api) ⇒ Resource
constructor
A new instance of Resource.
- #report(params) ⇒ Object
- #search(params = {}) ⇒ Object
Constructor Details
#initialize(type, api) ⇒ Resource
Returns a new instance of Resource.
19 20 21 22 |
# File 'lib/censys/api.rb', line 19 def initialize(type, api) @type = type @api = api end |
Instance Method Details
#[](id) ⇒ Object
34 35 36 |
# File 'lib/censys/api.rb', line 34 def [](id) @api.view(@type, id) end |
#report(params) ⇒ Object
41 42 43 |
# File 'lib/censys/api.rb', line 41 def report(params) @api.report(@type, params) end |
#search(params = {}) ⇒ Object
27 28 29 |
# File 'lib/censys/api.rb', line 27 def search(params = {}) @api.search(@type, params) end |