Class: UrlScan::Commands::Community
- Defined in:
- lib/urlscan/commands/community.rb
Direct Known Subclasses
Instance Method Summary collapse
- #dom(uuid) ⇒ Object
- #result(uuid) ⇒ Object
- #screenshot(uuid) ⇒ Object
- #search(query) ⇒ Object
- #submit(url) ⇒ Object
Instance Method Details
#dom(uuid) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/urlscan/commands/community.rb', line 47 def dom(uuid) with_error_handling do res = api.dom(uuid) puts res end end |
#result(uuid) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/urlscan/commands/community.rb', line 29 def result(uuid) with_error_handling do res = api.result(uuid) puts JSON.pretty_generate(res) end end |
#screenshot(uuid) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/urlscan/commands/community.rb', line 55 def screenshot(uuid) with_error_handling do res = api.screenshot(uuid) puts res end end |
#search(query) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/urlscan/commands/community.rb', line 39 def search(query) with_error_handling do res = api.search(query, size: ["size"], search_after: ["search_after"]) puts JSON.pretty_generate(res) end end |
#submit(url) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/urlscan/commands/community.rb', line 13 def submit(url) with_error_handling do res = api.submit( url, customagent: [:customagent], referer: [:referer], visibility: [:visibility], tags: [:tags], override_safety: [:override_safety], country: [:country] ) puts JSON.pretty_generate(res) end end |