Skip to content

Commit d49ae1d

Browse files
committed
chore(release): 1.0.2
1 parent c6bd93b commit d49ae1d

21 files changed

+939
-141
lines changed

README.md

+80-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,85 @@ tomba login
4949

5050
![tomba email](svg/login.svg)
5151

52+
### Domain search
53+
54+
Instantly locate email addresses from any company name or website.
55+
56+
```bash
57+
tomba search --target "tomba.io"
58+
```
59+
60+
![tomba domain search](svg/search.svg)
61+
62+
### Enrichment
63+
64+
Locate and include data in your emails.
65+
66+
```bash
67+
tomba enrich --target "[email protected]"
68+
```
69+
70+
![tomba enrich](svg/enrich.svg)
71+
72+
### Author Finder
73+
74+
Instantly discover the email addresses of article authors.
75+
76+
```bash
77+
tomba author --target "https://clearbit.com/blog/company-name-to-domain-api"
78+
```
79+
80+
![tomba author](svg/author.svg)
81+
82+
### Linkedin Finder
83+
84+
Instantly discover the email addresses of Linkedin URLs.
85+
86+
```bash
87+
tomba linkedin --target "https://www.linkedin.com/in/mohamed-ben-rebia"
88+
```
89+
90+
![tomba linkedin](svg/linkedin.svg)
91+
92+
### Email Verifier
93+
94+
Verify the deliverability of an email address.
95+
96+
```bash
97+
tomba verify --target "[email protected]"
98+
```
99+
100+
![tomba verify](svg/verify.svg)
101+
102+
### Available Commands
103+
104+
| Command name | Description |
105+
| ------------ | ------------------------------------------------------------------ |
106+
| author | Instantly discover the email addresses of article authors. |
107+
| completion | Generate the autocompletion script for the specified shell |
108+
| count | Returns total email addresses we have for one domain. |
109+
| enrich | Locate and include data in your emails. |
110+
| help | Help about any command |
111+
| linkedin | Instantly discover the email addresses of Linkedin URLs. |
112+
| login | Sign in to Tomba account |
113+
| logout | delete your current KEY & SECRET API session. |
114+
| search | Instantly locate email addresses from any company name or website. |
115+
| status | Returns domain status if is webmail or disposable. |
116+
| verify | Verify the deliverability of an email address. |
117+
| version | Print version number and build information. |
118+
119+
### Command Flags
120+
121+
| shortopts | longopts | Description |
122+
| --------- | ---------- | --------------------------------------------------------------- |
123+
| `-h` | `--help` | help for tomba |
124+
| `-j` | `--json` | output JSON format. (default true) |
125+
| `-k` | `--key` | Tomba API KEY. |
126+
| `-o` | `--output` | Save the results to file. |
127+
| `-s` | `--secret` | Tomba API SECRET. |
128+
| `-t` | `--target` | TARGET SPECIFICATION Can pass email, Domain, URL, Linkedin URL. |
129+
| `-y` | `--yaml` | output YAML format. |
130+
52131
## Auto-Completion
53132

54133
Auto-completion is supported for at least the following shells:
@@ -63,7 +142,7 @@ zsh
63142
NOTE: it may work for other shells as well because the implementation is in
64143
Golang and is not necessarily shell-specific.
65144

66-
### Installation
145+
### Completion
67146

68147
Installing auto-completions is as simple as running one command (works for
69148
`bash`, `fish`, `powershell` and `zsh` shells):

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

cmd/author.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/tomba-io/tomba/pkg/output"
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
10-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1110
_url "github.com/tomba-io/tomba/pkg/validation/url"
1211
)
1312

@@ -26,15 +25,8 @@ var authorCmd = &cobra.Command{
2625
func authorRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
3728
url := init.Target
29+
3830
if !_url.IsValidURL(url) {
3931
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentsURL.Error()))
4032
return

cmd/consts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const (
1414
authorExample = ` tomba author --target "https://clearbit.com/blog/company-name-to-domain-api"`
1515
countExample = ` tomba count --target "clearbit.com"`
1616
enrichExample = ` tomba enrich --target "[email protected]"`
17-
linkedinExample = ` tomba linkedin --target "https://www.linkedin.com/in/alex-maccaw-ab592978"`
17+
linkedinExample = ` tomba linkedin --target "https://www.linkedin.com/in/mohamed-ben-rebia"`
1818
searchExample = ` tomba search --target "tomba.io"`
1919
statusExample = ` tomba status --target "tomba.io"`
2020
verifyExample = ` tomba verify --target "[email protected]"`

cmd/count.go

-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
1010
_domain "github.com/tomba-io/tomba/pkg/validation/domain"
11-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1211
)
1312

1413
// countCmd represents the count command
@@ -26,14 +25,6 @@ var countCmd = &cobra.Command{
2625
func countRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
3728
url := init.Target
3829

3930
if !_domain.IsValidDomain(url) {

cmd/enrich.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
1010
_email "github.com/tomba-io/tomba/pkg/validation/email"
11-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1211
)
1312

1413
// enrichCmd represents the enrich command
@@ -26,16 +25,8 @@ var enrichCmd = &cobra.Command{
2625
func enrichRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
37-
3828
email := init.Target
29+
3930
if !_email.IsValidEmail(email) {
4031
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentEmail.Error()))
4132
return

cmd/linkedin.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/tomba-io/tomba/pkg/output"
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
10-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1110
_url "github.com/tomba-io/tomba/pkg/validation/url"
1211
)
1312

@@ -26,15 +25,8 @@ var linkedinCmd = &cobra.Command{
2625
func linkedinRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
3728
url := init.Target
29+
3830
if !_url.IsValidURL(url) {
3931
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentsURL.Error()))
4032
return

cmd/search.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
1010
_domain "github.com/tomba-io/tomba/pkg/validation/domain"
11-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1211
)
1312

1413
// searchCmd represents the search command
@@ -26,15 +25,8 @@ var searchCmd = &cobra.Command{
2625
func searchRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
3728
domain := init.Target
29+
3830
if !_domain.IsValidDomain(domain) {
3931
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentsDomain.Error()))
4032
return

cmd/status.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/tomba-io/tomba/pkg/start"
99
"github.com/tomba-io/tomba/pkg/util"
1010
_domain "github.com/tomba-io/tomba/pkg/validation/domain"
11-
_key "github.com/tomba-io/tomba/pkg/validation/key"
1211
)
1312

1413
// statusCmd represents the status command
@@ -26,15 +25,8 @@ var statusCmd = &cobra.Command{
2625
func statusRun(cmd *cobra.Command, args []string) {
2726
fmt.Println(Long)
2827
init := start.New(conn)
29-
if init.Key == "" || init.Secret == "" {
30-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
31-
return
32-
}
33-
if !_key.IsValidAPI(init.Key) && !_key.IsValidAPI(init.Secret) {
34-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidLogin.Error()))
35-
return
36-
}
3728
domain := init.Target
29+
3830
if !_domain.IsValidDomain(domain) {
3931
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentsDomain.Error()))
4032
return

cmd/verify.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ var verifyCmd = &cobra.Command{
2525
func verifyRun(cmd *cobra.Command, args []string) {
2626
fmt.Println(Long)
2727
init := start.New(conn)
28-
if init.Key == "" || init.Secret == "" {
29-
fmt.Println(util.WarningIcon(), util.Yellow(start.ErrErrInvalidNoLogin.Error()))
30-
return
31-
}
3228
email := init.Target
29+
3330
if !_email.IsValidEmail(email) {
3431
fmt.Println(util.ErrorIcon(), util.Red(start.ErrArgumentEmail.Error()))
3532
return

pkg/start/init.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ package start
22

33
import (
44
"fmt"
5+
"os"
56

6-
"github.com/tomba-io/tomba/pkg/config"
77
"github.com/tomba-io/go/tomba"
8+
"github.com/tomba-io/tomba/pkg/config"
9+
"github.com/tomba-io/tomba/pkg/util"
10+
_key "github.com/tomba-io/tomba/pkg/validation/key"
811
)
912

1013
// Conn
@@ -45,7 +48,14 @@ func New(conn Conn) *Conn {
4548
Tomba: tomba,
4649
}
4750
}
48-
51+
if conn.Key == "" || conn.Secret == "" {
52+
fmt.Println(util.WarningIcon(), util.Yellow(ErrErrInvalidNoLogin.Error()))
53+
os.Exit(0)
54+
}
55+
if !_key.IsValidAPI(conn.Key) && !_key.IsValidAPI(conn.Secret) {
56+
fmt.Println(util.WarningIcon(), util.Yellow(ErrErrInvalidLogin.Error()))
57+
os.Exit(0)
58+
}
4959
tomba := tomba.New(conn.Key, conn.Secret)
5060
return &Conn{
5161
Parameters: conn.Parameters,

pkg/validation/key/check.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ package key
22

33
// IsValidAPI Check if Tomba.io kEY or SECRET is valid
44
func IsValidAPI(credential string) bool {
5-
return len(credential) > 39
5+
return len(credential) >= 39
66
}

pkg/version/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "fmt"
44

55
var (
66
app = "tomba"
7-
version = "v1.0.1"
7+
version = "v1.0.2"
88
)
99

1010
// String returns a string.

snapcraft.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ issues: https://github.com/tomba-io/tomba/issues
1515
license: "Apache-2.0"
1616
source-code: https://github.com/tomba-io/tomba.git
1717
website: https://tomba.io/
18-
version: 1.0.1
18+
version: 1.0.2
1919
grade: stable
2020
base: core20
2121

0 commit comments

Comments
 (0)