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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 798702a904c93cd2895f683aae28dd0dc3d44dfea5b17d247168a6189bcb9c21
4
- data.tar.gz: 3fbca0a7a6210fa2062ea02f84bb83492544bbb53aa5d7d5e0cad09077fa271e
3
+ metadata.gz: c64c50eef43387533567d006b5a7cc5d91e9756c828d8c2abb0c71fb7cdfd8a0
4
+ data.tar.gz: 9804b57e3aa1e639af02f6d251572fde399e244a4978fd215de652451c9301b9
5
5
  SHA512:
6
- metadata.gz: 4cfebe6cd4c4673e3afaa2575b4af09e5b46d357097ce3701c26200dc2ff565124a04b57a1bdccb652e3330a5886e1fbf2550b93f00e73f12f7000d52c61768c
7
- data.tar.gz: 6239d851913a5b67fd54c4688106145f3ffe4faea8908faf928d92c6ed8263c8d78c4891719ba1dc0f799d233ea99b8af498773fef8221c016e9e625443921c9
6
+ metadata.gz: f314f8dc01685bc52b4d4e0546cdf121ad26c82615c7021f2eb4341ed034dc4ee2ec6e00970e2749419baccf00991ae6aea92ead472b1ff335a25492d537ac3d
7
+ data.tar.gz: 9466cdb9855100e645554851697128a7df854afc1bb1fd34b6561e4ea1eb0d137457b43f694a88dbdd7047cdbcf7b42431774a081357c27717f080ec382c2d7e
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UrlScan
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.0
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-14 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler