Skip to main content

Tomba

Struct Tomba 

Source
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

Source

pub fn account(&self) -> Result<TombaResponse, TombaError>

Returns information about the current account.

See https://developer.tomba.io/#account

Source§

impl Tomba

Source

pub fn list_bulk(&self, bulk_type: &str) -> Result<TombaResponse, TombaError>

List all bulk tasks of a given type.

See https://developer.tomba.io/#list-all-bulk

Source

pub fn get_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Get a single bulk task by type and ID.

See https://developer.tomba.io/#get-a-bulk

Source

pub fn create_bulk( &self, bulk_type: &str, body: &Value, ) -> Result<TombaResponse, TombaError>

Create a new bulk task.

See https://developer.tomba.io/#create-a-bulk

Source

pub fn launch_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Source

pub fn delete_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Source

pub fn archive_bulk( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Source

pub fn rename_bulk( &self, bulk_type: &str, id: &str, name: &str, ) -> Result<TombaResponse, TombaError>

Source

pub fn bulk_progress( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Get progress of a bulk task.

See https://developer.tomba.io/#bulk-progress

Source

pub fn bulk_download( &self, bulk_type: &str, id: &str, ) -> Result<TombaResponse, TombaError>

Download results of a bulk task.

See https://developer.tomba.io/#bulk-download

Source§

impl Tomba

Source

pub fn count(&self, domain: &str) -> Result<TombaResponse, TombaError>

Returns the total number of email addresses Tomba has for a domain.

See https://developer.tomba.io/#email-count

Source§

impl Tomba

Search emails for a domain.

Returns all email addresses found on the internet for the given domain.

See https://developer.tomba.io/#domain-search

Source§

impl Tomba

Source

pub fn person_find(&self, email: &str) -> Result<TombaResponse, TombaError>

Enrich a person by email address.

See https://developer.tomba.io/#enrichment

Source

pub fn company_find(&self, domain: &str) -> Result<TombaResponse, TombaError>

Enrich a company by domain.

See https://developer.tomba.io/#company-enrichment

Source

pub fn combined_find(&self, email: &str) -> Result<TombaResponse, TombaError>

Combined person + company enrichment.

See https://developer.tomba.io/#combined-enrichment

Source§

impl Tomba

Source

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.

See https://developer.tomba.io/#email-finder

Source

pub fn author_finder( &self, url: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>

Find the email address of the author of a blog post.

See https://developer.tomba.io/#author-finder

Source

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.

See https://developer.tomba.io/#linkedin-finder

Source

pub fn email_enrichment( &self, email: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>

Enrich a person by email address.

See https://developer.tomba.io/#email-enrichment

Source§

impl Tomba

Source§

impl Tomba

Source

pub fn email_format(&self, domain: &str) -> Result<TombaResponse, TombaError>

Detect the email format used by a company.

See https://developer.tomba.io/#email-format

Source§

impl Tomba

Source§

impl Tomba

Source

pub fn list_leads( &self, domain: Option<&str>, ) -> Result<TombaResponse, TombaError>

Source

pub fn get_lead(&self, id: &str) -> Result<TombaResponse, TombaError>

Get a single lead by ID.

See https://developer.tomba.io/#get-a-lead

Source

pub fn create_lead(&self, body: &Value) -> Result<TombaResponse, TombaError>

Source

pub fn update_lead( &self, id: &str, body: &Value, ) -> Result<TombaResponse, TombaError>

Update an existing lead.

See https://developer.tomba.io/#update-a-lead

Source

pub fn delete_lead(&self, id: &str) -> Result<TombaResponse, TombaError>

Source§

impl Tomba

Source§

impl Tomba

Source§

impl Tomba

Source

pub fn get_location(&self, country: &str) -> Result<TombaResponse, TombaError>

Get location details for a country code.

See https://developer.tomba.io/#location

Source§

impl Tomba

Source

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.

See https://developer.tomba.io/#logs

Source§

impl Tomba

Source

pub fn phone_finder( &self, email: &str, webhook_url: Option<&str>, ) -> Result<TombaResponse, TombaError>

Find a phone number using an email address.

See https://developer.tomba.io/#phone-finder

Source

pub fn phone_validator(&self, phone: &str) -> Result<TombaResponse, TombaError>

Validate a phone number.

See https://developer.tomba.io/#phone-validator

Source§

impl Tomba

Search for companies matching the given criteria.

See https://developer.tomba.io/#companies-search

Source§

impl Tomba

Source

pub fn similar_domains(&self, domain: &str) -> Result<TombaResponse, TombaError>

Find domains similar to the given one.

See https://developer.tomba.io/#similar

Source§

impl Tomba

Source

pub fn email_sources(&self, email: &str) -> Result<TombaResponse, TombaError>

Find the web sources where an email address has been found.

See https://developer.tomba.io/#email-sources

Source§

impl Tomba

Source

pub fn status(&self, domain: &str) -> Result<TombaResponse, TombaError>

Check whether a domain is a webmail or disposable provider.

See https://developer.tomba.io/#domain-status

Source

pub fn autocomplete(&self, query: &str) -> Result<TombaResponse, TombaError>

Auto-complete company names and retrieve logo and domain information.

See https://developer.tomba.io/#autocomplete

Source§

impl Tomba

Source

pub fn technology_check( &self, domain: &str, ) -> Result<TombaResponse, TombaError>

Check what technologies a website uses.

See https://developer.tomba.io/#technology-checker

Source§

impl Tomba

Source

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");
Source

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
Source

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 URL
  • body – JSON value to send as the request body
Source§

impl Tomba

Source

pub fn usage(&self) -> Result<TombaResponse, TombaError>

Return your monthly request usage.

See https://developer.tomba.io/#usage

Source§

impl Tomba

Source

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.

See https://developer.tomba.io/#email-verifier

Auto Trait Implementations§

§

impl !RefUnwindSafe for Tomba

§

impl !UnwindSafe for Tomba

§

impl Freeze for Tomba

§

impl Send for Tomba

§

impl Sync for Tomba

§

impl Unpin for Tomba

§

impl UnsafeUnpin for Tomba

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more