Class: Cymon::Endpoint::Search
- Defined in:
- lib/cymon/endpoint/search.rb
Constant Summary collapse
- PATH =
'ioc/search'
Instance Attribute Summary
Attributes inherited from Base
#api, #api_version_path, #client
Instance Method Summary collapse
-
#by_domain(value, params = {}) ⇒ Object
Search threat reports by domain name.
-
#by_feed(value, params = {}) ⇒ Object
Search threat reports by feed.
-
#by_hostname(value, params = {}) ⇒ Object
Search threat reports by hostname.
-
#by_ip(value, params = {}) ⇒ Object
Search threat reports by IP address (IPv4 and IPv6).
-
#by_md5(value, params = {}) ⇒ Object
Search threat reports by md5.
-
#by_sha1(value, params = {}) ⇒ Object
Search threat reports by sha1.
-
#by_sha256(value, params = {}) ⇒ Object
Search threat reports by sha256.
-
#by_term(value, params = {}) ⇒ Object
Search threat reports by term.
- #url_path ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from Cymon::Endpoint::Base
Instance Method Details
#by_domain(value, params = {}) ⇒ Object
Search threat reports by domain name. docs.cymon.io/#search-search-by-domain-get
30 31 32 33 34 |
# File 'lib/cymon/endpoint/search.rb', line 30 def by_domain(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/domain/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_feed(value, params = {}) ⇒ Object
Search threat reports by feed. docs.cymon.io/#search-search-by-feed-get
78 79 80 81 82 |
# File 'lib/cymon/endpoint/search.rb', line 78 def by_feed(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/feed/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_hostname(value, params = {}) ⇒ Object
Search threat reports by hostname. docs.cymon.io/#search-search-by-hostname-get
38 39 40 41 42 |
# File 'lib/cymon/endpoint/search.rb', line 38 def by_hostname(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/hostname/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_ip(value, params = {}) ⇒ Object
Search threat reports by IP address (IPv4 and IPv6). docs.cymon.io/#search-search-by-ip-get
22 23 24 25 26 |
# File 'lib/cymon/endpoint/search.rb', line 22 def by_ip(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/ip/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_md5(value, params = {}) ⇒ Object
Search threat reports by md5. docs.cymon.io/#search-search-by-md5-get
46 47 48 49 50 |
# File 'lib/cymon/endpoint/search.rb', line 46 def by_md5(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/md5/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_sha1(value, params = {}) ⇒ Object
Search threat reports by sha1. docs.cymon.io/#search-search-by-sha1-get
54 55 56 57 58 |
# File 'lib/cymon/endpoint/search.rb', line 54 def by_sha1(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/sha1/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_sha256(value, params = {}) ⇒ Object
Search threat reports by sha256. docs.cymon.io/#search-search-by-sha256-get
62 63 64 65 66 |
# File 'lib/cymon/endpoint/search.rb', line 62 def by_sha256(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/sha256/#{value}", params) Cymon::Responses::Search.new(response) end |
#by_term(value, params = {}) ⇒ Object
Search threat reports by term. docs.cymon.io/#search-search-by-term-get
70 71 72 73 74 |
# File 'lib/cymon/endpoint/search.rb', line 70 def by_term(value, params = {}) params = default_params(params) response = @api.get("#{url_path}/term/#{value}", params) Cymon::Responses::Search.new(response) end |
#url_path ⇒ Object
9 10 11 |
# File 'lib/cymon/endpoint/search.rb', line 9 def url_path "#{api_version_path}/#{PATH}" end |