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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0723ebdc178f2687eee958b64351bc18873f1117
4
- data.tar.gz: deafc609522733f41b57f6439114c12040193335
3
+ metadata.gz: 57b91609f0925598b1c7902a8aef75b9a7ab9203
4
+ data.tar.gz: 31b6ee6323b746fb355fac7d2decd2f70b2b6980
5
5
  SHA512:
6
- metadata.gz: aa49216254af99f397d0a3270f92972ba77788dce568a6f643d519c1c8f25bc0283ef01ae9a2b176cff0791efa1e82da7ecd323be186fa66c9734e840fe18108
7
- data.tar.gz: 696e95c127acf06c427f9f3088828393e383cb4c1e0b25cf58d24a42807845103be077734147b891cd83168b9a0bf9fe80f809c0e37a307a52b80c048a9f3c43
6
+ metadata.gz: e932b577214cce24d3b5e761eff6d86db8b4b9433e1d0c09e23964aeef423a07fcb9dd5a97e68567d9c3af55a9457c04b8b5c43e3a1ee81eb338de5561c4d122
7
+ data.tar.gz: 47a393998a424b19b3c9de454ceb263f885433cb6cd068e20c9c1ffff9253b8943ec23e804452b9ce8f0e6359e1930940b81fb699a12c715d0b7ee9304422859
@@ -11,10 +11,12 @@ module EmailHunter
11
11
  @key = key
12
12
  end
13
13
 
14
+ # Domain search API
14
15
  def search(domain)
15
16
  EmailHunter::Search.new(domain, self.key).hunt
16
17
  end
17
18
 
19
+ # Email Check API
18
20
  def exist(email)
19
21
  EmailHunter::Exist.new(email, self.key).hunt
20
22
  end
@@ -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, {:symbolize_names => true}) : []
25
+ response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
27
26
  end
28
27
  end
29
28
  end
@@ -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, {:symbolize_names => true}) : []
25
+ response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
27
26
  end
28
27
  end
29
28
  end
@@ -1,3 +1,3 @@
1
1
  module EmailHunter
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-04 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler