tomba 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tomba/client.rb +127 -113
- data/lib/tomba/exception.rb +20 -11
- data/lib/tomba/service.rb +15 -11
- data/lib/tomba/services/account.rb +24 -16
- data/lib/tomba/services/bulk.rb +235 -0
- data/lib/tomba/services/count.rb +30 -26
- data/lib/tomba/services/domain.rb +39 -36
- data/lib/tomba/services/enrichment.rb +72 -0
- data/lib/tomba/services/finder.rb +103 -89
- data/lib/tomba/services/flag.rb +53 -0
- data/lib/tomba/services/format.rb +30 -0
- data/lib/tomba/services/keys.rb +99 -58
- data/lib/tomba/services/leads-attributes.rb +83 -58
- data/lib/tomba/services/leads-lists.rb +83 -58
- data/lib/tomba/services/leads.rb +108 -0
- data/lib/tomba/services/location.rb +30 -0
- data/lib/tomba/services/logs.rb +28 -16
- data/lib/tomba/services/phone.rb +53 -0
- data/lib/tomba/services/reveal.rb +28 -0
- data/lib/tomba/services/similar.rb +30 -0
- data/lib/tomba/services/sources.rb +27 -20
- data/lib/tomba/services/status.rb +51 -44
- data/lib/tomba/services/technology.rb +30 -0
- data/lib/tomba/services/usage.rb +24 -16
- data/lib/tomba/services/verifier.rb +29 -20
- data/lib/tomba/version.rb +2 -1
- data/lib/tomba.rb +17 -0
- metadata +18 -7
|
@@ -1,45 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
class Status < Service
|
|
3
|
-
|
|
4
|
-
def domain_status(domain:)
|
|
5
|
-
if domain.nil?
|
|
6
|
-
raise Tomba::Exception.new('Missing required parameter: "domain"')
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
path = '/domain-status'
|
|
10
|
-
|
|
11
|
-
params = {}
|
|
12
|
-
|
|
13
|
-
if !domain.nil?
|
|
14
|
-
params[:domain] = domain
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
return @client.call('get', path, {
|
|
18
|
-
'content-type' => 'application/json',
|
|
19
|
-
}, params);
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def auto_complete(query:)
|
|
23
|
-
if query.nil?
|
|
24
|
-
raise Tomba::Exception.new('Missing required parameter: "query"')
|
|
25
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
26
2
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
3
|
+
module Tomba
|
|
4
|
+
# Status service for domain status and autocomplete.
|
|
5
|
+
#
|
|
6
|
+
# Provides methods to check domain status and get domain suggestions.
|
|
7
|
+
#
|
|
8
|
+
# @see https://docs.tomba.io/api/status
|
|
9
|
+
class Status < Service
|
|
10
|
+
# Domain Status
|
|
11
|
+
#
|
|
12
|
+
# Returns the status of a domain, including whether it is webmail or disposable.
|
|
13
|
+
#
|
|
14
|
+
# @see https://docs.tomba.io/api/status#domain-status
|
|
15
|
+
# @param domain [String] the domain name to check
|
|
16
|
+
# @return [Hash] API response containing domain status
|
|
17
|
+
# @raise [Tomba::Exception]
|
|
18
|
+
def domain_status(domain:)
|
|
19
|
+
raise Tomba::Exception, 'Missing required parameter: "domain"' if domain.nil?
|
|
20
|
+
|
|
21
|
+
path = '/domain-status'
|
|
22
|
+
|
|
23
|
+
params = {}
|
|
24
|
+
params[:domain] = domain unless domain.nil?
|
|
25
|
+
|
|
26
|
+
@client.call('get', path, {
|
|
27
|
+
'content-type' => 'application/json'
|
|
28
|
+
}, params)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Autocomplete
|
|
32
|
+
#
|
|
33
|
+
# Returns domain suggestions based on a search query.
|
|
34
|
+
#
|
|
35
|
+
# @see https://docs.tomba.io/api/status#domain-suggestions
|
|
36
|
+
# @param query [String] the search query for domain suggestions
|
|
37
|
+
# @return [Hash] API response containing domain suggestions
|
|
38
|
+
# @raise [Tomba::Exception]
|
|
39
|
+
def auto_complete(query:)
|
|
40
|
+
raise Tomba::Exception, 'Missing required parameter: "query"' if query.nil?
|
|
41
|
+
|
|
42
|
+
path = '/domain-suggestions'
|
|
43
|
+
|
|
44
|
+
params = {}
|
|
45
|
+
params[:query] = query unless query.nil?
|
|
46
|
+
|
|
47
|
+
@client.call('get', path, {
|
|
48
|
+
'content-type' => 'application/json'
|
|
49
|
+
}, params)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tomba
|
|
4
|
+
# Technology service for detecting website technologies.
|
|
5
|
+
#
|
|
6
|
+
# Provides methods to discover the technologies used by a website.
|
|
7
|
+
#
|
|
8
|
+
# @see https://docs.tomba.io/api/domain#technology
|
|
9
|
+
class Technology < Service
|
|
10
|
+
# List Technologies
|
|
11
|
+
#
|
|
12
|
+
# Returns the technologies detected on a given domain.
|
|
13
|
+
#
|
|
14
|
+
# @see https://docs.tomba.io/api/domain#technology#list-technologies
|
|
15
|
+
# @param domain [String] the domain name to analyze
|
|
16
|
+
# @return [Hash] API response containing detected technologies
|
|
17
|
+
# @raise [Tomba::Exception]
|
|
18
|
+
def list(domain)
|
|
19
|
+
raise Tomba::Exception, 'Missing required parameter: "domain"' if domain.nil?
|
|
20
|
+
|
|
21
|
+
path = '/technology'
|
|
22
|
+
|
|
23
|
+
params = { domain: domain }
|
|
24
|
+
|
|
25
|
+
@client.call('get', path, {
|
|
26
|
+
'content-type' => 'application/json'
|
|
27
|
+
}, params)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
data/lib/tomba/services/usage.rb
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
class Usage < Service
|
|
3
|
-
|
|
4
|
-
def get_usage()
|
|
5
|
-
path = '/usage'
|
|
6
|
-
|
|
7
|
-
params = {}
|
|
8
|
-
|
|
9
|
-
return @client.call('get', path, {
|
|
10
|
-
'content-type' => 'application/json',
|
|
11
|
-
}, params);
|
|
12
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
13
2
|
|
|
3
|
+
module Tomba
|
|
4
|
+
# Usage service for retrieving API usage statistics.
|
|
5
|
+
#
|
|
6
|
+
# Provides methods to get account usage information.
|
|
7
|
+
#
|
|
8
|
+
# @see https://docs.tomba.io/api/account#retrieve-api-usage
|
|
9
|
+
class Usage < Service
|
|
10
|
+
# Get Usage
|
|
11
|
+
#
|
|
12
|
+
# Returns the current API usage statistics for the account.
|
|
13
|
+
#
|
|
14
|
+
# @see https://docs.tomba.io/api/account#retrieve-api-usage#get-usage
|
|
15
|
+
# @return [Hash] API response containing usage statistics
|
|
16
|
+
# @raise [Tomba::Exception]
|
|
17
|
+
def get_usage
|
|
18
|
+
path = '/usage'
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
params = {}
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
@client.call('get', path, {
|
|
23
|
+
'content-type' => 'application/json'
|
|
24
|
+
}, params)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
class Verifier < Service
|
|
3
|
-
|
|
4
|
-
def email_verifier(email:)
|
|
5
|
-
if email.nil?
|
|
6
|
-
raise Tomba::Exception.new('Missing required parameter: "email"')
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
path = '/email-verifier/{email}'
|
|
10
|
-
.gsub('{email}', email)
|
|
1
|
+
# frozen_string_literal: true
|
|
11
2
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
module Tomba
|
|
4
|
+
# Verifier service for email verification.
|
|
5
|
+
#
|
|
6
|
+
# Provides methods to verify if an email address is valid and deliverable.
|
|
7
|
+
#
|
|
8
|
+
# @see https://docs.tomba.io/api/verifier
|
|
9
|
+
class Verifier < Service
|
|
10
|
+
# Email Verifier
|
|
11
|
+
#
|
|
12
|
+
# Verifies the deliverability of an email address.
|
|
13
|
+
#
|
|
14
|
+
# @see https://docs.tomba.io/api/verifier#email-verifier
|
|
15
|
+
# @param email [String] the email address to verify
|
|
16
|
+
# @param webhook_url [String, nil] webhook URL for async notifications
|
|
17
|
+
# @return [Hash] API response containing verification results
|
|
18
|
+
# @raise [Tomba::Exception]
|
|
19
|
+
def email_verifier(email:, webhook_url: nil)
|
|
20
|
+
raise Tomba::Exception, 'Missing required parameter: "email"' if email.nil?
|
|
18
21
|
|
|
22
|
+
path = '/email-verifier'
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
params = {}
|
|
25
|
+
params[:email] = email unless email.nil?
|
|
26
|
+
params[:webhook_url] = webhook_url unless webhook_url.nil?
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
@client.call('get', path, {
|
|
29
|
+
'content-type' => 'application/json'
|
|
30
|
+
}, params)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/tomba/version.rb
CHANGED
data/lib/tomba.rb
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'net/http'
|
|
2
4
|
require 'uri'
|
|
3
5
|
require 'json'
|
|
6
|
+
require_relative 'tomba/version'
|
|
4
7
|
require_relative 'tomba/client'
|
|
5
8
|
require_relative 'tomba/service'
|
|
6
9
|
require_relative 'tomba/exception'
|
|
10
|
+
|
|
11
|
+
# Existing services
|
|
7
12
|
require_relative 'tomba/services/account'
|
|
8
13
|
require_relative 'tomba/services/domain'
|
|
9
14
|
require_relative 'tomba/services/finder'
|
|
@@ -16,3 +21,15 @@ require_relative 'tomba/services/logs'
|
|
|
16
21
|
require_relative 'tomba/services/keys'
|
|
17
22
|
require_relative 'tomba/services/leads-lists'
|
|
18
23
|
require_relative 'tomba/services/leads-attributes'
|
|
24
|
+
|
|
25
|
+
# New services
|
|
26
|
+
require_relative 'tomba/services/phone'
|
|
27
|
+
require_relative 'tomba/services/format'
|
|
28
|
+
require_relative 'tomba/services/similar'
|
|
29
|
+
require_relative 'tomba/services/technology'
|
|
30
|
+
require_relative 'tomba/services/location'
|
|
31
|
+
require_relative 'tomba/services/enrichment'
|
|
32
|
+
require_relative 'tomba/services/reveal'
|
|
33
|
+
require_relative 'tomba/services/flag'
|
|
34
|
+
require_relative 'tomba/services/leads'
|
|
35
|
+
require_relative 'tomba/services/bulk'
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tomba
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mohamed Ben rebia
|
|
8
8
|
- Tomba technology web service LLC
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-08-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: official Ruby library for Tomba
|
|
15
15
|
email:
|
|
@@ -24,23 +24,34 @@ files:
|
|
|
24
24
|
- lib/tomba/exception.rb
|
|
25
25
|
- lib/tomba/service.rb
|
|
26
26
|
- lib/tomba/services/account.rb
|
|
27
|
+
- lib/tomba/services/bulk.rb
|
|
27
28
|
- lib/tomba/services/count.rb
|
|
28
29
|
- lib/tomba/services/domain.rb
|
|
30
|
+
- lib/tomba/services/enrichment.rb
|
|
29
31
|
- lib/tomba/services/finder.rb
|
|
32
|
+
- lib/tomba/services/flag.rb
|
|
33
|
+
- lib/tomba/services/format.rb
|
|
30
34
|
- lib/tomba/services/keys.rb
|
|
31
35
|
- lib/tomba/services/leads-attributes.rb
|
|
32
36
|
- lib/tomba/services/leads-lists.rb
|
|
37
|
+
- lib/tomba/services/leads.rb
|
|
38
|
+
- lib/tomba/services/location.rb
|
|
33
39
|
- lib/tomba/services/logs.rb
|
|
40
|
+
- lib/tomba/services/phone.rb
|
|
41
|
+
- lib/tomba/services/reveal.rb
|
|
42
|
+
- lib/tomba/services/similar.rb
|
|
34
43
|
- lib/tomba/services/sources.rb
|
|
35
44
|
- lib/tomba/services/status.rb
|
|
45
|
+
- lib/tomba/services/technology.rb
|
|
36
46
|
- lib/tomba/services/usage.rb
|
|
37
47
|
- lib/tomba/services/verifier.rb
|
|
38
48
|
- lib/tomba/version.rb
|
|
39
49
|
homepage: https://tomba.io
|
|
40
50
|
licenses:
|
|
41
51
|
- Apache-2.0
|
|
42
|
-
metadata:
|
|
43
|
-
|
|
52
|
+
metadata:
|
|
53
|
+
rubygems_mfa_required: 'true'
|
|
54
|
+
post_install_message:
|
|
44
55
|
rdoc_options: []
|
|
45
56
|
require_paths:
|
|
46
57
|
- lib
|
|
@@ -55,8 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
55
66
|
- !ruby/object:Gem::Version
|
|
56
67
|
version: '0'
|
|
57
68
|
requirements: []
|
|
58
|
-
rubygems_version: 3.
|
|
59
|
-
signing_key:
|
|
69
|
+
rubygems_version: 3.4.19
|
|
70
|
+
signing_key:
|
|
60
71
|
specification_version: 4
|
|
61
72
|
summary: Tomba.io is an Email Finder for B2B sales and email marketing
|
|
62
73
|
test_files: []
|