Class: UrlScan::Clients::Pro
- Inherits:
-
Base
- Object
- Base
- UrlScan::Clients::Pro
show all
- Defined in:
- lib/urlscan/clients/pro.rb
Constant Summary
collapse
- VERSION =
1
- HOST =
"pro.urlscan.com"
Instance Attribute Summary
Attributes inherited from Base
#key
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#brands ⇒ Hash
17
18
19
|
# File 'lib/urlscan/clients/pro.rb', line 17
def brands
get("/brands") { |json| json }
end
|
#kits ⇒ Hash
22
23
24
|
# File 'lib/urlscan/clients/pro.rb', line 22
def kits
get("/kits") { |json| json }
end
|
#phishfeed(q: "result.task.time:>now-24h", format: "json") ⇒ Hash
27
28
29
30
|
# File 'lib/urlscan/clients/pro.rb', line 27
def phishfeed(q: "result.task.time:>now-24h", format: "json")
params = { q: q, format: format }
get("/phishfeed", params) { |json| json }
end
|
#search(query: nil, filter: nil, size: 50) ⇒ Hash
10
11
12
13
14
|
# File 'lib/urlscan/clients/pro.rb', line 10
def search(query: nil, filter: nil, size: 50)
filter = build_filter(filter)
params = { q: query, size: size, filter: filter }.compact
get("/search", params) { |json| json }
end
|
#similar(uuid) ⇒ Hash
33
34
35
|
# File 'lib/urlscan/clients/pro.rb', line 33
def similar(uuid)
get("/result/#{uuid}/similar") { |json| json }
end
|