emailhunter 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/email_hunter/api.rb +2 -0
- data/lib/email_hunter/exist.rb +1 -2
- data/lib/email_hunter/search.rb +2 -3
- data/lib/email_hunter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57b91609f0925598b1c7902a8aef75b9a7ab9203
|
4
|
+
data.tar.gz: 31b6ee6323b746fb355fac7d2decd2f70b2b6980
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e932b577214cce24d3b5e761eff6d86db8b4b9433e1d0c09e23964aeef423a07fcb9dd5a97e68567d9c3af55a9457c04b8b5c43e3a1ee81eb338de5561c4d122
|
7
|
+
data.tar.gz: 47a393998a424b19b3c9de454ceb263f885433cb6cd068e20c9c1ffff9253b8943ec23e804452b9ce8f0e6359e1930940b81fb699a12c715d0b7ee9304422859
|
data/lib/email_hunter/api.rb
CHANGED
data/lib/email_hunter/exist.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
|
-
require 'ostruct'
|
4
3
|
|
5
4
|
API_EXISTS_URL = 'https://api.emailhunter.co/v1/exist?'
|
6
5
|
|
@@ -23,7 +22,7 @@ module EmailHunter
|
|
23
22
|
def apiresponse
|
24
23
|
url = "#{API_EXISTS_URL}email=#{@email}&api_key=#{@key}"
|
25
24
|
response = Faraday.get(URI.parse(URI.encode(url)))
|
26
|
-
response.success? ? JSON.parse(response.body, {:
|
25
|
+
response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
|
27
26
|
end
|
28
27
|
end
|
29
28
|
end
|
data/lib/email_hunter/search.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
|
-
require 'ostruct'
|
4
3
|
|
5
4
|
API_SEARCH_URL = 'https://api.emailhunter.co/v1/search?'
|
6
5
|
|
7
6
|
module EmailHunter
|
8
7
|
class Search
|
9
|
-
attr_reader :status, :results, :emails
|
8
|
+
attr_reader :status, :results, :emails, :offset
|
10
9
|
|
11
10
|
def initialize(domain, key)
|
12
11
|
@domain = domain
|
@@ -23,7 +22,7 @@ module EmailHunter
|
|
23
22
|
def apiresponse
|
24
23
|
url = "#{API_SEARCH_URL}domain=#{@domain}&api_key=#{@key}"
|
25
24
|
response = Faraday.get(URI.parse(URI.encode(url)))
|
26
|
-
response.success? ? JSON.parse(response.body, {:
|
25
|
+
response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
|
27
26
|
end
|
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide Santangelo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|