Class: Tomba::Finder
Overview
Finder service for email, author, LinkedIn, and phone lookups.
Provides methods to find email addresses, authors, LinkedIn profiles, and phone numbers.
Instance Method Summary collapse
-
#author_finder(url:, webhook_url: nil) ⇒ Hash
Author Finder.
-
#email_finder(domain:, first_name:, last_name:, webhook_url: nil) ⇒ Hash
Email Finder.
-
#linkedin_finder(url:, webhook_url: nil) ⇒ Hash
LinkedIn Finder.
-
#phone_finder(email:, webhook_url: nil) ⇒ Hash
Phone Finder.
Methods inherited from Service
Constructor Details
This class inherits a constructor from Tomba::Service
Instance Method Details
#author_finder(url:, webhook_url: nil) ⇒ Hash
Author Finder
Retrieves the email address of the author of a given article URL.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/tomba/services/finder.rb', line 49 def (url:, webhook_url: nil) raise Tomba::Exception, 'Missing required parameter: "url"' if url.nil? path = '/author-finder' params = {} params[:url] = url unless url.nil? params[:webhook_url] = webhook_url unless webhook_url.nil? @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#email_finder(domain:, first_name:, last_name:, webhook_url: nil) ⇒ Hash
Email Finder
Generates or retrieves the most likely email address from a domain and name.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/tomba/services/finder.rb', line 22 def email_finder(domain:, first_name:, last_name:, webhook_url: nil) raise Tomba::Exception, 'Missing required parameter: "domain"' if domain.nil? raise Tomba::Exception, 'Missing required parameter: "first_name"' if first_name.nil? raise Tomba::Exception, 'Missing required parameter: "last_name"' if last_name.nil? path = '/email-finder' params = {} params[:domain] = domain unless domain.nil? params[:first_name] = first_name unless first_name.nil? params[:last_name] = last_name unless last_name.nil? params[:webhook_url] = webhook_url unless webhook_url.nil? @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#linkedin_finder(url:, webhook_url: nil) ⇒ Hash
LinkedIn Finder
Retrieves the email address of a person from their LinkedIn URL.
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/tomba/services/finder.rb', line 72 def linkedin_finder(url:, webhook_url: nil) raise Tomba::Exception, 'Missing required parameter: "url"' if url.nil? path = '/linkedin-finder' params = {} params[:url] = url unless url.nil? params[:webhook_url] = webhook_url unless webhook_url.nil? @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#phone_finder(email:, webhook_url: nil) ⇒ Hash
Phone Finder
Retrieves the phone number associated with an email address.
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/tomba/services/finder.rb', line 95 def phone_finder(email:, webhook_url: nil) raise Tomba::Exception, 'Missing required parameter: "email"' if email.nil? path = '/phone-finder' params = {} params[:email] = email unless email.nil? params[:webhook_url] = webhook_url unless webhook_url.nil? @client.call('get', path, { 'content-type' => 'application/json' }, params) end |