Class: UrlScan::Clients::Pro

Inherits:
Base
  • Object
show all
Defined in:
lib/urlscan/clients/pro.rb

Constant Summary collapse

VERSION =
1
HOST =
"urlscan.io"

Instance Attribute Summary

Attributes inherited from Base

#key

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from UrlScan::Clients::Base

Instance Method Details

#brandsHash

Returns:

  • (Hash)


10
11
12
# File 'lib/urlscan/clients/pro.rb', line 10

def brands
  get("/brands") { |json| json }
end

#kitsHash

Returns:

  • (Hash)


15
16
17
# File 'lib/urlscan/clients/pro.rb', line 15

def kits
  get("/kits") { |json| json }
end

#phishfeed(q: "result.task.time:>now-24h", format: "json", limit: nil) ⇒ Hash

Returns:

  • (Hash)


20
21
22
23
# File 'lib/urlscan/clients/pro.rb', line 20

def phishfeed(q: "result.task.time:>now-24h", format: "json", limit: nil)
  params = { q: q, format: format, limit: limit }.compact
  get("/phishfeed", params) { |json| json }
end

#scannersHash

Returns:

  • (Hash)


40
41
42
# File 'lib/urlscan/clients/pro.rb', line 40

def scanners
  get("/livescan/scanners/") { |json| json }
end

#similar(uuid, q: nil, size: nil, search_after: nil, threshold: nil, min_size: nil, method: nil, resource_types: nil) ⇒ Hash

Returns:

  • (Hash)


26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/urlscan/clients/pro.rb', line 26

def similar(uuid, q: nil, size: nil, search_after: nil, threshold: nil, min_size: nil, method: nil, resource_types: nil)
  params = {
    q: q,
    size: size,
    search_after: search_after,
    threshold: threshold,
    minSize: min_size,
    method: method,
    resourceTypes: resource_types
  }.compact
  get("/result/#{uuid}/similar/", params) { |json| json }
end