emailhunter 0.8.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -2
- data/bin/console +3 -3
- data/emailhunter.gemspec +17 -19
- data/lib/email_hunter/account.rb +2 -3
- data/lib/email_hunter/count.rb +3 -4
- data/lib/email_hunter/exist.rb +1 -2
- data/lib/email_hunter/finder.rb +1 -2
- data/lib/email_hunter/search.rb +1 -2
- data/lib/email_hunter/verify.rb +1 -2
- data/lib/email_hunter/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9cca816b859af71470e2f574c274e195f40957e90a2824874f6f674a39d0198
|
4
|
+
data.tar.gz: a77dff70b14ff58e51da7ba5593aa6b224dcfed6f15da4781a77c0e77ed4ff49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b890e80434096d88af8414aaa387a28d1ff0afbbdc177eddd8284e191092d8335b06c50d874bbc48c23e5d80271b289db98ad85c63c5664e0819f90e3545227
|
7
|
+
data.tar.gz: fab3c8de09ef1c3ae7ad59c82519422123982e3f996d9b53b5f65bd6b7cb15e98139542d5541b2f6e289f394772b996a141bf89e01528c46a9934bb10ad42200
|
data/Rakefile
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
require
|
2
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'emailhunter'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "emailhunter"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/emailhunter.gemspec
CHANGED
@@ -1,32 +1,30 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require File.expand_path('
|
3
|
+
require File.expand_path('lib/email_hunter/version', __dir__)
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
6
|
+
spec.name = 'emailhunter'
|
8
7
|
spec.version = EmailHunter::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
8
|
+
spec.authors = ['Davide Santangelo']
|
9
|
+
spec.email = ['davide.santangelo@gmail.com']
|
11
10
|
|
12
|
-
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
spec.license = "MIT"
|
11
|
+
spec.summary = 'A tiny ruby wrapper around Hunter.io API '
|
12
|
+
spec.description = 'A tiny ruby wrapper around Hunter.io API. Hunter.io helps sales people reach their targets and increase their sales. '
|
13
|
+
spec.license = 'MIT'
|
16
14
|
|
17
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir =
|
16
|
+
spec.bindir = 'exe'
|
19
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = [
|
18
|
+
spec.require_paths = ['lib']
|
21
19
|
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.8'
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
22
|
spec.add_development_dependency 'rspec'
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
23
|
+
spec.add_development_dependency 'typhoeus'
|
24
|
+
spec.add_development_dependency 'vcr'
|
27
25
|
|
28
|
-
spec.required_ruby_version =
|
26
|
+
spec.required_ruby_version = '>= 1.9.3'
|
29
27
|
|
30
|
-
spec.add_dependency
|
31
|
-
spec.add_dependency
|
28
|
+
spec.add_dependency 'faraday'
|
29
|
+
spec.add_dependency 'json'
|
32
30
|
end
|
data/lib/email_hunter/account.rb
CHANGED
@@ -7,7 +7,7 @@ API_ACCOUNT_URL = 'https://api.hunter.io/v2/account?'
|
|
7
7
|
|
8
8
|
module EmailHunter
|
9
9
|
class Account
|
10
|
-
attr_reader :result, :first_name, :last_name, :email, :plan_name, :plan_level, :reset_date, :team_id, :calls
|
10
|
+
attr_reader :result, :first_name, :last_name, :email, :plan_name, :plan_level, :reset_date, :team_id, :calls, :requests
|
11
11
|
|
12
12
|
def initialize(key)
|
13
13
|
@key = key
|
@@ -21,8 +21,7 @@ module EmailHunter
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def apiresponse
|
24
|
-
|
25
|
-
response = Faraday.new(url).get
|
24
|
+
response = Faraday.new("#{API_ACCOUNT_URL}&api_key=#{@key}").get
|
26
25
|
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
27
26
|
end
|
28
27
|
end
|
data/lib/email_hunter/count.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
API_COUNT_URL = 'https://api.hunter.io/v2/email-count?'
|
4
|
+
API_COUNT_URL = 'https://api.hunter.io/v2/email-count?'.freeze
|
5
5
|
|
6
6
|
module EmailHunter
|
7
7
|
class Count
|
@@ -19,9 +19,8 @@ module EmailHunter
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def apiresponse
|
22
|
-
|
23
|
-
response
|
24
|
-
response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
|
22
|
+
response = Faraday.new("#{API_COUNT_URL}domain=#{@domain}").get
|
23
|
+
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
25
24
|
end
|
26
25
|
end
|
27
26
|
end
|
data/lib/email_hunter/exist.rb
CHANGED
@@ -22,8 +22,7 @@ module EmailHunter
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def apiresponse
|
25
|
-
|
26
|
-
response = Faraday.new(url).get
|
25
|
+
response = Faraday.new("#{API_EXIST_URL}email=#{@email}&api_key=#{@key}").get
|
27
26
|
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
28
27
|
end
|
29
28
|
end
|
data/lib/email_hunter/finder.rb
CHANGED
@@ -24,8 +24,7 @@ module EmailHunter
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def apiresponse
|
27
|
-
|
28
|
-
response = Faraday.new(url).get
|
27
|
+
response = Faraday.new("#{API_FINDER_URL}domain=#{@domain}&first_name=#{@first_name}&last_name=#{@last_name}&api_key=#{@key}").get
|
29
28
|
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
30
29
|
end
|
31
30
|
end
|
data/lib/email_hunter/search.rb
CHANGED
@@ -23,8 +23,7 @@ module EmailHunter
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def apiresponse
|
26
|
-
|
27
|
-
response = Faraday.new(url).get
|
26
|
+
response = Faraday.new("#{API_SEARCH_URL}domain=#{@domain}&api_key=#{@key}&type=#{@params[:type]}&offset=#{@params[:offset]}&limit=#{@params[:limit]}").get
|
28
27
|
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
29
28
|
end
|
30
29
|
end
|
data/lib/email_hunter/verify.rb
CHANGED
@@ -22,8 +22,7 @@ module EmailHunter
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def apiresponse
|
25
|
-
|
26
|
-
response = Faraday.new(url).get
|
25
|
+
response = Faraday.new("#{API_VERIFY_URL}email=#{@email}&api_key=#{@key}").get
|
27
26
|
response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
|
28
27
|
end
|
29
28
|
end
|
data/lib/email_hunter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emailhunter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide Santangelo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: typhoeus
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -108,8 +108,8 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: 'A tiny ruby wrapper around
|
112
|
-
|
111
|
+
description: 'A tiny ruby wrapper around Hunter.io API. Hunter.io helps sales people
|
112
|
+
reach their targets and increase their sales. '
|
113
113
|
email:
|
114
114
|
- davide.santangelo@gmail.com
|
115
115
|
executables: []
|
@@ -137,11 +137,11 @@ files:
|
|
137
137
|
- lib/email_hunter/verify.rb
|
138
138
|
- lib/email_hunter/version.rb
|
139
139
|
- lib/emailhunter.rb
|
140
|
-
homepage:
|
140
|
+
homepage:
|
141
141
|
licenses:
|
142
142
|
- MIT
|
143
143
|
metadata: {}
|
144
|
-
post_install_message:
|
144
|
+
post_install_message:
|
145
145
|
rdoc_options: []
|
146
146
|
require_paths:
|
147
147
|
- lib
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
159
|
rubygems_version: 3.0.8
|
160
|
-
signing_key:
|
160
|
+
signing_key:
|
161
161
|
specification_version: 4
|
162
|
-
summary: A tiny ruby wrapper around
|
162
|
+
summary: A tiny ruby wrapper around Hunter.io API
|
163
163
|
test_files: []
|