| 1 | package Tomba::Status; | ||
| 2 | |||
| 3 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use parent 'Tomba::Client'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Tomba::Status - Domain status and autocomplete for the Tomba.io API | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | use Tomba::Status; | ||
| 14 | |||
| 15 | my $tomba = Tomba::Status->new("ta_xxxxx", "ts_xxxxx"); | ||
| 16 | my $status = $tomba->Status("gmail.com"); | ||
| 17 | my $suggestions = $tomba->Autocomplete("googl"); | ||
| 18 | |||
| 19 | =head1 DESCRIPTION | ||
| 20 | |||
| 21 | Check domain status (webmail/disposable) and auto-complete company names. | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | #------------------------------------------------------------------------------- | ||
| 26 | # Domain Status | ||
| 27 | #------------------------------------------------------------------------------- | ||
| 28 | |||
| 29 | =head2 Status | ||
| 30 | |||
| 31 | my $data = $tomba->Status("gmail.com"); | ||
| 32 | |||
| 33 | Returns domain status indicating if it is a webmail or disposable domain. | ||
| 34 | |||
| 35 | See L<https://docs.tomba.io/api/domain#get-domain-status> | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | 0 | ▶ | sub Status { |
|
Subroutine
Status: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 40 | 0 | my ($self, $domain) = @_; | |
| 41 | 0 | my $params = { | |
| 42 | domain => $domain, | ||
| 43 | }; | ||
| 44 | 0 | return $self->call(Tomba::Client::STATUS_PATH, $params); | |
| 45 | } | ||
| 46 | |||
| 47 | #------------------------------------------------------------------------------- | ||
| 48 | # Domain Suggestions (Autocomplete) | ||
| 49 | #------------------------------------------------------------------------------- | ||
| 50 | |||
| 51 | =head2 Autocomplete | ||
| 52 | |||
| 53 | my $data = $tomba->Autocomplete("googl"); | ||
| 54 | |||
| 55 | Company Autocomplete API that lets you auto-complete company names and retrieve logo and domain information. | ||
| 56 | |||
| 57 | See L<https://docs.tomba.io/api/domain-suggestions#get-domain-suggestions> | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | 0 | ▶ | sub Autocomplete { |
|
Subroutine
Autocomplete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 62 | 0 | my ($self, $search) = @_; | |
| 63 | 0 | my $params = { | |
| 64 | query => $search, | ||
| 65 | }; | ||
| 66 | 0 | return $self->call(Tomba::Client::AUTOCOMPLETE_PATH, $params); | |
| 67 | } | ||
| 68 | |||
| 69 | 4 | 1; | |
| 70 | __END__ | ||