pub struct Tomba { /* private fields */ }Expand description
The Tomba API client.
Create an instance with Tomba::init, then call the endpoint
methods such as Tomba::account, Tomba::domain_search, etc.
Implementations§
Source§impl Tomba
impl Tomba
Sourcepub fn account(&self) -> Result<TombaResponse, TombaError>
pub fn account(&self) -> Result<TombaResponse, TombaError>
Returns information about the current account.
Source§impl Tomba
impl Tomba
Sourcepub fn list_bulk(&self, bulk_type: &str) -> Result<TombaResponse, TombaError>
pub fn list_bulk(&self, bulk_type: &str) -> Result<TombaResponse, TombaError>
List all bulk tasks of a given type.
Sourcepub fn get_bulk(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn get_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Get a single bulk task by type and ID.
Sourcepub fn create_bulk(
&self,
bulk_type: &str,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn create_bulk( &self, bulk_type: &str, body: &Value, ) -> Result<TombaResponse, TombaError>
Create a new bulk task.
Sourcepub fn launch_bulk(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn launch_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Launch a bulk task.
Sourcepub fn delete_bulk(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn delete_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Delete a bulk task.
Sourcepub fn archive_bulk(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn archive_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Archive a bulk task.
Sourcepub fn rename_bulk(
&self,
bulk_type: &str,
id: &str,
name: &str,
) -> Result<TombaResponse, TombaError>
pub fn rename_bulk( &self, bulk_type: &str, id: &str, name: &str, ) -> Result<TombaResponse, TombaError>
Rename a bulk task.
Sourcepub fn bulk_progress(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn bulk_progress( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Get progress of a bulk task.
Sourcepub fn bulk_download(
&self,
bulk_type: &str,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn bulk_download( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>
Download results of a bulk task.
Source§impl Tomba
impl Tomba
Sourcepub fn count(&self, domain: &str) -> Result<TombaResponse, TombaError>
pub fn count(&self, domain: &str) -> Result<TombaResponse, TombaError>
Returns the total number of email addresses Tomba has for a domain.
Source§impl Tomba
impl Tomba
Sourcepub fn domain_search(
&self,
domain: &str,
enrich_mobile: Option<bool>,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn domain_search( &self, domain: &str, enrich_mobile: Option<bool>, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>
Search emails for a domain.
Returns all email addresses found on the internet for the given domain.
Source§impl Tomba
impl Tomba
Sourcepub fn person_find(&self, email: &str) -> Result<TombaResponse, TombaError>
pub fn person_find(&self, email: &str) -> Result<TombaResponse, TombaError>
Enrich a person by email address.
Sourcepub fn company_find(&self, domain: &str) -> Result<TombaResponse, TombaError>
pub fn company_find(&self, domain: &str) -> Result<TombaResponse, TombaError>
Enrich a company by domain.
Sourcepub fn combined_find(&self, email: &str) -> Result<TombaResponse, TombaError>
pub fn combined_find(&self, email: &str) -> Result<TombaResponse, TombaError>
Combined person + company enrichment.
Source§impl Tomba
impl Tomba
Sourcepub fn email_finder(
&self,
domain: &str,
first_name: &str,
last_name: &str,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn email_finder( &self, domain: &str, first_name: &str, last_name: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>
Find the most likely email address for a person at a company.
Find the email address of the author of a blog post.
Sourcepub fn linkedin_finder(
&self,
url: &str,
enrich_mobile: Option<bool>,
full: Option<bool>,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn linkedin_finder( &self, url: &str, enrich_mobile: Option<bool>, full: Option<bool>, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>
Find the email address from a LinkedIn URL.
Sourcepub fn email_enrichment(
&self,
email: &str,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn email_enrichment( &self, email: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>
Enrich a person by email address.
Source§impl Tomba
impl Tomba
Sourcepub fn list_flags(
&self,
page: Option<u32>,
limit: Option<u32>,
) -> Result<TombaResponse, TombaError>
pub fn list_flags( &self, page: Option<u32>, limit: Option<u32>, ) -> Result<TombaResponse, TombaError>
List all flags.
Sourcepub fn create_flag(&self, body: &Value) -> Result<TombaResponse, TombaError>
pub fn create_flag(&self, body: &Value) -> Result<TombaResponse, TombaError>
Create a new flag.
Source§impl Tomba
impl Tomba
Sourcepub fn email_format(&self, domain: &str) -> Result<TombaResponse, TombaError>
pub fn email_format(&self, domain: &str) -> Result<TombaResponse, TombaError>
Detect the email format used by a company.
Source§impl Tomba
impl Tomba
Sourcepub fn list_keys(&self) -> Result<TombaResponse, TombaError>
pub fn list_keys(&self) -> Result<TombaResponse, TombaError>
List all API keys.
Sourcepub fn get_key(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn get_key(&self, id: &str) -> Result<TombaResponse, TombaError>
Get a single API key by its ID.
Sourcepub fn create_key(&self, body: &Value) -> Result<TombaResponse, TombaError>
pub fn create_key(&self, body: &Value) -> Result<TombaResponse, TombaError>
Create a new API key.
Sourcepub fn delete_key(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn delete_key(&self, id: &str) -> Result<TombaResponse, TombaError>
Delete an API key.
Sourcepub fn reset_key(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn reset_key(&self, id: &str) -> Result<TombaResponse, TombaError>
Reset an API key.
Source§impl Tomba
impl Tomba
Sourcepub fn list_leads(
&self,
domain: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn list_leads( &self, domain: Option<&str>, ) -> Result<TombaResponse, TombaError>
List all saved leads.
Sourcepub fn get_lead(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn get_lead(&self, id: &str) -> Result<TombaResponse, TombaError>
Get a single lead by ID.
Sourcepub fn create_lead(&self, body: &Value) -> Result<TombaResponse, TombaError>
pub fn create_lead(&self, body: &Value) -> Result<TombaResponse, TombaError>
Create a new lead.
Sourcepub fn update_lead(
&self,
id: &str,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn update_lead( &self, id: &str, body: &Value, ) -> Result<TombaResponse, TombaError>
Update an existing lead.
Sourcepub fn delete_lead(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn delete_lead(&self, id: &str) -> Result<TombaResponse, TombaError>
Delete a lead by ID.
Source§impl Tomba
impl Tomba
Sourcepub fn list_leads_attributes(&self) -> Result<TombaResponse, TombaError>
pub fn list_leads_attributes(&self) -> Result<TombaResponse, TombaError>
List all leads attributes.
Sourcepub fn get_leads_attribute(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn get_leads_attribute(&self, id: &str) -> Result<TombaResponse, TombaError>
Get a single leads attribute by ID.
Sourcepub fn create_leads_attribute(
&self,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn create_leads_attribute( &self, body: &Value, ) -> Result<TombaResponse, TombaError>
Create a new leads attribute.
Sourcepub fn update_leads_attribute(
&self,
id: &str,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn update_leads_attribute( &self, id: &str, body: &Value, ) -> Result<TombaResponse, TombaError>
Update an existing leads attribute.
Sourcepub fn delete_leads_attribute(
&self,
id: &str,
) -> Result<TombaResponse, TombaError>
pub fn delete_leads_attribute( &self, id: &str, ) -> Result<TombaResponse, TombaError>
Delete a leads attribute by ID.
Source§impl Tomba
impl Tomba
Sourcepub fn list_leads_lists(&self) -> Result<TombaResponse, TombaError>
pub fn list_leads_lists(&self) -> Result<TombaResponse, TombaError>
List all lead lists.
Sourcepub fn get_leads_list(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn get_leads_list(&self, id: &str) -> Result<TombaResponse, TombaError>
Get a single leads list by ID.
Sourcepub fn create_leads_list(
&self,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn create_leads_list( &self, body: &Value, ) -> Result<TombaResponse, TombaError>
Create a new leads list.
Sourcepub fn update_leads_list(
&self,
id: &str,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn update_leads_list( &self, id: &str, body: &Value, ) -> Result<TombaResponse, TombaError>
Update an existing leads list.
Sourcepub fn delete_leads_list(&self, id: &str) -> Result<TombaResponse, TombaError>
pub fn delete_leads_list(&self, id: &str) -> Result<TombaResponse, TombaError>
Delete a leads list by ID.
Source§impl Tomba
impl Tomba
Sourcepub fn get_location(&self, country: &str) -> Result<TombaResponse, TombaError>
pub fn get_location(&self, country: &str) -> Result<TombaResponse, TombaError>
Get location details for a country code.
Source§impl Tomba
impl Tomba
Sourcepub fn logs(
&self,
page: Option<u32>,
limit: Option<u32>,
) -> Result<TombaResponse, TombaError>
pub fn logs( &self, page: Option<u32>, limit: Option<u32>, ) -> Result<TombaResponse, TombaError>
Return the last 1 000 API requests made in the past 3 months.
Source§impl Tomba
impl Tomba
Sourcepub fn phone_finder(
&self,
email: &str,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError>
pub fn phone_finder( &self, email: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>
Find a phone number using an email address.
Sourcepub fn phone_validator(&self, phone: &str) -> Result<TombaResponse, TombaError>
pub fn phone_validator(&self, phone: &str) -> Result<TombaResponse, TombaError>
Validate a phone number.
Source§impl Tomba
impl Tomba
Sourcepub fn companies_search(
&self,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn companies_search( &self, body: &Value, ) -> Result<TombaResponse, TombaError>
Search for companies matching the given criteria.
Source§impl Tomba
impl Tomba
Sourcepub fn similar_domains(&self, domain: &str) -> Result<TombaResponse, TombaError>
pub fn similar_domains(&self, domain: &str) -> Result<TombaResponse, TombaError>
Find domains similar to the given one.
Source§impl Tomba
impl Tomba
Sourcepub fn email_sources(&self, email: &str) -> Result<TombaResponse, TombaError>
pub fn email_sources(&self, email: &str) -> Result<TombaResponse, TombaError>
Find the web sources where an email address has been found.
Source§impl Tomba
impl Tomba
Sourcepub fn status(&self, domain: &str) -> Result<TombaResponse, TombaError>
pub fn status(&self, domain: &str) -> Result<TombaResponse, TombaError>
Check whether a domain is a webmail or disposable provider.
Sourcepub fn autocomplete(&self, query: &str) -> Result<TombaResponse, TombaError>
pub fn autocomplete(&self, query: &str) -> Result<TombaResponse, TombaError>
Auto-complete company names and retrieve logo and domain information.
Source§impl Tomba
impl Tomba
Sourcepub fn technology_check(
&self,
domain: &str,
) -> Result<TombaResponse, TombaError>
pub fn technology_check( &self, domain: &str, ) -> Result<TombaResponse, TombaError>
Check what technologies a website uses.
Source§impl Tomba
impl Tomba
Sourcepub fn init(config: TombaConfig) -> Result<Self, TombaError>
pub fn init(config: TombaConfig) -> Result<Self, TombaError>
Create a new Tomba client.
§Examples
use tomba::{Tomba, TombaConfig};
let config = TombaConfig {
key: "ta_xxxx".to_string(),
secret: "ts_xxxx".to_string(),
};
let mut tomba = Tomba::init(config).expect("should construct");Sourcepub fn call(
&self,
method: &str,
path: &str,
params: &HashMap<String, String>,
) -> Result<TombaResponse, TombaError>
pub fn call( &self, method: &str, path: &str, params: &HashMap<String, String>, ) -> Result<TombaResponse, TombaError>
Send a request with query parameters (GET / DELETE).
method–"GET"or"DELETE"path– path relative to the base URL, e.g."me"params– query-string key/value pairs
Sourcepub fn call_json(
&self,
method: &str,
path: &str,
body: &Value,
) -> Result<TombaResponse, TombaError>
pub fn call_json( &self, method: &str, path: &str, body: &Value, ) -> Result<TombaResponse, TombaError>
Send a request with a JSON body (POST / PUT).
method–"POST"or"PUT"path– path relative to the base URLbody– JSON value to send as the request body
Source§impl Tomba
impl Tomba
Sourcepub fn usage(&self) -> Result<TombaResponse, TombaError>
pub fn usage(&self) -> Result<TombaResponse, TombaError>
Return your monthly request usage.
Source§impl Tomba
impl Tomba
Sourcepub fn email_verifier(
&self,
email: &str,
webhook_url: Option<&str>,
enrich_mobile: Option<bool>,
) -> Result<TombaResponse, TombaError>
pub fn email_verifier( &self, email: &str, webhook_url: Option<&str>, enrich_mobile: Option<bool>, ) -> Result<TombaResponse, TombaError>
Verify the deliverability of an email address.