urlscan 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/urlscan/clients/pro.rb +6 -6
- data/lib/urlscan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c64c50eef43387533567d006b5a7cc5d91e9756c828d8c2abb0c71fb7cdfd8a0
|
4
|
+
data.tar.gz: 9804b57e3aa1e639af02f6d251572fde399e244a4978fd215de652451c9301b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f314f8dc01685bc52b4d4e0546cdf121ad26c82615c7021f2eb4341ed034dc4ee2ec6e00970e2749419baccf00991ae6aea92ead472b1ff335a25492d537ac3d
|
7
|
+
data.tar.gz: 9466cdb9855100e645554851697128a7df854afc1bb1fd34b6561e4ea1eb0d137457b43f694a88dbdd7047cdbcf7b42431774a081357c27717f080ec382c2d7e
|
data/lib/urlscan/clients/pro.rb
CHANGED
@@ -6,14 +6,10 @@ module UrlScan
|
|
6
6
|
VERSION = 1
|
7
7
|
HOST = "pro.urlscan.com"
|
8
8
|
|
9
|
-
def initialize(key = ENV["URLSCAN_API_KEY"])
|
10
|
-
super key
|
11
|
-
|
12
|
-
raise ArgumentError, "API key is required for this class." if key.nil?
|
13
|
-
end
|
14
|
-
|
15
9
|
# @return [Hash]
|
16
10
|
def search(query: nil, filter: nil, size: 50)
|
11
|
+
raise ArgumentError, "API key is required for this method." if key.nil?
|
12
|
+
|
17
13
|
filter = build_filter(filter)
|
18
14
|
params = { q: query, size: size }.compact
|
19
15
|
uri_query = URI.encode_www_form(params)
|
@@ -24,11 +20,15 @@ module UrlScan
|
|
24
20
|
|
25
21
|
# @return [Hash]
|
26
22
|
def brands
|
23
|
+
raise ArgumentError, "API key is required for this method." if key.nil?
|
24
|
+
|
27
25
|
get("/brands") { |json| json }
|
28
26
|
end
|
29
27
|
|
30
28
|
# @return [Hash]
|
31
29
|
def kits
|
30
|
+
raise ArgumentError, "API key is required for this method." if key.nil?
|
31
|
+
|
32
32
|
get("/kits") { |json| json }
|
33
33
|
end
|
34
34
|
|
data/lib/urlscan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urlscan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|