Class: Thrust::AnyMail::Client
- Inherits:
-
Object
- Object
- Thrust::AnyMail::Client
- Defined in:
- lib/anymail/anymail.rb
Instance Method Summary collapse
-
#initialize(key) ⇒ Client
constructor
A new instance of Client.
- #search(name, domain) ⇒ Object
- #searchesLeft ⇒ Object
Constructor Details
#initialize(key) ⇒ Client
Returns a new instance of Client.
13 14 15 |
# File 'lib/anymail/anymail.rb', line 13 def initialize key @secret_key = key end |
Instance Method Details
#search(name, domain) ⇒ Object
17 18 19 20 21 |
# File 'lib/anymail/anymail.rb', line 17 def search name, domain params = build_search_params name, domain response = JSON.parse(RestClient.post SEARCH_URL, params) response['emails'] end |
#searchesLeft ⇒ Object
23 24 25 26 27 |
# File 'lib/anymail/anymail.rb', line 23 def searchesLeft params = build_serches_left_params response = JSON.parse(RestClient.post SEARCHES_LEFT_URL, params) response['searches'].to_i end |