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.
22 23 24 25 |
# File 'lib/censys/api.rb', line 22 def initialize(type, api) @type = type @api = api end |
Instance Method Details
#[](id) ⇒ Object
37 38 39 |
# File 'lib/censys/api.rb', line 37 def [](id) @api.view(@type, id) end |
#report(params) ⇒ Object
44 45 46 |
# File 'lib/censys/api.rb', line 44 def report(params) @api.report(@type, params) end |
#search(params = {}) ⇒ Object
30 31 32 |
# File 'lib/censys/api.rb', line 30 def search(params = {}) @api.search(@type, params) end |