Class: UrlScan::Commands::Community

Inherits:
Base
  • Object
show all
Defined in:
lib/urlscan/commands/community.rb

Direct Known Subclasses

UrlScan::CLI

Instance Method Summary collapse

Instance Method Details

#dom(uuid) ⇒ Object



34
35
36
37
38
39
# File 'lib/urlscan/commands/community.rb', line 34

def dom(uuid)
  with_error_handling do
    res = api.dom(uuid)
    puts res
  end
end

#result(uuid) ⇒ Object



16
17
18
19
20
21
# File 'lib/urlscan/commands/community.rb', line 16

def result(uuid)
  with_error_handling do
    res = api.result(uuid)
    puts JSON.pretty_generate(res)
  end
end

#screenshot(uuid) ⇒ Object



42
43
44
45
46
47
# File 'lib/urlscan/commands/community.rb', line 42

def screenshot(uuid)
  with_error_handling do
    res = api.screenshot(uuid)
    puts res
  end
end

#search(query) ⇒ Object



26
27
28
29
30
31
# File 'lib/urlscan/commands/community.rb', line 26

def search(query)
  with_error_handling do
    res = api.search(query, size: options["size"], search_after: options["search_after"])
    puts JSON.pretty_generate(res)
  end
end

#submit(url) ⇒ Object



8
9
10
11
12
13
# File 'lib/urlscan/commands/community.rb', line 8

def submit(url)
  with_error_handling do
    res = api.submit(url, options[:public])
    puts JSON.pretty_generate(res)
  end
end