Class: Tomba::Sources

Inherits:
Service show all
Defined in:
lib/tomba/services/sources.rb

Overview

Sources service for finding email sources.

Provides methods to retrieve the sources where an email was found.

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Tomba::Service

Instance Method Details

#email_sources(email:) ⇒ Hash

Email Sources

Retrieves the sources where an email address has been found on the web.

Parameters:

  • email (String)

    the email address to look up sources for

Returns:

  • (Hash)

    API response containing source information

Raises:

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/tomba/services/sources.rb', line 18

def email_sources(email:)
  raise Tomba::Exception, 'Missing required parameter: "email"' if email.nil?

  path = '/email-sources'

  params = {}
  params[:email] = email unless email.nil?

  @client.call('get', path, {
                 'content-type' => 'application/json'
               }, params)
end