项目作者: afrase

项目描述 :
Zerobounce Ruby client
高级语言: Ruby
项目地址: git://github.com/afrase/zerobounce.git
创建时间: 2018-05-15T22:54:26Z
项目社区:https://github.com/afrase/zerobounce

开源协议:MIT License

下载


Zerobounce

Ruby
Gem Version

A ruby client for Zerobounce.net API.

Installation

Add this line to your application’s Gemfile:

  1. gem 'zerobounce'

And then execute:

  1. $ bundle

Or install it yourself as:

  1. $ gem install zerobounce

Usage

  1. # Configure the client
  2. Zerobounce.configure do |config|
  3. config.apikey = 'key'
  4. config.valid_statuses = [:valid, :catch_all, :unknown]
  5. end
  6. resp = Zerobounce.validate(email: 'valid@example.com')
  7. resp.valid? # => true
  8. # Change what is considered a valid status
  9. Zerobounce.valid?('invalid@example.com') # => false
  10. Zerobounce.config.valid_statuses = [:invalid]
  11. Zerobounce.valid?('invalid@example.com') # => true
  12. # Use a different API key for one request
  13. Zerobounce.validate(email: 'valid@example.com', apikey: 'different-api-key')

Development

After checking out the repo, run bin/setup to install dependencies.
Then, run rake spec to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.
To release a new version, update the version number in version.rb,
and then run bundle exec rake release, which will create a git tag for
the version, push git commits and tags, and push the .gem file to
rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/afrase/zerobounce. This project is intended to be a safe,
welcoming space for collaboration, and contributors are expected to adhere
to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the
MIT License.

FOSSA Status

Code of Conduct

Everyone interacting in the Zerobounce project’s codebases, issue trackers,
chat rooms and mailing lists is expected to follow the
code of conduct.