Skip to content

Commit 2b2cbf3

Browse files
Added 3 new result fields
Added is_catchall, mailboxvalidator_score & time_taken fields.
1 parent dfa2c22 commit 2b2cbf3

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ To install this module type the following:
1919
Dependencies
2020
============
2121

22-
An api key is required for this module to function.
22+
An API key is required for this module to function.
2323

24-
Go to http://www.mailboxvalidator.com/plans to sign up for a trial plan or a paid plan and you'll be given an API key.
24+
Go to http://www.mailboxvalidator.com/plans#api to sign up for a FREE API plan and you'll be given an API key.
2525

2626
Copyright
2727
=========
2828

29-
Copyright (C) 2015 by MailboxValidator.com, [email protected]
29+
Copyright (C) 2017 by MailboxValidator.com, [email protected]

README.rdoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ elsif mbv.result != nil
2727
puts "is_suppressed: #{mbv.result.is_suppressed}"
2828
puts "is_role: #{mbv.result.is_role}"
2929
puts "is_high_risk: #{mbv.result.is_high_risk}"
30+
puts "is_catchall: #{mbv.result.is_catchall}"
31+
puts "mailboxvalidator_score: #{mbv.result.mailboxvalidator_score}"
32+
puts "time_taken: #{mbv.result.time_taken}"
3033
puts "status: #{mbv.result.status}"
3134
puts "credits_available: #{mbv.result.credits_available}"
3235
puts "error_code: #{mbv.result.error_code}"
@@ -35,9 +38,9 @@ end
3538

3639
== Dependencies
3740

38-
* Go to http://www.mailboxvalidator.com/plans to sign up for a trial plan or a paid plan and you'll be given an API key.
41+
* Go to http://www.mailboxvalidator.com/plans#api to sign up for a FREE API plan and you'll be given an API key.
3942

4043
== Copyright
4144

42-
Copyright (c) 2015 MailboxValidator.com
45+
Copyright (c) 2017 MailboxValidator.com
4346

lib/mailboxvalidator_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def initialize(apikey = "")
1616

1717
def query_single(email)
1818
@email = CGI.escape(email)
19-
uri = URI("https://api.mailboxvalidator.com?key=#{@apikey}&email=#{@email}")
19+
uri = URI("https://api.mailboxvalidator.com/v1/validation/single?key=#{@apikey}&email=#{@email}")
2020

2121
begin
2222
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

mailboxvalidator_ruby.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Gem::Specification.new do |s|
22
s.name = 'mailboxvalidator_ruby'
3-
s.version = '1.0.0'
3+
s.version = '1.1.0'
44
s.required_ruby_version = '>= 2.0.0'
5-
s.date = '2015-11-19'
5+
s.date = '2016-07-03'
66
s.summary = "MailboxValidator API wrapper"
77
s.description = "MailboxValidator API wrapper"
88
s.author = "MailboxValidator"

test/test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
puts "is_suppressed: #{mbv.result.is_suppressed}"
2424
puts "is_role: #{mbv.result.is_role}"
2525
puts "is_high_risk: #{mbv.result.is_high_risk}"
26+
puts "is_catchall: #{mbv.result.is_catchall}"
27+
puts "mailboxvalidator_score: #{mbv.result.mailboxvalidator_score}"
28+
puts "time_taken: #{mbv.result.time_taken}"
2629
puts "status: #{mbv.result.status}"
2730
puts "credits_available: #{mbv.result.credits_available}"
2831
puts "error_code: #{mbv.result.error_code}"

0 commit comments

Comments
 (0)