Class: PassiveTotal::Client::Action
- Defined in:
- lib/passivetotal/clients/action.rb
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#add_tags(query:, tags:) ⇒ Hash
Adds tags to a given artifact.
-
#bulk_classification(*query) ⇒ Hash
Retrieve classification statuses for given domains.
-
#classification(query) ⇒ Hash
Retrieve classification status for a given domain.
-
#delete_tags(query:, tags:) ⇒ Hash
Removes tags from an artifact.
-
#dynamic_dns(query) ⇒ Hash
Indicates whether or not a domain’s DNS records are updated via dynamic DNS.
-
#ever_compromised(query) ⇒ Hash
Indicates whether or not a given domain has ever been compromised.
-
#monitor(query) ⇒ Hash
Indicates whether or not a domain is monitored.
-
#search_by_tags(query) ⇒ Hash
Retrieve artifacts for a given tag.
-
#set_bulk_classification(queries:, classification:) ⇒ Hash
Set classification statuses for given domains.
-
#set_classification(query:, classification:) ⇒ Hash
Sets the classification status for a given domain.
-
#set_dynamic_dns(query:, status:) ⇒ Hash
Sets a domain’s status to indicate whether or not its DNS records are updated via dynamic DNS.
-
#set_ever_compromised(query:, status:) ⇒ Hash
Sets status for a domain to indicate if it has ever been compromised.
-
#set_sinkhole(query:, status:) ⇒ Hash
Sets status for an IP address to indicate whether or not it is a sinkhole.
-
#set_tags(query:, tags:) ⇒ Hash
Sets the tags for a given artifact.
-
#sinkhole(query) ⇒ Hash
Indicates whether or not an IP address is a sinkhole.
-
#tags(query) ⇒ Hash
Retrieves tags for a given artifact.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PassiveTotal::Client::Base
Instance Method Details
#add_tags(query:, tags:) ⇒ Hash
Adds tags to a given artifact. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsTags
15 16 17 18 19 20 21 22 |
# File 'lib/passivetotal/clients/action.rb', line 15 def (query:, tags:) params = { query: query, tags: , }.compact _post("/actions/tags", params) { |json| json } end |
#bulk_classification(*query) ⇒ Hash
Retrieve classification statuses for given domains. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsBulkClassification
50 51 52 53 54 55 56 |
# File 'lib/passivetotal/clients/action.rb', line 50 def bulk_classification(*query) params = { query: query, }.compact _get("/actions/bulk/classification", params) { |json| json } end |
#classification(query) ⇒ Hash
Retrieve classification status for a given domain. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsClassification
66 67 68 69 70 71 72 |
# File 'lib/passivetotal/clients/action.rb', line 66 def classification(query) params = { query: query, }.compact _get("/actions/classification", params) { |json| json } end |
#delete_tags(query:, tags:) ⇒ Hash
Removes tags from an artifact. api.passivetotal.org/api/docs/#api-Actions-DeleteV2ActionsTags
33 34 35 36 37 38 39 40 |
# File 'lib/passivetotal/clients/action.rb', line 33 def (query:, tags:) params = { query: query, tags: , }.compact _delete("/actions/tags", params) { |json| json } end |
#dynamic_dns(query) ⇒ Hash
Indicates whether or not a domain’s DNS records are updated via dynamic DNS. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsDynamicDns
98 99 100 101 102 103 104 |
# File 'lib/passivetotal/clients/action.rb', line 98 def dynamic_dns(query) params = { query: query, }.compact _get("/actions/dynamic-dns", params) { |json| json } end |
#ever_compromised(query) ⇒ Hash
Indicates whether or not a given domain has ever been compromised. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsEverCompromised
82 83 84 85 86 87 88 |
# File 'lib/passivetotal/clients/action.rb', line 82 def ever_compromised(query) params = { query: query, }.compact _get("/actions/ever-compromised", params) { |json| json } end |
#monitor(query) ⇒ Hash
Indicates whether or not a domain is monitored. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsMonitor
114 115 116 117 118 119 120 |
# File 'lib/passivetotal/clients/action.rb', line 114 def monitor(query) params = { query: query, }.compact _get("/actions/monitor", params) { |json| json } end |
#search_by_tags(query) ⇒ Hash
Retrieve artifacts for a given tag. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsTagsSearch
162 163 164 165 166 167 168 |
# File 'lib/passivetotal/clients/action.rb', line 162 def (query) params = { query: query, }.compact _get("/actions/tags/search", params) { |json| json } end |
#set_bulk_classification(queries:, classification:) ⇒ Hash
Set classification statuses for given domains. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsBulkClassification
179 180 181 182 183 184 185 186 |
# File 'lib/passivetotal/clients/action.rb', line 179 def set_bulk_classification(queries:, classification:) params = { queries: queries, classification: classification, }.compact _post("/actions/bulk/classification", params) { |json| json } end |
#set_classification(query:, classification:) ⇒ Hash
Sets the classification status for a given domain. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsClassification
197 198 199 200 201 202 203 204 |
# File 'lib/passivetotal/clients/action.rb', line 197 def set_classification(query:, classification:) params = { query: query, classification: classification, }.compact _post("/actions/classification", params) { |json| json } end |
#set_dynamic_dns(query:, status:) ⇒ Hash
Sets a domain’s status to indicate whether or not its DNS records are updated via dynamic DNS. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsDynamicDns
233 234 235 236 237 238 239 240 |
# File 'lib/passivetotal/clients/action.rb', line 233 def set_dynamic_dns(query:, status:) params = { query: query, status: status, }.compact _post("/actions/dynamic-dns", params) { |json| json } end |
#set_ever_compromised(query:, status:) ⇒ Hash
Sets status for a domain to indicate if it has ever been compromised. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsEverCompromised
215 216 217 218 219 220 221 222 |
# File 'lib/passivetotal/clients/action.rb', line 215 def set_ever_compromised(query:, status:) params = { query: query, status: status, }.compact _post("/actions/ever-compromised", params) { |json| json } end |
#set_sinkhole(query:, status:) ⇒ Hash
Sets status for an IP address to indicate whether or not it is a sinkhole. api.passivetotal.org/api/docs/#api-Actions-PostV2ActionsSinkhole
251 252 253 254 255 256 257 258 |
# File 'lib/passivetotal/clients/action.rb', line 251 def set_sinkhole(query:, status:) params = { query: query, status: status, }.compact _post("/actions/sinkhole", params) { |json| json } end |
#set_tags(query:, tags:) ⇒ Hash
Sets the tags for a given artifact. api.passivetotal.org/api/docs/#api-Actions-PutV2ActionsTags
269 270 271 272 273 274 275 276 |
# File 'lib/passivetotal/clients/action.rb', line 269 def (query:, tags:) params = { query: query, tags: , }.compact _put("/actions/tags", params) { |json| json } end |
#sinkhole(query) ⇒ Hash
Indicates whether or not an IP address is a sinkhole. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsSinkhole
130 131 132 133 134 135 136 |
# File 'lib/passivetotal/clients/action.rb', line 130 def sinkhole(query) params = { query: query, }.compact _get("/actions/sinkhole", params) { |json| json } end |
#tags(query) ⇒ Hash
Retrieves tags for a given artifact. api.passivetotal.org/api/docs/#api-Actions-GetV2ActionsTags
146 147 148 149 150 151 152 |
# File 'lib/passivetotal/clients/action.rb', line 146 def (query) params = { query: query, }.compact _get("/actions/tags", params) { |json| json } end |