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.
12 13 14 |
# File 'lib/anymail/anymail.rb', line 12 def initialize key @secret_key = key end |
Instance Method Details
#search(name, domain) ⇒ Object
16 17 18 19 20 |
# File 'lib/anymail/anymail.rb', line 16 def search name, domain params = build_search_params name, domain response = JSON.parse(RestClient.post SEARCH_URL, params) response['emails'] end |
#searchesLeft ⇒ Object
22 23 24 25 26 |
# File 'lib/anymail/anymail.rb', line 22 def searchesLeft params = build_serches_left_params response = JSON.parse(RestClient.post SEARCHES_LEFT_URL, params) response['searches'].to_i end |