Class: Howitzer::TestmailApi::Client
- Inherits:
-
Object
- Object
- Howitzer::TestmailApi::Client
- Defined in:
- lib/howitzer/testmail_api/client.rb
Overview
A Testmail::Client object is used to communicate with the testmail.app API.
Constant Summary collapse
- BASE_URL =
"https://api.testmail.app/api/json?apikey=#{Howitzer.testmail_api_key}" \ "&namespace=#{Howitzer.testmail_namespace}".freeze
Instance Method Summary collapse
-
#find_message(recipient, subject) ⇒ Hash
Finds message according to given parameters.
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#find_message(recipient, subject) ⇒ Hash
Finds message according to given parameters
21 22 23 24 25 |
# File 'lib/howitzer/testmail_api/client.rb', line 21 def (recipient, subject) recipient = recipient.gsub(/.*\.([^@]+)@.*/, '\1') = filter_by_subject((recipient), subject) () end |